CLASS

DpopAccessTokenInfo

Contents

@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, 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.

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.