OAuthToken

data class OAuthToken(val accessToken: String, val refreshToken: String, val keyPair: DpopKeyPair, val expiresIn: Duration, val scopes: List<OAuthScope>, val subject: Did, val nonce: String)

Represents an OAuth token received after a successful authorization or refresh request.

Parameters

accessToken

The access token used to authenticate API requests.

refreshToken

The refresh token used to obtain a new access token when the current one expires.

keyPair

The DPoP key pair used for signing requests.

expiresIn

The duration for which the access token is valid.

scopes

The list of scopes granted to the access token.

subject

The DID of the user account associated with the token.

nonce

A unique string to prevent replay attacks, typically used in conjunction with DPoP.

Constructors

Link copied to clipboard
constructor(accessToken: String, refreshToken: String, keyPair: DpopKeyPair, expiresIn: Duration, scopes: List<OAuthScope>, subject: Did, nonce: String)

Properties

Link copied to clipboard
Link copied to clipboard

The audience of the JWT, typically the DID of the PDS (Personal Data Server) that the token is intended for.

Link copied to clipboard

The unique identifier for the OAuth client.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val pds: Url

The URL of the PDS (Personal Data Server) associated with the audience.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard