Skip to content

Enrich JWT claims with user context and ensure DID key

POST
/api/v1/auth/claims-enrichment
curl --request POST \
--url https://localhost:8080/api/v1/auth/claims-enrichment \
--header 'Content-Type: application/json' \
--data '{ "attributes": { "additionalProperty": "example" }, "email": "example", "groups": [ "example" ], "name": "example", "picture": "example", "provider": "keycloak", "user_id": "example" }'

Called by IDP Actions/Hooks to provision the user, return organization/project/role custom claims for the JWT, and create a DID key when one is missing

User information

Media type application/json
object
attributes

Keycloak only; diagnostics only

object
key
additional properties
string
email
required
string
groups

Keycloak only; adds the groups claim

Array<string>
name
string
picture
string
provider

Defaults to auth0

string
Allowed values: keycloak auth0 entra okta generic
user_id
required
string

Custom claims to add to JWT (includes did_key_id if available)

Media type application/json

The custom claims the IDP should add to the token it is minting

object
custom_claims
object
key
additional properties
Example generated
{
"custom_claims": {
"additionalProperty": "example"
}
}

Bad request - Invalid request body

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"
}

Unauthorized - Invalid API secret

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"
}