mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Updated SSO
This commit is contained in:
parent
06074f0490
commit
af1ee922ad
2 changed files with 5 additions and 7 deletions
|
|
@ -78,7 +78,8 @@ class LandingViewModel @UiThread constructor() : ViewModel() {
|
|||
redirectToDigestAuthEvent.postValue(Event(identityAddress.asStringUriOnly()))
|
||||
} else {
|
||||
Log.i("$TAG Address doesn't match default domain, using Single Sign On")
|
||||
redirectToSingleSignOnEvent.postValue(Event(identityAddress.asStringUriOnly()))
|
||||
// TODO FIXME: use username or full SIP address as login?
|
||||
redirectToSingleSignOnEvent.postValue(Event(identityAddress.username.orEmpty()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,9 +44,8 @@ class SingleSignOnViewModel : ViewModel() {
|
|||
companion object {
|
||||
private const val TAG = "[Single Sign On ViewModel]"
|
||||
|
||||
private const val WELL_KNOWN = "https://sso.onhexagone.com//realms/ONHEXAGONE/.well-known/openid-configuration"
|
||||
private const val CLIENT_ID = "account"
|
||||
private const val SCOPE = "openid email profile"
|
||||
private const val WELL_KNOWN = "https://sso.onhexagone.com/realms/ONHEXAGONE/.well-known/openid-configuration"
|
||||
private const val CLIENT_ID = "linphone"
|
||||
private const val REDIRECT_URI = "org.linphone:/openidcallback"
|
||||
}
|
||||
|
||||
|
|
@ -124,9 +123,7 @@ class SingleSignOnViewModel : ViewModel() {
|
|||
authRequestBuilder.setLoginHint(preFilledUser)
|
||||
}
|
||||
|
||||
val authRequest = authRequestBuilder
|
||||
.setScope(SCOPE)
|
||||
.build()
|
||||
val authRequest = authRequestBuilder.build()
|
||||
authService = AuthorizationService(coreContext.context)
|
||||
val authIntent = authService.getAuthorizationRequestIntent(authRequest)
|
||||
startAuthIntentEvent.postValue(Event(authIntent))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue