OIDC configuration (#4623)
* Login: more logs. * Login: map Oidc error to provide more information in the error dialog. * Oidc: use the application name. * Oidc: move configuration from OidcConfigurationProvider to OidcConfig and add some comments. * Oidc: limit to only 1 contact in the configuration. * Oidc: Move configuration to BuildConfig file. * Remove unused const. * Add missing test on Exception mapping * Remove contacts from OidcConfiguration. https://github.com/matrix-org/matrix-rust-sdk/pull/4958
This commit is contained in:
@@ -10,5 +10,6 @@ package io.element.android.libraries.matrix.api.auth
|
||||
sealed class AuthenticationException(message: String) : Exception(message) {
|
||||
class InvalidServerName(message: String) : AuthenticationException(message)
|
||||
class SlidingSyncVersion(message: String) : AuthenticationException(message)
|
||||
class Oidc(message: String) : AuthenticationException(message)
|
||||
class Generic(message: String) : AuthenticationException(message)
|
||||
}
|
||||
|
||||
@@ -7,6 +7,27 @@
|
||||
|
||||
package io.element.android.libraries.matrix.api.auth
|
||||
|
||||
import io.element.android.libraries.matrix.api.BuildConfig
|
||||
|
||||
object OidcConfig {
|
||||
const val REDIRECT_URI = "io.element:/callback"
|
||||
const val CLIENT_URI = BuildConfig.CLIENT_URI
|
||||
|
||||
// Notes:
|
||||
// 1. the scheme must match the value declared in the AndroidManifest.xml
|
||||
// 2. the scheme must be the reverse of the host of CLIENT_URI
|
||||
const val REDIRECT_URI = BuildConfig.REDIRECT_URI
|
||||
|
||||
// Note: host must match with the host of CLIENT_URI
|
||||
const val LOGO_URI = BuildConfig.LOGO_URI
|
||||
|
||||
// Note: host must match with the host of CLIENT_URI
|
||||
const val TOS_URI = BuildConfig.TOS_URI
|
||||
|
||||
// Note: host must match with the host of CLIENT_URI
|
||||
const val POLICY_URI = BuildConfig.POLICY_URI
|
||||
|
||||
// Some homeservers/auth issuers don't support dynamic client registration, and have to be registered manually
|
||||
val STATIC_REGISTRATIONS = mapOf(
|
||||
"https://id.thirdroom.io/realms/thirdroom" to "elementx",
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user