createCredentialRequest
Send the result as JSON-serialized content to the server at /credential
(or more specific IssuerMetadata.credentialEndpointUrl).
Also send along the TokenResponseParameters.accessToken from the token response in HTTP header Authorization
as value Bearer accessTokenValue
(depending on the TokenResponseParameters.tokenType). See createTokenRequestParameters.
Sample ktor code:
val credentialRequest = client.createCredentialRequestJwt(
requestOptions = requestOptions,
clientNonce = token.clientNonce,
credentialIssuer = issuerMetadata.credentialIssuer
).getOrThrow()
val credentialResponse = httpClient.post(issuerMetadata.credentialEndpointUrl) {
setBody(credentialRequest)
headers {
append(HttpHeaders.Authorization, "Bearer ${token.accessToken}")
}
}
Parameters
which credential from IssuerMetadata.supportedCredentialConfigurations to request
attributes that shall be requested explicitly (selective disclosure)
c_nonce
from the token response, optional string, see TokenResponseParameters.clientNonce
credential_issuer
from the metadata, see IssuerMetadata.credentialIssuer
Send the result as JSON-serialized content to the server at /credential
(or more specific IssuerMetadata.credentialEndpointUrl).
Also send along the TokenResponseParameters.accessToken from the token response in HTTP header Authorization
as value Bearer accessTokenValue
(depending on the TokenResponseParameters.tokenType). See createTokenRequestParameters.
Sample ktor code:
val credentialRequest = client.createCredentialRequestJwt(
requestOptions = requestOptions,
clientNonce = token.clientNonce,
credentialIssuer = issuerMetadata.credentialIssuer
).getOrThrow()
val credentialResponse = httpClient.post(issuerMetadata.credentialEndpointUrl) {
setBody(credentialRequest)
headers {
append(HttpHeaders.Authorization, "Bearer ${token.accessToken}")
}
}
Parameters
which credential in which representation to request
c_nonce
from the token response, optional string, see TokenResponseParameters.clientNonce
credential_issuer
from the metadata, see IssuerMetadata.credentialIssuer