Validate a credential and resolve the caller
POST /api/v1/auth/validate Select code sample Fetch cURL
permissions Array
userId string
valid boolean
Exchange or refresh an access token Next
Create a DID key for a user
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
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 ArrayExample 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 stringExample
{ "error": "Unauthorized", "error_description": "Invalid token"}
500
Section titled “500 ”Internal server error
Media type application/json object error string error_description stringExample
{ "error": "Unauthorized", "error_description": "Invalid token"}
Previous Exchange or refresh an access token Next
Create a DID key for a user