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.
-
Declaration
Swift
public var url: String -
Declaration
Swift
public var realm: String -
Declaration
Swift
public var enableCookie: Bool -
Declaration
Swift
public var cookieName: String -
Declaration
Swift
public var timeout: String -
Declaration
Swift
public var authServiceName: String -
Declaration
Swift
public var registrationServiceName: String -
Declaration
Swift
public var oauthThreshold: String? -
Declaration
Swift
public var oauthClientId: String? -
Declaration
Swift
public var oauthRedirectUri: String? -
Declaration
Swift
public var oauthSignoutRedirectUri: String? -
Declaration
Swift
public var oauthScope: String? -
Declaration
Swift
public var keychainAccessGroup: String? -
Declaration
Swift
public var sslPinningPublicKeyHashes: [String]?
-
init(url:realm: enableCookie: cookieName: timeout: authenticateEndpoint: authorizeEndpoint: tokenEndpoint: revokeEndpoint: userinfoEndpoint: sessionEndpoint: endSessionEndpoint: authServiceName: registrationServiceName: oauthThreshold: oauthClientId: oauthRedirectUri: oauthSignoutRedirectUri: oauthScope: keychainAccessGroup: sslPinningPublicKeyHashes: ) 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
urlThe AM URL
realmThe AM realm used for authentication
enableCookieBoolean value to enable cookie usage
timeoutTimeout value in String format
authenticateEndpointAM /authenticate endpoint. Optionaly used for custom endpoints.
authorizeEndpointAM /authorize endpoint. Optionaly used for custom endpoints.
tokenEndpointAM /token endpoint. Optionaly used for custom endpoints.
revokeEndpointAM /revoke endpoint. Optionaly used for custom endpoints.
userinfoEndpointAM /userinfo endpoint. Optionaly used for custom endpoints.
sessionEndpointAM /session endpoint. Optionaly used for custom endpoints.
endSessionEndpointAM /endSession endpoint. Optionaly used for custom endpoints.
authServiceNameAM Tree/Journey used for authentication. Default tree to be used with FRUser.login
registrationServiceNameAM Tree/Journey used for registration. Default tree to be used with FRUser.register
oauthThresholdOAuth Client timeout threshold
oauthClientIdOAuth Client name
oauthRedirectUriOAuth Client redirectURI
oauthSignoutRedirectUriOAuth Client signout redirectURI
oauthScopeOAuth Client scopes
keychainAccessGroupKeychain access group for shared keychain
sslPinningPublicKeyHashesSSL Pinning hashes
-
Initializes the FROptions object
Declaration
Swift
public init(config: [String : Any])Parameters
configConfiguration dictionary [String: Any], providing properties either from a Serialized FROption object or a configuration plist
-
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 -
discover(discoveryURL:Asynchronous) Asynchronously discovers configuration options based on a provided discovery URL.
Declaration
Swift
@available(iOS 13.0.0, *) open func discover(discoveryURL: String) async throws -> FROptionsParameters
discoveryURLThe 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
FROptionspopulated with the configuration settings fetched from the discovery URL.
View on GitHub