Type Aliases

The following type aliases are available globally.

Node Processing

  • Typealias for completion callback for Node submit. Upon completion, the callback returns any one of following:

    • Expected result object; currently Node can only process following generic types:
      1. Token: SSOToken as Token object
      2. AccessToken: access_token, and other OAuth2 token, and values associated with the access_token
      3. FRUser: Abstract layer of currently authenticated user session
    • Node object to process; Node object is a representation of a step in authentication process which requires user interaction to provide input value(s) to each Callback object within Node instance.
    • Error if occurred during authentication process

    Declaration

    Swift

    public typealias NodeCompletion<T> = (_ result: T?, _ node: Node?, _ error: Error?) -> Void

Generic

  • Generic typealias for completion with an optional error occurred

    Declaration

    Swift

    public typealias CompletionCallback = (_ error: Error?) -> Void
  • Generic typealias for completion with an error object

    Declaration

    Swift

    public typealias ErrorCallback = (_ error: Error) -> Void
  • Generic typealias for completion with an JSON object

    Declaration

    Swift

    public typealias JSONCompletionCallback = (_ result: [String : Any]) -> Void
  • Generic typealias for completion with a String value

    Declaration

    Swift

    public typealias StringCompletionCallback = (_ result: String) -> Void

WebAuthn

  • Completion Callback for user consent result for WebAuthn registration/authentication operations

    Declaration

    Swift

    public typealias WebAuthnUserConsentCallback = (_ result: WebAuthnUserConsentResult) -> Void
  • Completion Callback for key selection for WebAuthn registration/authentication operations

    Declaration

    Swift

    public typealias WebAuthnCredentialsSelectionCallback = (_ selectedKeyName: String?) -> Void

Social Login

  • Callback definition for completion of Social Login authorization flow against provider

    Declaration

    Swift

    public typealias SocialLoginCompletionCallback = (_ token: String?, _ tokenType: String?, _ error: Error?) -> Void

OAuth2Client

  • Callback definition for completion of exchanging access_token request

    Declaration

    Swift

    public typealias TokenCompletionCallback = (_ token: AccessToken?, _ error: Error?) -> Void

OAuth2 / OIDC

  • Callback definition for completion of retrieving UserInfo from /userinfo endpoint

    Declaration

    Swift

    public typealias UserInfoCallback = (_ result: UserInfo?, _ error: Error?) -> Void

FRUser

  • Callback definition for completion of retrieving or getting currently authenticated FRUser instance

    Declaration

    Swift

    public typealias UserCallback = (_ user: FRUser?, _ error: Error?) -> Void

DeviceCollector

  • DeviceCollector Callback definition

    Declaration

    Swift

    public typealias DeviceCollectorCallback = (_ result: [String : Any]) -> Void

FRURLProtocol

  • Callback definition for completion result

    Declaration

    Swift

    public typealias FRCompletionResultCallback = (_ result: Bool) -> Void