Skip to main content

Token Endpoint

POST 

/auth/token

Users receive access tokens after they present a valid EBSI Verifiable Credential and prove ownership over their DID.

The Verifiable Presentation (and the credentials it carries) can follow either VCDM 1.1 or VCDM 2.0; the version is detected from the presented VP JWT, and a presentation can't mix versions:

  • VCDM 1.1: the presentation sits in the vp claim of the JWT (@context starting with https://www.w3.org/2018/credentials/v1) and its verifiableCredential entries are VC JWT strings (with a nested vc claim). Credentials are validated against the VCDM 1.1 trust model (IssuanceCertificate).
  • VCDM 2.0: the JWT header typ is vp+jwt and the payload is the presentation itself (@context starting with https://www.w3.org/ns/credentials/v2). Its verifiableCredential entries are EnvelopedVerifiableCredential objects whose id is data:application/vc+jwt,<VC JWT>, each VC JWT being a flat vc+jwt. Credentials are validated against the VCDM 2.0 trust model (AttestationPolicy, AccreditationPolicy and TrustFrameworkPolicy).

In both versions iss and holder are the holder's DID, and exp, iat, nbf, aud and nonce are top-level JWT claims. The iss and sub claims of the issued tokens are the presentation's holder.

VCDM 1.1 presentations are always accepted. VCDM 2.0 presentations are only accepted by the nodes that have enabled them: any other node rejects them with an invalid_request error whose description is VCDM 2.0 presentations are not supported.

Request​

Responses​

Success

Response Headers
    Cache-Control
    Pragma