mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28: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
|
@WorkerThread
|
||||||
override fun onAuthenticationRequested(core: Core, authInfo: AuthInfo, method: AuthMethod) {
|
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) {
|
when (method) {
|
||||||
AuthMethod.Bearer -> {
|
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 serverUrl = authInfo.authorizationServer
|
||||||
val username = authInfo.username
|
val username = authInfo.username
|
||||||
if (!serverUrl.isNullOrEmpty()) {
|
if (!serverUrl.isNullOrEmpty()) {
|
||||||
|
|
@ -301,6 +301,13 @@ class CoreContext @UiThread constructor(val context: Context) : HandlerThread("C
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AuthMethod.HttpDigest -> {
|
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 {
|
val accountFound = core.accountList.find {
|
||||||
it.params.identityAddress?.username == authInfo.username && it.params.identityAddress?.domain == authInfo.domain
|
it.params.identityAddress?.username == authInfo.username && it.params.identityAddress?.domain == authInfo.domain
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue