CLASS
HaapiConfiguration
Contents
- Properties
name
clientId
baseURL
tokenEndpointURL
authorizationEndpointURL
appRedirect
httpHeadersProvider
isAutoRedirect
urlSession
revocationEndpointURL
authorizationParametersProvider
minTokenTtl
attestationConfiguration
tokenBoundConfiguration
tokenEndpointResponseListener
clientAuthenticationMethod
applicationBundle
- Methods
init(name:clientId:baseURL:tokenEndpointURL:authorizationEndpointURL:appRedirect:httpHeadersProvider:authorizationParametersProvider:isAutoRedirect:urlSession:revocationEndpointURL:minTokenTtl:attestationConfiguration:tokenBoundConfiguration:tokenEndpointResponseListener:clientAuthenticationMethod:applicationBundle:)
@objcMembers public final class HaapiConfiguration: NSObject, HaapiConfigurable, OAuthTokenConfigurable
Configuration options for the library.
Properties
name
public let name: String
clientId
public let clientId: String
baseURL
public let baseURL: URL
tokenEndpointURL
public let tokenEndpointURL: URL
authorizationEndpointURL
public let authorizationEndpointURL: URL
appRedirect
public let appRedirect: String
httpHeadersProvider
public let httpHeadersProvider: HttpHeadersProvider?
isAutoRedirect
public let isAutoRedirect: Bool
urlSession
public let urlSession: URLSession
revocationEndpointURL
public let revocationEndpointURL: URL?
authorizationParametersProvider
public let authorizationParametersProvider: OAuthAuthorizationParametersProvider?
minTokenTtl
public let minTokenTtl: TimeInterval
attestationConfiguration
public let attestationConfiguration: AttestationConfiguration
tokenBoundConfiguration
public let tokenBoundConfiguration: TokenBoundConfiguration
tokenEndpointResponseListener
public let tokenEndpointResponseListener: (any OAuthTokenManager.TokenEndpointResponseListener)?
clientAuthenticationMethod
public let clientAuthenticationMethod: ClientAuthenticationMethod
applicationBundle
public let applicationBundle: Bundle?
Methods
init(name:clientId:baseURL:tokenEndpointURL:authorizationEndpointURL:appRedirect:httpHeadersProvider:authorizationParametersProvider:isAutoRedirect:urlSession:revocationEndpointURL:minTokenTtl:attestationConfiguration:tokenBoundConfiguration:tokenEndpointResponseListener:clientAuthenticationMethod:applicationBundle:)
@objc public init(name: String,
clientId: String,
baseURL: URL,
tokenEndpointURL: URL,
authorizationEndpointURL: URL,
appRedirect: String,
httpHeadersProvider: HttpHeadersProvider?,
authorizationParametersProvider: OAuthAuthorizationParametersProvider?,
isAutoRedirect: Bool = true,
urlSession: URLSession = URLSession(configuration: .haapi),
revocationEndpointURL: URL? = nil,
minTokenTtl: TimeInterval = TimeInterval(floatLiteral: 10.0),
attestationConfiguration: AttestationConfiguration = AttestationConfiguration(),
tokenBoundConfiguration: TokenBoundConfiguration = UnboundedTokenConfiguration(),
tokenEndpointResponseListener: (any OAuthTokenManager.TokenEndpointResponseListener)? = nil,
clientAuthenticationMethod: ClientAuthenticationMethod = ClientAuthenticationMethodNone(),
applicationBundle: Bundle? = nil)
Creates a HaapiConfiguration with the specified parmeters.
- Parameters:
- name: The name of the configuration. This value should be unique for each
HaapiManager
. Otherwise, the application will terminate. - clientId: The client ID as configured in the Curity Identity Server. configuration.
- baseURL: The base
URL
of the Curity Identity Server. Used to resolve relative links. Not the issuer ID. - tokenEndpointURL: The token endpoint URL.
- authorizationEndpointURL: The authorization endpoint URL.
- appRedirect: The client application's redirect URI, used in authorization requests. (Deep link)
- httpHeadersProvider: An optional closure that produces the headers parameters that will be used when haapi endpoints.
- authorizationParametersProvider: An optional closure that produces the authorization parameters to send in Authorization requests.
- isAutoRedirect: Whether
HaapiManager
will automatically follow redirection steps. By default, the value istrue
. - urlSession: The
URLSession
that is used to perform network requests. By default, the value isURLSessionConfiguration.haapi
. - revocationEndpointURL: The token revocation endpoint URL.
- minTokenTtl: The minimum TTL a token must have to be able to be used in a request. By default, the value is 10 seconds.
- attestationConfiguration: Configures the
DeviceCheck
attestation mechanism. By default, attestation is enabled and max retries is 3. - tokenBoundConfiguration: Configures the Token Endpoint
Dpop
binding mechanism behaviour for the client configuration. The default value isUnboundedTokenConfiguration
. - tokenEndpointResponseListener: The listener to notify when receiving a response from the token endpoint. The default value is
nil
. - clientAuthenticationMethod: The client authentication method configuration to use. By default, it is set to
ClientAuthenticationMethodConfigurationNone
. - applicationBundle: When the client configuration for
Haapi
integerates theBankID
services with the risk assessment feature, theBundle
is required to enable collection of contextual information about the device.
- name: The name of the configuration. This value should be unique for each
- Important: Omitting the bundle while using the risk assessment functionaly may lead to undesired behaviour and prevent its correct usage. Server support for the risk assessment functionality integration requires a version of the Curity Identity Server starting from 9.7.0.
Parameters
Name | Description |
---|---|
name | The name of the configuration. This value should be unique for each HaapiManager . Otherwise, the application will terminate. |
clientId | The client ID as configured in the Curity Identity Server. configuration. |
baseURL | The base URL of the Curity Identity Server. Used to resolve relative links. Not the issuer ID. |
tokenEndpointURL | The token endpoint URL. |
authorizationEndpointURL | The authorization endpoint URL. |
appRedirect | The client application’s redirect URI, used in authorization requests. (Deep link) |
httpHeadersProvider | An optional closure that produces the headers parameters that will be used when haapi endpoints. |
authorizationParametersProvider | An optional closure that produces the authorization parameters to send in Authorization requests. |
isAutoRedirect | Whether HaapiManager will automatically follow redirection steps. By default, the value is true . |
urlSession | The URLSession that is used to perform network requests. By default, the value is URLSessionConfiguration.haapi . |
revocationEndpointURL | The token revocation endpoint URL. |
minTokenTtl | The minimum TTL a token must have to be able to be used in a request. By default, the value is 10 seconds. |
attestationConfiguration | Configures the DeviceCheck attestation mechanism. By default, attestation is enabled and max retries is 3. |
tokenBoundConfiguration | Configures the Token Endpoint Dpop binding mechanism behaviour for the client configuration. The default value is UnboundedTokenConfiguration . |
tokenEndpointResponseListener | The listener to notify when receiving a response from the token endpoint. The default value is nil . |
clientAuthenticationMethod | The client authentication method configuration to use. By default, it is set to ClientAuthenticationMethodConfigurationNone . |
applicationBundle | When the client configuration for Haapi integerates the BankID services with the risk assessment feature, the Bundle is required to enable collection of contextual information about the device. |