UAACodeExchangeAuthenticationHandler
public class UAACodeExchangeAuthenticationHandler: AuthenticationHandler
A specialized AuthenticationHandler that works with an associated BrowserBasedAuthenticationHandler to exchange a UAA authorization code for authentication and refresh tokens.
-
Response payload from the associated
BrowserBasedAuthenticationHandlerDeclaration
Swift
override public var authenticationResponsePayload: [String: Any] -
URLSessionConfigurationto use for the authentication request. Defaults to URLSessionConfiguration.default.Declaration
Swift
public var sessionConfiguration = URLSessionConfiguration.default -
Response status code expected from the server if the authentication request was successful.
Declaration
Swift
public var serviceCallSucceededResponseCode = Http.StatusCode.ok -
Response status code expected from the server if the authentication request was unsuccessful.
Declaration
Swift
public var serviceCallFailedResponseCode = Http.StatusCode.unauthorized -
The AuthenticationManager associated with this
UAACodeExchangeAuthenticationHandlerDeclaration
Swift
public override weak var manager: AuthenticationManager? -
UAA Path to call to exchange an Authorization Code for access and refresh tokens
Declaration
Swift
public var codeExchangeURLPath = "/oauth/token" -
Convenience reference to manager’s configuration clientId value. Equal to self.manager?.configuration.clientId
Declaration
Swift
public var clientId: String? -
Convenience reference to manager’s configuration clientSecret value Equal to self.manager?.configuration.clientSecret
Declaration
Swift
public var clientSecret: String? -
Request headers to add to the authentication request
Declaration
Swift
public var requestHeaders: [String: String] = [:] -
The body encoding to use in the authentication request
See also: RequestBodyEncoding
-SeeAlso: RequestBodyEncoding
Declaration
Swift
public var requestBodyEncoding: RequestBodyEncoding
-
Initializes and returns a UAACodeExchangeAuthenticationHandler object
Declaration
Swift
public required init(handler: BrowserBasedAuthenticationHandler, code: String)Parameters
handlerrelated BrowserBasedAuthenticationHandler peforming initial
authorization code grant
type authentication.codeauthorization code retrieved during associated
BrowserBasedAuthenticationHandlerauthentication. This code will be exchanged for authentication and refresh tokens.
-
Declaration
Swift
open override func cancelAuthentication() -
Starts the authentication code-exchange process.
Called by the associated
BrowserBasedAuthenticationHandlerwhen needed.- completionHandler: closure called when authentication has completed.
- result: AuthenticateResult: Success or fail, result of authentication.
Declaration
Swift
override public func authenticate(completionHandler: @escaping (AuthenticateResult) -> Void)
View on GitHub
UAACodeExchangeAuthenticationHandler Class Reference