Skip to content
English
  • There are no suggestions because the search field is empty.

Validate a credential and resolve the caller

POST /api/v1/auth/validate Select code sample Fetch cURL
const url = 'https://localhost:8080/api/v1/auth/validate';const options = {method: 'POST'};
try {  const response = await fetch(url, options);  const data = await response.json();  console.log(data);} catch (error) {  console.error(error);}
curl --request POST \  --url https://localhost:8080/api/v1/auth/validate

Validate an IDP JWT, an enriched JWT issued by this service, or an API key supplied via Authorization: Bearer , sync user data when applicable, and return the resolved user, organization, and permissions

Responses

Section titled “ Responses ”

200

Section titled “200 ”

Token is valid

Media type application/json object claims object key additional properties email string name string organization object id integer name string roles Array permissions Array userId string valid boolean
Example generated
{  "claims": {    "additionalProperty": "example"  },  "email": "example",  "name": "example",  "organization": {    "id": 1,    "name": "example",    "roles": [      "example"    ]  },  "permissions": [    "example"  ],  "userId": "example",  "valid": true}

401

Section titled “401 ”

Token is invalid or expired

Media type application/json object error string error_description string
Example
{  "error": "Unauthorized",  "error_description": "Invalid token"}

500

Section titled “500 ”

Internal server error

Media type application/json object error string error_description string
Example
{  "error": "Unauthorized",  "error_description": "Invalid token"}
Previous
Exchange or refresh an access token
Next
Create a DID key for a user