mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Fix setup du SingleSignOnManager
This commit is contained in:
parent
6b88006faa
commit
6626a0d1a1
1 changed files with 7 additions and 7 deletions
|
|
@ -254,20 +254,20 @@ class CoreContext: ObservableObject {
|
|||
}
|
||||
}
|
||||
}, onAuthenticationRequested: { (core: Core, authInfo: AuthInfo, method: AuthMethod) in
|
||||
guard let username = authInfo.username, let domain = authInfo.domain, let realm = authInfo.realm else {
|
||||
Log.error("Authentication requested but either username [\(String(describing: authInfo.username))], domain [\(String(describing: authInfo.domain))] or server [\(String(describing: authInfo.authorizationServer))] is nil or empty!")
|
||||
return
|
||||
}
|
||||
|
||||
if method == .Bearer {
|
||||
if let server = authInfo.authorizationServer, !server.isEmpty {
|
||||
Log.info("Authentication requested method is Bearer, starting Single Sign On activity with server URL \(server) and username \(username)")
|
||||
Log.info("Authentication requested method is Bearer, starting Single Sign On activity with server URL \(server) and username \(authInfo.username ?? "")")
|
||||
self.bearerAuthInfoPendingPasswordUpdate = authInfo
|
||||
SingleSignOnManager.shared.setUp(ssoUrl: server, user: username)
|
||||
SingleSignOnManager.shared.setUp(ssoUrl: server, user: authInfo.username ?? "")
|
||||
}
|
||||
}
|
||||
|
||||
if method == .HttpDigest {
|
||||
guard let username = authInfo.username, let domain = authInfo.domain, let realm = authInfo.realm else {
|
||||
Log.error("Authentication requested but either username [\(String(describing: authInfo.username))], domain [\(String(describing: authInfo.domain))] or server [\(String(describing: authInfo.authorizationServer))] is nil or empty!")
|
||||
return
|
||||
}
|
||||
|
||||
guard let accountFound = core.accountList.first(where: {
|
||||
$0.params?.identityAddress?.username == authInfo.username &&
|
||||
$0.params?.identityAddress?.domain == authInfo.domain
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue