CLASS
DpopAccessTokenInfo
Contents
- Properties
accessTokendpopdpopNoncedescriptiondebugDescription
- Methods
dpopHeaderValue(httpMethod:url:)authorizationHeaderValue()isEqual(_:)
@objcMembers public class DpopAccessTokenInfo: NSObject
A data class that holds an AccessToken, a Dpop instance and also an optional String representation for a Dpop Nonce
when provided by the server.
Properties
accessToken
public let accessToken: AccessToken
An AccessToken instance
dpop
public let dpop: Dpop
An Dpop instance
dpopNonce
public let dpopNonce: String?
An String instance that represents the most recent DPoP nonce. Any Identity Server response may contain a
DPoP-Nonce header with a nonce string. This nonce needs be provided to all subsequent calls to the server.
description
override public var description: String
Return a String representation of the DpopAccessTokenInfo instance.
debugDescription
override public var debugDescription: String
Return a String representation of the DpopAccessTokenInfo instance, for example to be used for debugging.
Methods
dpopHeaderValue(httpMethod:url:)
public func dpopHeaderValue(httpMethod: String, url: URL) throws -> String
Return the value that can be used for the DPoP HTTP request header, based on the instance's dpop field.
-
Parameter httpMethod: the HTTP method to calculate the DPoP proof token for
-
Parameter url: the URL to calculate the DPoP proof token for,
-
Returns: a String value with the
DPoPproof token value -
Throws:
CryptoErrorexception when theDPoPproof token could not be generated due to a cryptograhic error
Parameters
| Name | Description |
|---|---|
| httpMethod | the HTTP method to calculate the DPoP proof token for |
| url | the URL to calculate the DPoP proof token for, |
authorizationHeaderValue()
public func authorizationHeaderValue() -> String
Calculate the value that can be used when the DPoP-bound Access Token is to be included in the Authorization HTTP request header.
- Returns: the value that can be used in a
AuthorizationHeaderHTTP request header.
isEqual(_:)
override public func isEqual(_ object: Any?) -> Bool