DefaultSudoUserClient
public class DefaultSudoUserClient : SudoUserClient
Default implementation for SudoUserClient
.
-
Intializes a new
DefaultSudoUserClient
instance. It uses configuration parameters defined insudoplatformconfig.json
file located in the app bundle.Declaration
Swift
convenience public init(keyNamespace: String, logger: SudoLogging.Logger? = nil) throws
Parameters
keyNamespace
Namespace to use for the keys and passwords. This has to be unique per client per app to avoid different apps (with keychain sharing) or different clients creating conflicting keys.
logger
A logger to use for logging messages. If none provided then a default internal logger will be used.
-
Intializes a new
DefaultSudoUserClient
instance.Declaration
Swift
public init( config: [String: Any], keyNamespace: String, logger: SudoLogging.Logger? = nil ) throws
Parameters
config
Configuration parameters for the client.
keyNamespace
Namespace to use for the keys and passwords.
logger
A logger to use for logging messages. If none provided then a default internal logger will be used.
-
Declaration
Swift
public var version: String { get }
-
isRegistered()
AsynchronousDeclaration
Swift
public func isRegistered() async throws -> Bool
-
reset()
AsynchronousDeclaration
Swift
public func reset() async throws
-
Declaration
Swift
public func registerWithDeviceCheck( token: Data, buildType: String, vendorId: UUID, registrationId: String? ) async throws -> String
-
Declaration
Swift
public func registerWithAuthenticationProvider( authenticationProvider: AuthenticationProvider, registrationId: String? ) async throws -> String
-
deregister()
AsynchronousDeclaration
Swift
public func deregister() async throws
-
resetUserData()
AsynchronousDeclaration
Swift
public func resetUserData() async throws
-
signInWithKey()
AsynchronousDeclaration
Swift
public func signInWithKey() async throws -> AuthenticationTokens
-
Declaration
Swift
public func signInWithAuthenticationProvider(authenticationProvider: AuthenticationProvider) async throws -> AuthenticationTokens
-
presentFederatedSignInUI(presentationAnchor:
Asynchronous) Declaration
Swift
public func presentFederatedSignInUI(presentationAnchor: ASPresentationAnchor) async throws -> AuthenticationTokens
-
presentFederatedSignOutUI(presentationAnchor:
Asynchronous) Declaration
Swift
public func presentFederatedSignOutUI(presentationAnchor: ASPresentationAnchor) async throws
-
refreshTokens()
AsynchronousDeclaration
Swift
public func refreshTokens() async throws -> AuthenticationTokens
-
getUserName()
AsynchronousDeclaration
Swift
public func getUserName() async throws -> String
-
getSubject()
AsynchronousDeclaration
Swift
public func getSubject() async throws -> String?
-
getIdToken()
AsynchronousDeclaration
Swift
public func getIdToken() async throws -> String
-
getAccessToken()
AsynchronousDeclaration
Swift
public func getAccessToken() async throws -> String
-
getRefreshToken()
AsynchronousDeclaration
Swift
public func getRefreshToken() async throws -> String
-
clearAuthTokens()
AsynchronousDeclaration
Swift
public func clearAuthTokens() async throws
-
signOut()
AsynchronousDeclaration
Swift
public func signOut() async throws
-
globalSignOut()
AsynchronousDeclaration
Swift
public func globalSignOut() async throws
-
getIdentityId()
AsynchronousDeclaration
Swift
public func getIdentityId() async throws -> String
-
getUserClaim(name:
Asynchronous) Declaration
Swift
public func getUserClaim(name: String) async throws -> Any?
-
isSignedIn()
AsynchronousDeclaration
Swift
public func isSignedIn() async throws -> Bool
-
registerSignInStatusObserver(id:
Asynchronousobserver: ) Declaration
Swift
public func registerSignInStatusObserver(id: String, observer: SignInStatusObserver) async
-
deregisterSignInStatusObserver(id:
Asynchronous) Declaration
Swift
public func deregisterSignInStatusObserver(id: String) async
-
Declaration
Swift
public func getSupportedRegistrationChallengeType() -> [ChallengeType]