AuthService

@objc(FRAuthService)
public class AuthService : NSObject

AuthService represents Authentication Tree in OpenAM to initiate authentication flow with OpenAM. Initiating AuthService returns one of following:

  • Result of expected type, if available
  • A Node object instance to continue on the authentication flow
  • An error, if occurred during the authentication flow

Notes

* Any Callback type returned from AM must be supported within CallbackFactory.shared.supportedCallbacks.
* Any custom Callback must be implemented by inheriting Callback class, and be registered through CallbackFactory.shared.registerCallback(callbackType:callbackClass:).

Property

  • String value of AuthService name registered in AM

    Declaration

    Swift

    @objc
    public internal(set) var serviceName: String { get }
  • Unique UUID String value of initiated AuthService flow

    Declaration

    Swift

    @objc
    public internal(set) var authServiceId: String { get }

Init

  • Designated initialization method for AuthService

    Declaration

    Swift

    @objc
    public init(name: String, serverConfig: ServerConfig)

    Parameters

    name

    String value of AuthService name

    serverConfig

    ServerConfig object for AuthService server communication

Public

  • Submits current Node object with Callback(s) and its given value(s) to OpenAM to proceed on authentication flow.

    Declaration

    Swift

    public func next<T>(completion: @escaping NodeCompletion<T>)

    Parameters

    completion

    NodeCompletion callback which returns the result of Node submission.