createCredential
Creates the credential request to be sent to the credential issuer. Send each request with OpenId4VciProtocolClient.credentialRequest, which adds the access token from tokenResponse and, for DPoP-bound tokens, the DPoP proof, and parses the response.
Creates all requests with the same clientNonce. With a credential issuer that accepts each c_nonce only once, use prepareCredentialRequests, and create each request with its own c_nonce with the overload accepting a PreparedCredentialRequest instead.
Parameters
from the authorization server token endpoint
the issuer's metadata, see IssuerMetadata
which credential to request (needed to build the correct proof)
if required by the issuer (see IssuerMetadata.nonceEndpointUrl), the value from there, exactly ClientNonceResponse.clientNonce
the scope value requested in the token request, since the authorization server may not set it in tokenResponse
the client_id of the OAuth 2.0 client, used as the issuer of proof JWTs
Creates the credential request for exactly one credential, to be sent to the credential issuer. Send it with OpenId4VciProtocolClient.credentialRequest, which adds the access token and, for DPoP-bound tokens, the DPoP proof, and parses the response.
Only use this when the token response did not contain credential_identifiers in its authorization_details, because then credential_configuration_id MUST NOT be used (OID4VCI 1.0 Section 8.2), see CredentialRequestParameters.credentialConfigurationId. Otherwise, use the overload accepting TokenResponseParameters.
Parameters
the issuer's metadata, see IssuerMetadata
the exact credential_configuration_id to request, one of the keys from IssuerMetadata.supportedCredentialConfigurations
if required by the issuer (see IssuerMetadata.nonceEndpointUrl), the value from there, exactly ClientNonceResponse.clientNonce
the client_id of the OAuth 2.0 client, used as the issuer of proof JWTs
Creates the credential request for request, prepared with prepareCredentialRequests, with a proof for its PreparedCredentialRequest.credentialFormat (see ProofCreator) and, if the credential issuer supports it, the encryption of request and response (OpenID4VCI 1.0, 10). Create it right before sending it with OpenId4VciProtocolClient.credentialRequest, each with a fresh clientNonce, as the credential issuer decides how long a c_nonce can be used (13.8), and may accept each one only once.
Parameters
one of the requests from prepareCredentialRequests
the issuer's metadata, see IssuerMetadata
if required by the issuer (see IssuerMetadata.nonceEndpointUrl), the value from there, exactly ClientNonceResponse.clientNonce
the client_id of the OAuth 2.0 client, used as the issuer of proof JWTs