FROptions

@objc
open class FROptions : NSObject, Codable

FROptions represents a configuration object for the SDK. It can be used for passing configuration options in the FRAuth.start() method.

Init

  • Initializes the FROptions object

    Declaration

    Swift

    public init(url: String,
                realm: String,
                enableCookie: Bool = true,
                cookieName: String? = nil,
                timeout: String = "60",
                authenticateEndpoint: String? = nil,
                authorizeEndpoint: String? = nil,
                tokenEndpoint: String? = nil,
                revokeEndpoint: String? = nil,
                userinfoEndpoint: String? = nil,
                sessionEndpoint: String? = nil,
                endSessionEndpoint: String? = nil,
                authServiceName: String = "Login",
                registrationServiceName: String = "Registration",
                oauthThreshold: String? = nil,
                oauthClientId: String? = nil,
                oauthRedirectUri: String? = nil,
                oauthSignoutRedirectUri: String? = nil,
                oauthScope: String? = nil,
                keychainAccessGroup: String? = nil,
                sslPinningPublicKeyHashes: [String]? = nil)

    Parameters

    url

    The AM URL

    realm

    The AM realm used for authentication

    enableCookie

    Boolean value to enable cookie usage

    timeout

    Timeout value in String format

    authenticateEndpoint

    AM /authenticate endpoint. Optionaly used for custom endpoints.

    authorizeEndpoint

    AM /authorize endpoint. Optionaly used for custom endpoints.

    tokenEndpoint

    AM /token endpoint. Optionaly used for custom endpoints.

    revokeEndpoint

    AM /revoke endpoint. Optionaly used for custom endpoints.

    userinfoEndpoint

    AM /userinfo endpoint. Optionaly used for custom endpoints.

    sessionEndpoint

    AM /session endpoint. Optionaly used for custom endpoints.

    endSessionEndpoint

    AM /endSession endpoint. Optionaly used for custom endpoints.

    authServiceName

    AM Tree/Journey used for authentication. Default tree to be used with FRUser.login

    registrationServiceName

    AM Tree/Journey used for registration. Default tree to be used with FRUser.register

    oauthThreshold

    OAuth Client timeout threshold

    oauthClientId

    OAuth Client name

    oauthRedirectUri

    OAuth Client redirectURI

    oauthSignoutRedirectUri

    OAuth Client signout redirectURI

    oauthScope

    OAuth Client scopes

    keychainAccessGroup

    Keychain access group for shared keychain

    sslPinningPublicKeyHashes

    SSL Pinning hashes

  • Initializes the FROptions object

    Declaration

    Swift

    public init(config: [String : Any])

    Parameters

    config

    Configuration dictionary [String: Any], providing properties either from a Serialized FROption object or a configuration plist

Public

  • Returns the FROptions oject in a [String: Any]? Dictionary format

    Declaration

    Swift

    public func optionsDictionary() -> [String : Any]?
  • Declaration

    Swift

    public func getAuthenticateEndpoint() -> String
  • Declaration

    Swift

    public func getAuthorizeEndpoint() -> String
  • Declaration

    Swift

    public func getTokenEndpoint() -> String
  • Declaration

    Swift

    public func getRevokeEndpoint() -> String
  • Declaration

    Swift

    public func getUserinfoEndpoint() -> String
  • Declaration

    Swift

    public func getSessionEndpoint() -> String
  • Declaration

    Swift

    public func getEndSessionEndpoint() -> String
  • Asynchronously discovers configuration options based on a provided discovery URL.

    Declaration

    Swift

    @available(iOS 13.0.0, *)
    open func discover(discoveryURL: String) async throws -> FROptions

    Parameters

    discoveryURL

    The URL string from which to discover configuration options. This URL should point to a well-known configuration endpoint that returns the necessary configuration settings in a JSON format.

    Return Value

    An instance of FROptions populated with the configuration settings fetched from the discovery URL.