mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 03:18:06 +00:00
Fixed SSO sign-in when using remote provisioning without credentials information available
This commit is contained in:
parent
e562f1505d
commit
50cb162bd3
1 changed files with 14 additions and 7 deletions
|
|
@ -275,15 +275,15 @@ class CoreContext @UiThread constructor(val context: Context) : HandlerThread("C
|
|||
|
||||
@WorkerThread
|
||||
override fun onAuthenticationRequested(core: Core, authInfo: AuthInfo, method: AuthMethod) {
|
||||
if (authInfo.username == null || authInfo.domain == null || authInfo.realm == null) {
|
||||
Log.e(
|
||||
"$TAG Authentication request but either username [${authInfo.username}], domain [${authInfo.domain}] or realm [${authInfo.realm}] is null!"
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
when (method) {
|
||||
AuthMethod.Bearer -> {
|
||||
if (authInfo.authorizationServer == null) {
|
||||
Log.e(
|
||||
"$TAG Authentication request using Bearer method but authorization server is null!"
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
val serverUrl = authInfo.authorizationServer
|
||||
val username = authInfo.username
|
||||
if (!serverUrl.isNullOrEmpty()) {
|
||||
|
|
@ -301,6 +301,13 @@ class CoreContext @UiThread constructor(val context: Context) : HandlerThread("C
|
|||
}
|
||||
}
|
||||
AuthMethod.HttpDigest -> {
|
||||
if (authInfo.username == null || authInfo.domain == null || authInfo.realm == null) {
|
||||
Log.e(
|
||||
"$TAG Authentication request using Digest method but either username [${authInfo.username}], domain [${authInfo.domain}] or realm [${authInfo.realm}] is null!"
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
val accountFound = core.accountList.find {
|
||||
it.params.identityAddress?.username == authInfo.username && it.params.identityAddress?.domain == authInfo.domain
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue