AuthenticationHandler

open class AuthenticationHandler

Base class for all AuthenticationHandlers.

Provides common functions that all AuthenticationHandlers share.

  • Result enumeration for the AuthenticationHandler authentication process.

    See more

    Declaration

    Swift

    public enum AuthenticateResult
  • 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)