TokenResponseParameters

@Serializable
data class TokenResponseParameters(val accessToken: String, val refreshToken: String? = null, val tokenType: String, val expires: Duration, val scope: String? = null, val clientNonce: String? = null, val clientNonceExpiresIn: Duration? = null, val authorizationPending: Boolean? = null, val interval: Duration? = null, val authorizationDetails: Set<AuthorizationDetails>? = null)(source)

Constructors

Link copied to clipboard
constructor(accessToken: String, refreshToken: String? = null, tokenType: String, expires: Duration, scope: String? = null, clientNonce: String? = null, clientNonceExpiresIn: Duration? = null, authorizationPending: Boolean? = null, interval: Duration? = null, authorizationDetails: Set<AuthorizationDetails>? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@SerialName(value = "access_token")
val accessToken: String

RFC6749: REQUIRED. The access token issued by the authorization server.

Link copied to clipboard
@SerialName(value = "authorization_details")
val authorizationDetails: Set<AuthorizationDetails>? = null

OID4VP: REQUIRED when authorization_details parameter is used to request issuance of a certain Credential type. It MUST NOT be used otherwise.

Link copied to clipboard
@SerialName(value = "authorization_pending")
val authorizationPending: Boolean? = null

OID4VCI: OPTIONAL, In the Pre-Authorized Code Flow, the Token Request is still pending as the Credential Issuer is waiting for the End-User interaction to complete. The client SHOULD repeat the Token Request. Before each new request, the client MUST wait at least the number of seconds specified by the interval response parameter.

Link copied to clipboard
@SerialName(value = "c_nonce")
val clientNonce: String? = null

OID4VCI: OPTIONAL String containing a nonce to be used to create a proof of possession of key material when requesting a Credential. When received, the Wallet MUST use this nonce value for its subsequent credential requests until the Credential Issuer provides a fresh nonce.

Link copied to clipboard
@SerialName(value = "c_nonce_expires_in")
val clientNonceExpiresIn: Duration? = null

OID4VCI: OPTIONAL JSON integer denoting the lifetime in seconds of the clientNonce.

Link copied to clipboard
@SerialName(value = "expires_in")
val expires: Duration

RFC6749: RECOMMENDED. The lifetime in seconds of the access token. For example, the value "3600" denotes that the access token will expire in one hour from the time the response was generated. If omitted, the authorization server SHOULD provide the expiration time via other means or document the default value.

Link copied to clipboard
@SerialName(value = "interval")
val interval: Duration? = null

OID4VCI: OPTIONAL, the minimum amount of time in seconds that the client SHOULD wait between polling requests to the Token Endpoint in the Pre-Authorized Code Flow. If no value is provided, clients MUST use 5 as the default.

Link copied to clipboard
@SerialName(value = "refresh_token")
val refreshToken: String? = null

RFC6749: OPTIONAL. The refresh token, which can be used to obtain new access tokens using the same authorization grant.

Link copied to clipboard
@SerialName(value = "scope")
val scope: String? = null

RFC6749: OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED.

Link copied to clipboard
@SerialName(value = "token_type")
val tokenType: String

RFC6749: REQUIRED. The type of the token issued as described in Section 7.1. Value is case insensitive.

Functions

Link copied to clipboard