Authorization

Create a new authorization request This endpoint creates a new authorization request record that will be used later in the token exchange process

post

Creates a new authorization request

Body

Request with presentation definition and security parameters

statestringRequired

Random string to prevent CSRF attacks

Example: abcdef12345678901234567890abcdef
noncestringRequired

Random string to ensure request uniqueness

Example: 1234567890abcdef1234567890abcdef
Responses
201
Created
application/json
post
POST /v1/authorizations HTTP/1.1
Host: api
Content-Type: application/json
Accept: */*
Content-Length: 243

{
  "presentation_definition": {
    "input_descriptors": [
      {
        "constraints": {
          "fields": [
            "[Circular Reference]"
          ],
          "limit_disclosure": "required"
        },
        "id": "text"
      }
    ],
    "id": "text"
  },
  "state": "abcdef12345678901234567890abcdef",
  "nonce": "1234567890abcdef1234567890abcdef"
}
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "presentation_definition": {
    "input_descriptors": [
      {
        "constraints": {
          "fields": [
            "[Circular Reference]"
          ],
          "limit_disclosure": "required"
        },
        "id": "text"
      }
    ],
    "id": "text"
  },
  "state": "abcdef12345678901234567890abcdef",
  "nonce": "1234567890abcdef1234567890abcdef",
  "expires_at": "2023-01-01T00:00:00Z",
  "code": "abc123",
  "holder_did": "did:empe:testnet:123456789abcdef",
  "used": false
}

Validate an authorization request with VP This endpoint is called by the client (wallet) to validate the authorization request. It validates the required parameters and the Verifiable Presentation against the associated presentation definition.

post

Validates an authorization request with a verifiable presentation

Path parameters
idstringRequired

The unique identifier of the authorization request

Body

Request with the VP, presentation submission, and security parameters

Responses
200
Validated
application/json
post
POST /v1/authorizations/{id}/validate HTTP/1.1
Host: api
Content-Type: application/json
Accept: */*
Content-Length: 1179

{
  "presentation_submission": {
    "descriptor_map": [
      {
        "path_nested": {
          "format": "text",
          "path": "text"
        },
        "format": "text",
        "path": "text",
        "id": "text"
      }
    ],
    "definition_id": "text",
    "id": "text"
  },
  "vp_token": {
    "proof": {
      "challange": "text",
      "nonce": "text",
      "jws": "text",
      "proofValue": "text",
      "proofPurpose": "assertionMethod",
      "verificationMethod": "text",
      "created": "text",
      "type": "EcdsaSecp256k1Signature2019"
    },
    "holder": "text",
    "id": "text",
    "verifiableCredential": [
      {
        "evidence": {},
        "credentialStatus": [
          {
            "id": "text",
            "type": "BitstringStatusListEntry",
            "statusPurpose": "refresh",
            "statusListIndex": 1,
            "statusListCredential": "text",
            "statusSize": 1,
            "statusMessage": [
              {
                "message": "text",
                "status": "text",
                "ANY_ADDITIONAL_PROPERTY": "anything"
              }
            ]
          }
        ],
        "credentialSchema": {
          "type": "JsonSchemaValidator2018",
          "id": "text"
        },
        "expirationDate": "text",
        "proof": {
          "challange": "text",
          "nonce": "text",
          "jws": "text",
          "proofValue": "text",
          "proofPurpose": "assertionMethod",
          "verificationMethod": "text",
          "created": "text",
          "type": "EcdsaSecp256k1Signature2019"
        },
        "credentialSubject": {
          "ANY_ADDITIONAL_PROPERTY": "anything"
        },
        "issuanceDate": "text",
        "issuer": {
          "name": "text",
          "id": "text"
        },
        "id": "text",
        "type": [
          "text"
        ],
        "@context": [
          "text"
        ]
      }
    ],
    "type": "text",
    "@context": [
      "text"
    ]
  }
}
{
  "code": "abc123def456"
}