mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-17 20:08:32 +01:00
stable ids for MSC 2858
This commit is contained in:
parent
f448799104
commit
00ee61a2a0
@ -51,12 +51,12 @@ data class SsoIdentityProvider(
|
||||
) : Parcelable, Comparable<SsoIdentityProvider> {
|
||||
|
||||
companion object {
|
||||
const val BRAND_GOOGLE = "org.matrix.google"
|
||||
const val BRAND_GITHUB = "org.matrix.github"
|
||||
const val BRAND_APPLE = "org.matrix.apple"
|
||||
const val BRAND_FACEBOOK = "org.matrix.facebook"
|
||||
const val BRAND_TWITTER = "org.matrix.twitter"
|
||||
const val BRAND_GITLAB = "org.matrix.gitlab"
|
||||
const val BRAND_GOOGLE = "google"
|
||||
const val BRAND_GITHUB = "github"
|
||||
const val BRAND_APPLE = "apple"
|
||||
const val BRAND_FACEBOOK = "facebook"
|
||||
const val BRAND_TWITTER = "twitter"
|
||||
const val BRAND_GITLAB = "gitlab"
|
||||
}
|
||||
|
||||
override fun compareTo(other: SsoIdentityProvider): Int {
|
||||
|
@ -33,7 +33,6 @@ internal const val REGISTER_FALLBACK_PATH = "/_matrix/static/client/register/"
|
||||
* Ref: https://matrix.org/docs/spec/client_server/latest#sso-client-login
|
||||
*/
|
||||
internal const val SSO_REDIRECT_PATH = "/_matrix/client/r0/login/sso/redirect"
|
||||
internal const val MSC2858_SSO_REDIRECT_PATH = "/_matrix/client/unstable/org.matrix.msc2858/login/sso/redirect"
|
||||
|
||||
internal const val SSO_REDIRECT_URL_PARAM = "redirectUrl"
|
||||
|
||||
|
@ -88,11 +88,9 @@ internal class DefaultAuthenticationService @Inject constructor(
|
||||
|
||||
return buildString {
|
||||
append(homeServerUrlBase)
|
||||
append(SSO_REDIRECT_PATH)
|
||||
if (providerId != null) {
|
||||
append(MSC2858_SSO_REDIRECT_PATH)
|
||||
append("/$providerId")
|
||||
} else {
|
||||
append(SSO_REDIRECT_PATH)
|
||||
}
|
||||
// Set the redirect url
|
||||
appendParamToUrl(SSO_REDIRECT_URL_PARAM, redirectUrl)
|
||||
|
@ -42,7 +42,7 @@ internal data class LoginFlow(
|
||||
* the client can show a button for each of the supported providers
|
||||
* See MSC #2858
|
||||
*/
|
||||
@Json(name = "org.matrix.msc2858.identity_providers")
|
||||
@Json(name = "identity_providers")
|
||||
val ssoIdentityProvider: List<SsoIdentityProvider>? = null
|
||||
|
||||
)
|
||||
|
1
newsfragment/3442.bugfix
Normal file
1
newsfragment/3442.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Switch to stable endpoint/fields for MSC2858
|
Loading…
Reference in New Issue
Block a user