FRAuth

@objc
public final class FRAuth : NSObject

FRAuth is an abstraction of authentication and/or registration with OpenAM through FRAuth SDK.

Note

  • In order to use abstraction layer of FRAuth SDK, you must initiate SDK using FRAuth.start(). Upon completion of SDK initialization, object models (FRDevice and/or FRUser) become available.
  • For SDK initialization, you must have proper configuration file as in .plist; default .plist that FRAuth SDK looks for is ‘FRAuthConfig.plist’, and the config file name can be changed through FRAuth.configPlistFileName property, or create an FROptions object and pass it in the FRAuth.start(options: FROptions? = nil) “options” parameter.

Property

  • Configuration .plist file name; defaulted to ‘FRAuthConfig’

    Declaration

    Swift

    @objc
    public static var configPlistFileName: String
  • Shared instance of FRAuth

    Declaration

    Swift

    @objc
    public static var shared: FRAuth?
  • Declaration

    Swift

    public var options: FROptions?

Init

  • Initializes SDK using .plist configuration file

    Throws

    ConfigError when invalid or missing value in .plist configuration file

    Declaration

    Swift

    @objc
    public static func start(options: FROptions? = nil) throws

    Parameters

    options

    Optional FROptions object. This will contain the configuration if programmatically initialised. The default value in nil to ensure backwards compatibility. If an FROptions object is passed the configuration plist will be ignored