8 Service APIs
This section provides a reference for APIs that should be implemented by this Building Block.
8.1 Credential Discovery
8.1.1. Credential Offer Endpoint
JSON encoded Credential Offer Object with the Credential Offer parameters. This MUST NOT be present when the credential_offer_uri parameter is present.
String that is a URL using the https scheme referencing a resource containing a JSON object with the Credential Offer parameters. This MUST NOT be present when the credential_offer parameter is present.
The Wallet does not create a response for Credential Offer Endpoint. The UX control stays with the Wallet after completion of the process.
The Wallet does not create a response for Credential Offer Endpoint. The UX control stays with the Wallet after completion of the process.
No content
8.1.2. Credential Issuer Metadata
8.2. Credential Issuance
8.2.1. Authorization Endpoint
The value set here determines the authorization processing flow. To use the authorization code flow, the value should be configured to "code".
Specifies what access privileges are being requested for Access Tokens. The scopes associated with Access Tokens determine what resources will be available when they are used to access OAuth 2.0 protected endpoints. OpenID Connect requests MUST contain the OpenID scope value.
Valid OAuth 2.0 client identifier in the authorization server.
Redirection URI to which the response would be sent. This URI must match one of the redirection URI values during the client ID creation.
A challenge derived from the code_verifier, This is required if its a VC scoped request.
The method of challenge this will be 'plain' or 'S256' depending on whether the challenge is the plain verifier string or the SHA256 hash of the string.
MUST be used to convey the details about the Credentials the Wallet wants to obtain when sent from the issuer to wallet. For details on authorization details click here.
OK
Loads JS application, and validates the provided query parameters using oauth-details endpoint.
Once the Holder is successfully authenticated, the authorization_code is shared in the query parameter of the redirect_uri mentioned in the authorization request.
Found
If the request fails due to a missing, invalid, or mismatching redirection URI, or if the client identifier is missing or invalid, the authorization server SHOULD inform the Holder of the error and MUST NOT automatically redirect the user-agent to the invalid redirection URI.
The authorization server informs the client by adding the following
parameters to the query component of the redirection URI using the
application/x-www-form-urlencoded format.
invalid_request: The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.unauthorized_client: The client is not authorized to request an authorization code using this method.access_denied: The resource owner or authorization server denied the request.unsupported_response_type: The authorization server does not support obtaining an authorization code using this method.invalid_scope: The requested scope is invalid, unknown, or malformed.server_error: The authorization server encountered an unexpected condition that prevented it from fulfilling the request. (This error code is needed because a 500 Internal Server Error HTTP status code cannot be returned to the client via an HTTP redirect.)temporarily_unavailable: The authorization server is currently unable to handle the request due to a temporary overloading or maintenance of the server. (This error code is needed because a 503 Service Unavailable HTTP status code cannot be returned to the client via an HTTP redirect.)
No content
8.2.2. Token Endpoint
Authorization code grant type.
authorization_codefor authorization code flowurn:ietf:params:oauth:grant-type:pre-authorized_codefor pre-authorized code flow
Authorization code, sent as query param in the wallet's redirect URI. This parameter MUST only be used if the grant_type is authorization_code.
REQUIRED, if the "redirect_uri" parameter was included in the authorization request, and their values MUST be identical.
The code representing the authorization to obtain Credentials of a certain type. This parameter MUST be present if the grant_type is urn:ietf:params:oauth:grant-type:pre-authorized_code.
String value containing a Transaction Code. This parameter MUST only be used if the grant_type is urn:ietf:params:oauth:grant-type:pre-authorized_code.
REQUIRED, if the client is not authenticating with the authorization server.
OK
Bad Request
Unauthorized
8.2.3. Credential Endpoint
REQUIRED when the credential_identifiers parameter was not returned from the Token Response. It MUST NOT be used otherwise. It is a String that determines the format of the Credential to be issued, which may determine the type and any other information related to the Credential to be issued. When this parameter is used, the credential_identifier Credential Request parameter MUST NOT be present.
REQUIRED when credential_identifiers parameter was returned from the Token Response. It MUST NOT be used otherwise. It is a String that identifies a Credential that is being requested to be issued.
This is a string identifying the Credential type, as defined in ISO.18013-5.
It is required when the credential format identifier is set as mso_mdoc.
This is required when the format parameter is present in the Credential Meta Information. It is a string designating the type of a Credential, as defined in I-D.ietf-oauth-sd-jwt-vc. This claim contains the type value of the Credential that the Wallet requests the Credential Issuer to issue.
OK
Bad Request
8.2.4. Batch Credential Endpoint
OK
A successful Batch Credential Response MUST contain all the requested Credentials. The Batch Credential Response MUST be sent as a JSON object using the application/json media type.
OK
A successful Batch Credential Response MUST contain all the requested Credentials. The Batch Credential Response MUST be sent as a JSON object using the application/json media type.
8.2.5. Deffered Credential Endpoint
8.2.6. Notification Endpoint
String received in the Credential Response or the Batch Credential Response.
Type of the notification event. It MUST be a case sensitive string whose value is either credential_accepted, credential_failure, or credential_deleted.
credential_acceptedis to be used when the Credential was successfully stored in the Wallet, with or without user action.credential_deletedis to be used when the unsuccessful Credential issuance was caused by a user action.- In all other unsuccessful cases,
credential_failureis to be used.
Human-readable ASCII text providing additional information, used to assist the Credential Issuer developer in understanding the event that occurred. Values for the event_description parameter MUST NOT include characters outside the set %x20-21 / %x23-5B / %x5D-7E.
No Content
When the Credential Issuer has successfully received the Notification Request from the Wallet, it MUST respond with an HTTP status code in the 2xx range. Use of the HTTP status code 204 (No Content) is RECOMMENDED.
Bad Request
Success
When the Credential Issuer has successfully received the Notification Request from the Wallet, it MUST respond with an HTTP status code in the 2xx range. Use of the HTTP status code 204 (No Content) is RECOMMENDED.
No content
8.3 Credential Presentations
8.3.1 Authorization Request
A string containing a Presentation Definition JSON object. This parameter MUST be present when presentation_definition_uri parameter, or a scope value representing a Presentation Definition is not present.
A string containing an HTTPS URL pointing to a resource where a Presentation Definition JSON object can be retrieved. This parameter MUST be present when presentation_definition parameter, or a scope value representing a Presentation Definition is not present.
A string identifying the scheme of the value in the client_id Authorization Request parameter (Client Identifier scheme). The client_id_scheme parameter namespaces the respective Client Identifier. If an Authorization Request uses the client_id_scheme parameter, the Wallet MUST interpret the Client Identifier of the Verifier in the context of the Client Identifier scheme. If the parameter is not present, the Wallet MUST behave as specified in RFC6749. If the same Client Identifier is used with different Client Identifier schemes, those occurrences MUST be treated as different Verifiers. Note that the Verifier needs to determine which Client Identifier schemes the Wallet supports prior to sending the Authorization Request in order to choose a supported scheme.
A JSON object containing the Verifier metadata values. It MUST be UTF-8 encoded.
A string determining the HTTP method to be used when the request_uri parameter is included in the same request. Two case-sensitive valid values are defined in this specification: get and post. If request_uri_method value is get, the Wallet MUST send the request to retrieve the Request Object using the HTTP GET method, i.e., as defined in RFC9101. If request_uri_method value is post, a supporting Wallet MUST send the request using the HTTP POST method. If the request_uri_method parameter is not present, the Wallet MUST process the request_uri parameter as defined in RFC9101. Wallets not supporting the post method will send a GET request to the Request URI (default behavior as defined in RFC9101). request_uri_method parameter MUST NOT be present if a request_uri parameter is not present.
It is used to securely bind the Verifiable Presentation(s) provided by the Wallet to the particular transaction. Values MUST only contain ASCII URL safe characters (uppercase and lowercase letters, decimal digits, hyphen, period, underscore, and tilde).
Defined in RFC6749. The Wallet MAY allow Verifiers to request presentation of Verifiable Credentials by utilizing a pre-defined scope value.
This parameter is used (through the new Response Mode direct_post) to ask the Wallet to send the response to the Verifier via an HTTPS connection. It is also used to request signing and encrypting. If the parameter is not present, the default value is fragment.
OK
OK