credential

suspend fun credential(authorizationHeader: String, params: OpenId4VciClient.CredentialRequest, credentialDataProvider: CredentialDataProviderFun, request: RequestInfo? = null): KmmResult<OpenId4VciServer.CredentialResponse>(source)

Verifies the authorizationHeader to contain a token from authorizationService, verifies the proof sent by the client (must contain a nonce sent from authorizationService), and issues credentials to the client by calling credentialDataProvider.

Send the result converted with toHttpResponse.

Return

If the result is an instance of OAuth2Exception, send it converted with at.asitplus.wallet.lib.oauth2.toResourceServerHttpResponse, passing authorizationHeader

Parameters

authorizationHeader

value of HTTP header Authorization sent by the client, with all prefixes

params

Parameters the client sent in the HTTP body, either JSON serialized or as a string, see WalletService.CredentialRequest.parse

credentialDataProvider

Extract data from the authenticated user and prepares it for issuing

request

information about the HTTP request the client has made, to validate authentication