Skip to content

Validate a credential and resolve the caller

POST
/api/v1/auth/validate
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 <jwt_or_api_key>, sync user data when applicable, and return the resolved user, organization, and permissions

Token is valid

Media type application/json

The result of validating a token, describing the principal it authenticates

object
authType

API-key principals only

string
claims
object
key
additional properties
email
string
keyId

API-key principals only

string
keyScopes

API-key principals only

Array<string>
name
string
organization

The organization a validated token is scoped to, and the roles it carries there

object
id
integer
name
string
roles
Array<string>
permissions
Array<string>
userId
string
valid
boolean
Example generated
{
"authType": "example",
"claims": {
"additionalProperty": "example"
},
"email": "example",
"keyId": "example",
"keyScopes": [
"example"
],
"name": "example",
"organization": {
"id": 1,
"name": "example",
"roles": [
"example"
]
},
"permissions": [
"example"
],
"userId": "example",
"valid": true
}

Token is invalid or expired

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

Internal server error

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}