NMAConfiguration

public class NMAConfiguration : NSObject, DictionaryConvertible

The NMAMobileAuthenticationClient configuration. This NMAConfiguration is used to build and initialize the NMAMobileAuthenticationClient.

Examples:

NSURL *baseURL = [[NSURL alloc] initWithString:@"https://test.host.com"];
NMAConfiguration *defaultConfig = [[NMAConfiguration alloc] initWithBaseUrl:baseURL];
NMAConfiguration *configWithCustomPaths =
    [[NMAConfiguration alloc]
           initWithBaseUrl:baseURL
           registrationRequestPath:@"/nevisfido/uaf/1.1/request/registration/"
           registrationResponsePath:@"/nevisfido/uaf/1.1/registration/"
           authenticationRequestPath:@"/auth/fidouaf"
           authenticationResponsePath:@"/auth/fidouaf/authenticationresponse/"
           deregistrationRequestPath:@"/nevisfido/uaf/1.1/request/deregistration/"
           dispatchTargetResourcePath:@"/nevisfido/token/dispatch/targets/"
           deviceResourcePath:@"/nevisfido/devices/"
           networkTimeoutInSeconds:60
           userInteractionTimeoutInSeconds:240];

NMAConfiguration *authCloudConfig = [[NMAConfiguration alloc] initWithAuthCloudHostname:@"test.host.com"];
  • The base URL for all HTTP endpoints the SDK must interact with.

    Declaration

    Swift

    @objc
    public let baseUrl: URL
  • The registration request URL path used to send the FIDO UAF registration GetUafRequest.

    • Default value: “/uaf/1.1/request/registration/”

    Declaration

    Swift

    @objc
    public var registrationRequestPath: String
  • The registration response URL path used to send the final FIDO UAF registration response.

    • Default value: /uaf/1.1/registration/

    Declaration

    Swift

    @objc
    public var registrationResponsePath: String
  • The authentication request URL path used to send the FIDO UAF authentication GetUafRequest.

    • Default value: /uaf/1.1/request/authentication/

    Declaration

    Swift

    @objc
    public var authenticationRequestPath: String
  • The authentication response URL path used to send the final FIDO UAF authentication response.

    • Default value: /uaf/1.1/authentication/

    Declaration

    Swift

    @objc
    public var authenticationResponsePath: String
  • The deregistration request URL path used to obtain the FIDO UAF deregistration request.

    • Default value: /uaf/1.1/request/deregistration/

    Declaration

    Swift

    @objc
    public var deregistrationRequestPath: String
  • The dispatch target resource URL path.

    • Default value: /token/dispatch/targets/

    Declaration

    Swift

    @objc
    public var dispatchTargetResourcePath: String
  • The URL path used to managing devices.

    • Default value: /devices/

    Declaration

    Swift

    @objc
    public var deviceResourcePath: String
  • The maximum number of retries for authentication. The authentication retries will fail after this count is exceeded.

    • Default value: 3

    Declaration

    Swift

    @available(*, deprecated, message: "Use ``NMAAuthentication/retryPolicyObtainingAuthorizationProvider(_:﹚`` instead")
    @objc
    public var authenticationMaxRetries: Int
  • Time interval for authentication in seconds. The authentication retries will fail after this time is exceeded.

    • Default value: 1 second

    Declaration

    Swift

    @available(*, deprecated, message: "Use ``NMAAuthentication/retryPolicyObtainingAuthorizationProvider(_:﹚`` instead")
    @objc
    public var authenticationRetryIntervalInSeconds: TimeInterval
  • Time interval for network calls in seconds. Any network request that takes longer than this value, will result in a timeout.

    • Default value: 60 seconds

    Declaration

    Swift

    @objc
    public var networkTimeoutInSeconds: TimeInterval
  • The user interaction timeout in seconds.

    This is the maximum time that the SDK will wait to obtain a result when either of the following are invoked (i.e. the maximum time to wait before any of the methods of the provided consumer in any of those methods is invoked).

    Declaration

    Swift

    @objc
    public var userInteractionTimeoutInSeconds: TimeInterval
  • This is a convenience version of the default initializer, that can only be used when your application interacts with the Nevis Auth Cloud. If you are fine with the default network parameters, you just need to provide the hostname.

    Declaration

    Swift

    @objc
    public init(authCloudHostname: String)

    Parameters

    authCloudHostname

    the hostname of your Nevis Auth Cloud.

  • This is the default initializer for the NMAConfiguration.

    Declaration

    Swift

    @objc
    public init(baseUrl: URL)

    Parameters

    baseUrl

    The base URL for all HTTP endpoints the SDK must interact with.

  • This is a convenience version of the default initializer, that can only be used when your application interacts with the Nevis Auth Cloud. If you are fine with the default network parameters, please use: init(authCloudHostname:).

    Declaration

    Swift

    @available(*, deprecated, message: "Use ``init(authCloudHostname:networkTimeoutInSeconds:userInteractionTimeoutInSeconds:`` instead")
    @objc
    public init(
    	authCloudHostname: String,
    	authenticationMaxRetries: Int,
    	authenticationRetryIntervalInSeconds: TimeInterval,
    	networkTimeoutInSeconds: TimeInterval,
    	userInteractionTimeoutInSeconds: TimeInterval
    )

    Parameters

    authCloudHostname

    the hostname of your Nevis Auth Cloud.

    authenticationMaxRetries

    the maximum number of retries for authentication. See: authenticationMaxRetries.

    authenticationRetryIntervalInSeconds

    time interval for authentication in seconds. See: authenticationRetryIntervalInSeconds.

    networkTimeoutInSeconds

    time interval for network calls in seconds. See: networkTimeoutInSeconds.

    userInteractionTimeoutInSeconds

    the user interaction timeout in seconds. See: userInteractionTimeoutInSeconds.

  • This is a convenience version of the default initializer, that can only be used when your application interacts with the Nevis Auth Cloud. If you are fine with the default network parameters, please use: init(authCloudHostname:).

    Declaration

    Swift

    @objc
    public init(
    	authCloudHostname: String,
    	networkTimeoutInSeconds: TimeInterval,
    	userInteractionTimeoutInSeconds: TimeInterval
    )

    Parameters

    authCloudHostname

    the hostname of your Nevis Auth Cloud.

    networkTimeoutInSeconds

    time interval for network calls in seconds. See: networkTimeoutInSeconds.

    userInteractionTimeoutInSeconds

    the user interaction timeout in seconds. See: userInteractionTimeoutInSeconds.

  • This is a custom version of the initializer. Use this version if you would like to use custom paths for the configuration. If you are fine with the default parameters, please use: init(baseUrl:).

    Declaration

    Swift

    @available(*, deprecated, message: "Use ``init(baseUrl:registrationRequestPath:registrationResponsePath:authenticationRequestPath:authenticationResponsePath:deregistrationRequestPath:dispatchTargetResourcePath:networkTimeoutInSeconds:userInteractionTimeoutInSeconds:﹚`` instead")
    @objc
    public init(
    	baseUrl: URL,
    	registrationRequestPath: String,
    	registrationResponsePath: String,
    	authenticationRequestPath: String,
    	authenticationResponsePath: String,
    	deregistrationRequestPath: String,
    	dispatchTargetResourcePath: String,
    	deviceResourcePath: String,
    	authenticationMaxRetries: Int,
    	authenticationRetryIntervalInSeconds: TimeInterval,
    	networkTimeoutInSeconds: TimeInterval,
    	userInteractionTimeoutInSeconds: TimeInterval
    )

    Parameters

    baseUrl

    the base URL for all HTTP endpoints the SDK must interact with.

    registrationRequestPath

    the registration request URL path used to send the FIDO UAF registration GetUafRequest. See: registrationRequestPath.

    registrationResponsePath

    the registration response URL path used to send the final FIDO UAF registration response. See: registrationResponsePath.

    authenticationRequestPath

    the authentication request URL path used to send the FIDO UAF authentication GetUafRequest. See: authenticationRequestPath.

    authenticationResponsePath

    the authentication response URL path used to send the final FIDO UAF authentication response. See: authenticationResponsePath.

    deregistrationRequestPath

    the deregistration request URL path used to obtain the FIDO UAF deregistration request. See: deregistrationRequestPath.

    dispatchTargetResourcePath

    the dispatch target resource URL path. See: dispatchTargetResourcePath.

    deviceResourcePath

    The URL path used to managing devices. See deviceResourcePath.

    authenticationMaxRetries

    the maximum number of retries for authentication. See: authenticationMaxRetries.

    authenticationRetryIntervalInSeconds

    time interval for authentication in seconds. See: authenticationRetryIntervalInSeconds.

    networkTimeoutInSeconds

    time interval for network calls in seconds. See: networkTimeoutInSeconds.

    userInteractionTimeoutInSeconds

    the user interaction timeout in seconds. See: userInteractionTimeoutInSeconds.

  • This is a custom version of the initializer. Use this version if you would like to use custom paths for the configuration. If you are fine with the default parameters, please use: init(baseUrl:).

    Declaration

    Swift

    @objc
    public init(
    	baseUrl: URL,
    	registrationRequestPath: String,
    	registrationResponsePath: String,
    	authenticationRequestPath: String,
    	authenticationResponsePath: String,
    	deregistrationRequestPath: String,
    	dispatchTargetResourcePath: String,
    	deviceResourcePath: String,
    	networkTimeoutInSeconds: TimeInterval,
    	userInteractionTimeoutInSeconds: TimeInterval
    )

    Parameters

    baseUrl

    the base URL for all HTTP endpoints the SDK must interact with.

    registrationRequestPath

    the registration request URL path used to send the FIDO UAF registration GetUafRequest. See: registrationRequestPath.

    registrationResponsePath

    the registration response URL path used to send the final FIDO UAF registration response. See: registrationResponsePath.

    authenticationRequestPath

    the authentication request URL path used to send the FIDO UAF authentication GetUafRequest. See: authenticationRequestPath.

    authenticationResponsePath

    the authentication response URL path used to send the final FIDO UAF authentication response. See: authenticationResponsePath.

    deregistrationRequestPath

    the deregistration request URL path used to obtain the FIDO UAF deregistration request. See: deregistrationRequestPath.

    dispatchTargetResourcePath

    the dispatch target resource URL path. See: dispatchTargetResourcePath.

    networkTimeoutInSeconds

    time interval for network calls in seconds. See: networkTimeoutInSeconds.

    userInteractionTimeoutInSeconds

    the user interaction timeout in seconds. See: userInteractionTimeoutInSeconds

  • Declaration

    Swift

    public required init?(dictionary: [String : Any])
  • Declaration

    Swift

    public var asDictionary: [String : Any]? { get }