ProtocolRequest

sealed class ProtocolRequest(source)

Every HTTP request the OAuth 2.0, OpenID4VCI and OpenID4VP protocol clients hand out, see at.asitplus.wallet.lib.oauth2.OAuth2ProtocolClient and at.asitplus.wallet.lib.openid.OpenId4VpProtocolClient. Each method returning an HttpExchange documents which of these kinds it sends, in which order, and how often. Requests that are retried are Retryable.

Inheritors

Types

Link copied to clipboard

POST to the challenge_endpoint of the authorization server, to get an attestation challenge.

Link copied to clipboard

POST an OpenID4VP authorization response, or authorization error response, as form to the response_uri of the verifier, for the response modes direct_post and direct_post.jwt.

Link copied to clipboard
data class AuthorizationServerMetadata(val http: PreparedHttpRequest, val openidConfiguration: Boolean) : ProtocolRequest

GET the authorization server metadata from /.well-known/oauth-authorization-server, or, as a fallback, from /.well-known/openid-configuration (then openidConfiguration is true).

Link copied to clipboard
data class Credential(val http: PreparedHttpRequest, val attempt: Int) : ProtocolRequest.Retryable

POST a credential request to the credential_endpoint, with the access token.

Link copied to clipboard

GET the credential issuer metadata from /.well-known/openid-credential-issuer.

Link copied to clipboard

GET the credential offer from the credential_offer_uri of a credential offer passed by reference.

Link copied to clipboard
data class Nonce(val http: PreparedHttpRequest) : ProtocolRequest

POST to the nonce_endpoint of the credential issuer.

Link copied to clipboard

POST a pushed authorization request to the pushed_authorization_request_endpoint, with client authentication.

Link copied to clipboard

GET the request object from the request_uri of an OpenID4VP authorization request, or POST wallet_metadata and wallet_nonce to it as form, for request_uri_method=post.

Link copied to clipboard
sealed class Retryable : ProtocolRequest

A request with client authentication or an access token, sent again with fresh authentication headers when the server asks for a DPoP nonce (RFC 9449, 8 and 9) or an attestation challenge (draft-ietf-oauth-attestation-based-client-auth-10, 6.2). attempt starts at 0 for the first attempt of a request, and is increased for each retry of the same request. A fallback to another request, e.g. AuthorizationServerMetadata with AuthorizationServerMetadata.openidConfiguration, is not a retry.

Link copied to clipboard
data class Token(val http: PreparedHttpRequest, val attempt: Int) : ProtocolRequest.Retryable

POST a token request to the token_endpoint, with client authentication.

Link copied to clipboard

POST a token introspection request to the introspection_endpoint, with client authentication.

Link copied to clipboard
data class UserInfo(val http: PreparedHttpRequest, val attempt: Int) : ProtocolRequest.Retryable

GET the userinfo_endpoint, with the access token.

Properties

Link copied to clipboard