mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-17 20:08:31 +00:00
Use singleSignOnClientId for SSO
This commit is contained in:
parent
e066ff4ee7
commit
cdde88e32a
3 changed files with 12 additions and 2 deletions
|
|
@ -339,6 +339,15 @@ class CorePreferences {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var singleSignOnClientId: String {
|
||||||
|
get {
|
||||||
|
config.getString(section: "app", key: "oidc_client_id", defaultString: "linphone")
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
config.setString(section: "app", key: "oidc_client_id", value: newValue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var teamID: String {
|
var teamID: String {
|
||||||
get {
|
get {
|
||||||
config.getString(section: "app", key: "team_id", defaultString: "")
|
config.getString(section: "app", key: "team_id", defaultString: "")
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,6 @@ import Foundation
|
||||||
|
|
||||||
public enum AppGitInfo {
|
public enum AppGitInfo {
|
||||||
public static let branch = "master"
|
public static let branch = "master"
|
||||||
public static let commit = "bfb4ac3c2"
|
public static let commit = "e066ff4ee"
|
||||||
public static let tag = "6.1.0-alpha"
|
public static let tag = "6.1.0-alpha"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ class SingleSignOnManager {
|
||||||
static let shared = SingleSignOnManager()
|
static let shared = SingleSignOnManager()
|
||||||
|
|
||||||
private let TAG = "[SSO]"
|
private let TAG = "[SSO]"
|
||||||
private let clientId = "linphone"
|
private let clientId = AppServices.corePreferences.singleSignOnClientId
|
||||||
private let userDefaultSSOKey = "sso-authstate"
|
private let userDefaultSSOKey = "sso-authstate"
|
||||||
let ssoRedirectUri = URL(string: "org.linphone:/openidcallback")!
|
let ssoRedirectUri = URL(string: "org.linphone:/openidcallback")!
|
||||||
private var singleSignOnUrl = ""
|
private var singleSignOnUrl = ""
|
||||||
|
|
@ -87,6 +87,7 @@ class SingleSignOnManager {
|
||||||
Log.error("\(self.TAG) Error retrieving discovery document: \(error?.localizedDescription ?? "Unknown error")")
|
Log.error("\(self.TAG) Error retrieving discovery document: \(error?.localizedDescription ?? "Unknown error")")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let request = OIDTokenRequest(
|
let request = OIDTokenRequest(
|
||||||
configuration: configuration,
|
configuration: configuration,
|
||||||
grantType: OIDGrantTypeRefreshToken,
|
grantType: OIDGrantTypeRefreshToken,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue