OAuth2AuthorizationServerAdapter

Used in OID4VCI by CredentialIssuer to obtain user data when issuing credentials using OID4VCI.

Could also be a remote service, then implementers need to make calls to the remote service.

Inheritors

Properties

Link copied to clipboard
abstract val publicContext: String

Used in several fields in at.asitplus.openid.IssuerMetadata, to provide endpoint URLs to clients.

Functions

Link copied to clipboard
abstract suspend fun getDpopNonce(): String?

If this is an internal AS, provide a fresh DPoP nonce for clients.

Link copied to clipboard
abstract suspend fun getTokenInfo(authorizationHeader: String, httpRequest: RequestInfo?): KmmResult<TokenInfo>

Obtains information about the token, either by performing token introspection, or by decoding the access token directly (if it is an at.asitplus.wallet.lib.oauth2.OpenId4VciAccessToken).

Link copied to clipboard
abstract suspend fun getUserInfo(authorizationHeader: String, httpRequest: RequestInfo?): KmmResult<JsonObject>

Obtains a JSON object representing at.asitplus.openid.OidcUserInfo from the Authorization Server, with the wallet's access token in authorizationHeader (which the implementation may need to exchange at the AS first).

Link copied to clipboard

Provide necessary OAuth2AuthorizationServerMetadata JSON for a client to be able to authenticate.

Link copied to clipboard
abstract suspend fun validateAccessToken(authorizationHeader: String, httpRequest: RequestInfo?): KmmResult<Boolean>

Validates the access token sent to CredentialIssuer.credential.