🔑 Customize your Json Web Tokens
Introduction​
What's a JWT​
About the Cryptr JWT​
- Access Token
- ID Token
- User Metadata
Soon : Organization & Application Metadata
Soon : Get a flatten version of your Custom JWT
Create new key values in your JWT​
- POST /api/v2/jwt-user-metakey/:organization_domain
- Created MetaKey 201 response
Query
curl -v -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Domain: ${YOUR_OWN_DOMAIN}" \
-d '{
{
"name": "department",
"type": "STRING",
"required": "true"
}
}' "https://${YOUR_CRYPTR_SERVICE_URL}/api/v2/jwt-user-metakey "
GET Application 200 response
{
"__type__": "MetaKey",
"__domain__": "misapret",
"name": "department",
"type": "STRING",
"required": "true"
}
Preview your JWT Customization​
- GET /api/v2/jwt-sample/:organization_domain
- Fetched JwtSample(s) 200 response
Query
curl -v -X DELETE \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Domain: ${YOUR_OWN_DOMAIN}" \
' "https://${YOUR_CRYPTR_SERVICE_URL}/api/v2/jwt-user-metakey "
GET JWT Samples 201 response
{
"__type__": "__JwtSamples__",
"__domain__": "misapret",
"access_token_jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
"access_token_keys": [
"name"
],
"access_token_jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
"access_token_keys": [
"name"
]
}
PARAMETERS​
domain ID
REQUIRED
​
The domain of the organization
RETURNS​
Access token and ID token samples with all keys for each.