Token Endpoint (OpenID4VCI)
The POST request to the token endpoint issues access tokens for credential issuance. This endpoint is an OAuth 2.0 endpoint that supports grant types for OpenID4VCI credential issuance flows.
Endpoint
POST /tokenThe URL for this endpoint is provided in the Credential Issuer Metadata (see Credential Issuer Metadata). This endpoint may be the same as the standard iSHARE token endpoint but supports additional grant types for credential issuance flows.
Request model
The request body MUST be sent as application/x-www-form-urlencoded and contain the following parameters:
grant_typeString. (Required) OAuth 2.0 grant type. For OpenID4VCI, supported values include:authorization_code: Used when the holder has obtained an authorization codepre-authorized_code: Used when a pre-authorized code has been provided
codeString. The authorization code received from the authorization endpoint. Required whengrant_typeisauthorization_code.pre-authorized_codeString. The pre-authorized code provided by the issuer. Required whengrant_typeispre-authorized_code.client_idString. The client identifier. Within iSHARE, this MUST contain a valid Party Identifier when applicable.client_assertion_typeString. Client assertion type. Within iSHARE, MUST be equal tourn:ietf:params:oauth:client-assertion-type:jwt-bearerwhen using client assertion authentication.client_assertionString (JWT). Client assertion JWT. Within iSHARE, MUST contain a JWT token conforming to iSHARE specifications when using client assertion authentication.redirect_uriString. The redirect URI used in the authorization request. Required whengrant_typeisauthorization_code.
Example request
POST /token
Host: credential-issuer.ishare.eu
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code&
code=SplxlOBeZQQYbYS6WxSbIA&
redirect_uri=https://wallet.example.com/cb&
client_id=did:ishare:EU.NL.NTRLNL-10000001&
client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&
client_assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...Response model
The response is a JSON object containing:
access_tokenString. (Required) The access token issued by the authorization server.token_typeString. (Required) The token type. MUST beBearer.expires_inInteger. The lifetime in seconds of the access token.c_nonceString. A nonce to be used in the credential request for proof of possession.c_nonce_expires_inInteger. The lifetime in seconds of thec_nonce.scopeString. The scope of the access token.
Example response
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer",
"expires_in": 3600,
"c_nonce": "8Xz5r4k3m2",
"c_nonce_expires_in": 300
}iSHARE-Specific Requirements
Within iSHARE, the following requirements apply:
Clients (holder applications) MUST NOT be pre-registered. A look-up in the Participant Registry is sufficient.
The
client_idMUST contain a valid Party Identifier when applicable.Client authentication using
client_assertion(JWT) MUST be supported and MUST conform to iSHARE JWT specifications.The certificate used to sign the
client_assertionMUST be validated according to iSHARE certificate validation requirements (see Authentication).
Last updated