credential

suspend fun credential(authorizationHeader: String, params: WalletService.CredentialRequest, credentialDataProvider: CredentialDataProviderFun, request: RequestInfo? = null): KmmResult<CredentialIssuer.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.

Callers need to send the result as HTTP status code 200 back to the client, see CredentialResponse.

Return

If the result is an instance of OAuth2Exception send OAuth2Exception.toOAuth2Error back to the client, except for instances of OAuthAuthorizationError

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


suspend fun credential(authorizationHeader: String, params: CredentialRequestParameters, credentialDataProvider: CredentialDataProviderFun, request: RequestInfo? = null): KmmResult<CredentialResponseParameters>(source)

Deprecated

Use [credential] with [WalletService.CredentialRequest] instead