Configuration
public struct Configuration : Codable, Equatable
The MobileAuthenticationClient
configuration.
This Configuration
is used to build and initialize the MobileAuthenticationClient
.
Examples:
let defaultConfig = Configuration(baseUrl: URL(string: "https://test.host.com")!)
let configWithCustomResponsePaths = Configuration(
baseUrl: URL(string: "https://test.host.com")!
registrationResponsePath: "/custom/uaf/1.1/registration/"
authenticationResponsePath: "/custom/uaf/1.1/authentication/"
)
let authCloudConfig = Configuration(authCloudHostname: "test.host.com")
-
The base URL for all HTTP endpoints the SDK must interact with. The default base URL for the HTTP endpoints the SDK must interact with.
Note
If no URL is provided through theRegistration/serverUrl
method, all the authenticators will be registered against the server associate with this URL.Declaration
Swift
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
public var registrationRequestPath: String
- Default value:
-
The registration response URL path used to send the final FIDO UAF registration response.
- Default value:
/uaf/1.1/registration/
Declaration
Swift
public var registrationResponsePath: String
- Default value:
-
The authentication request URL path used to send the FIDO UAF authentication GetUafRequest.
- Default value:
/uaf/1.1/request/authentication/
Declaration
Swift
public var authenticationRequestPath: String
- Default value:
-
The authentication response URL path used to send the final FIDO UAF authentication response.
- Default value:
/uaf/1.1/authentication/
Declaration
Swift
public var authenticationResponsePath: String
- Default value:
-
The deregistration request URL path used to obtain the FIDO UAF deregistration request.
- Default value:
/uaf/1.1/request/deregistration/
Declaration
Swift
public var deregistrationRequestPath: String
- Default value:
-
The dispatch target resource URL path.
- Default value:
/token/dispatch/targets/
Declaration
Swift
public var dispatchTargetResourcePath: String
- Default value:
-
The URL path used to managing devices.
- Default value:
/devices/
Declaration
Swift
public var deviceResourcePath: String
- Default value:
-
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 ``Authentication/retryPolicyObtainingAuthorizationProvider(_:﹚`` instead") public var authenticationMaxRetries: Int
- Default value:
-
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 ``Authentication/retryPolicyObtainingAuthorizationProvider(_:﹚`` instead") public var authenticationRetryIntervalInSeconds: TimeInterval
- Default value:
-
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
public var networkTimeoutInSeconds: TimeInterval
- Default value:
-
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).
selectAccount(context:handler:)
selectAuthenticator(context:handler:)
verifyPin(context:handler:)
Default value:
240 seconds (4 minutes)
Declaration
Swift
public var userInteractionTimeoutInSeconds: TimeInterval
-
init(baseUrl:
registrationRequestPath: registrationResponsePath: authenticationRequestPath: authenticationResponsePath: deregistrationRequestPath: dispatchTargetResourcePath: deviceResourcePath: authenticationMaxRetries: authenticationRetryIntervalInSeconds: networkTimeoutInSeconds: userInteractionTimeoutInSeconds: ) This is the default initializer for the
Configuration
. If you are fine with the default parameters, you just need to provide the base URL.Declaration
Swift
@available(*, deprecated, message: "Use ``init(baseUrl:registrationRequestPath:registrationResponsePath:authenticationRequestPath:authenticationResponsePath:deregistrationRequestPath:dispatchTargetResourcePath:networkTimeoutInSeconds:userInteractionTimeoutInSeconds:﹚`` instead") public init( baseUrl: URL, registrationRequestPath: String = "/uaf/1.1/request/registration/", registrationResponsePath: String = "/uaf/1.1/registration/", authenticationRequestPath: String = "/uaf/1.1/request/authentication/", authenticationResponsePath: String = "/uaf/1.1/authentication/", deregistrationRequestPath: String = "/uaf/1.1/request/deregistration/", dispatchTargetResourcePath: String = "/token/dispatch/targets/", deviceResourcePath: String = "/devices/", authenticationMaxRetries: Int = 3, authenticationRetryIntervalInSeconds: TimeInterval = 1.0, networkTimeoutInSeconds: TimeInterval = 60.0, userInteractionTimeoutInSeconds: TimeInterval = 240.0 )
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
. SeeregistrationRequestPath
.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
. SeeauthenticationRequestPath
.authenticationResponsePath
The deregistration request URL path used to obtain the FIDO UAF deregistration request. 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
. -
init(baseUrl:
registrationRequestPath: registrationResponsePath: authenticationRequestPath: authenticationResponsePath: deregistrationRequestPath: dispatchTargetResourcePath: deviceResourcePath: networkTimeoutInSeconds: userInteractionTimeoutInSeconds: ) This is the default initializer for the
Configuration
. If you are fine with the default parameters, you just need to provide the base URL.Declaration
Swift
public init( baseUrl: URL, registrationRequestPath: String = "/uaf/1.1/request/registration/", registrationResponsePath: String = "/uaf/1.1/registration/", authenticationRequestPath: String = "/uaf/1.1/request/authentication/", authenticationResponsePath: String = "/uaf/1.1/authentication/", deregistrationRequestPath: String = "/uaf/1.1/request/deregistration/", dispatchTargetResourcePath: String = "/token/dispatch/targets/", deviceResourcePath: String = "/devices/", networkTimeoutInSeconds: TimeInterval = 60.0, userInteractionTimeoutInSeconds: TimeInterval = 240.0 )
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
. SeeregistrationRequestPath
.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
. SeeauthenticationRequestPath
.authenticationResponsePath
The deregistration request URL path used to obtain the FIDO UAF deregistration request. 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
.networkTimeoutInSeconds
Time interval for network calls in seconds. See
networkTimeoutInSeconds
.userInteractionTimeoutInSeconds
The user interaction timeout in seconds. See
userInteractionTimeoutInSeconds
. -
init(authCloudHostname:
authenticationMaxRetries: authenticationRetryIntervalInSeconds: networkTimeoutInSeconds: 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, you just need to provide the hostname.
Declaration
Swift
@available(*, deprecated, message: "Use ``init(authCloudHostname:networkTimeoutInSeconds:userInteractionTimeoutInSeconds:`` instead") init(authCloudHostname: String, authenticationMaxRetries: Int = 3, authenticationRetryIntervalInSeconds: TimeInterval = 1.0, networkTimeoutInSeconds: TimeInterval = 60.0, userInteractionTimeoutInSeconds: TimeInterval = 240.0)
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, you just need to provide the hostname.
Declaration
Swift
init(authCloudHostname: String, networkTimeoutInSeconds: TimeInterval = 60.0, userInteractionTimeoutInSeconds: TimeInterval = 240.0)
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
.