CLASS

HaapiConfiguration

Contents

public final class HaapiConfiguration: 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

isAutoRedirect

public let isAutoRedirect: Bool

urlSession

public let urlSession: URLSession

revocationEndpointURL

public let revocationEndpointURL: URL?

Methods

init(name:clientId:baseURL:tokenEndpointURL:authorizationEndpointURL:appRedirect:isAutoRedirect:urlSession:revocationEndpointURL:)

public init(name: String,
            clientId: String,
            baseURL: URL,
            tokenEndpointURL: URL,
            authorizationEndpointURL: URL,
            appRedirect: String,
            isAutoRedirect: Bool = true,
            urlSession: URLSession = URLSession(configuration: .haapi),
            revocationEndpointURL: URL? = nil)

Creates a HaapiConfiguration with the specified parmeters.

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)
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.