AuthenticationHandler
open class AuthenticationHandler
Base class for all AuthenticationHandlers.
Provides common functions that all AuthenticationHandlers share.
-
Result enumeration for the AuthenticationHandler authentication process.
See moreDeclaration
Swift
public enum AuthenticateResult
-
AuthenticationValidationType
handled by this AuthenticationHandlerDeclaration
Swift
public var validationType: AuthenticationValidationType
-
AuthenticationHandlerUIDelegate for informing callers when the authentication UI should appear or be dismissed.
Declaration
Swift
public weak var authenticationUIDelegate: AuthenticationHandlerUIDelegate?
-
Weak reference to the
AuthenticationManager
associated with this AuthenticationHandlerDeclaration
Swift
public internal(set) weak var manager: AuthenticationManager?
-
Dictionary of data retrieved during authentication. Dictionary contents will vary depending on the authentication handler.
Declaration
Swift
public var authenticationResponsePayload: [String: Any] = [:]
-
Starts the authentication process.
Called by the associated
AuthenticationManager
when needed.Declaration
Swift
public func authenticate(completionHandler: @escaping (_ result: AuthenticateResult) -> Void)
Parameters
completionHandler
closure called when authentication has completed.
result
AuthenticateResult: Success or fail, result of authentication.
-
Cancels an authentication in-process. Does nothing if no authentication is currently in process.
Called by the associated
AuthenticationManager
when needed.Subclasses should perform any needed cancelation activities prior to calling
super.cancelAuthentication()
Declaration
Swift
open func cancelAuthentication()
-
Logs user out for the given authentication handler subclass
Declaration
Swift
open func logout(completionHandler: @escaping () -> Void)
Parameters
completionHandler
Called when the logout process for this AuthenticationHandler has completed.
-
Called by subsclasses to indicate an authentication process is complete.
Should not be called from external consumers. The
cancelAuthentication
method should be used to end an in-progress authentication.Declaration
Swift
open func authenticationComplete(result: AuthenticateResult)