Mapping from JWT Claims
Inject user or tenant claims into upstream requests after the gateway verifies the token. Any standard or custom JWT claim is available via
When to use this
Key concepts
Repo-grounded example
{
"variables": { "region": "eu-west-1" },
"paths": [
{
"method": "GET",
"path": "/proxy/{.+}",
"auth": true,
"integration": { "type": "http_proxy", "server": "upstream" },
"mapping": {
"headers": {
"x-user-id": "$request.jwt.sub",
"x-region": "$config.region"
},
"query": {
"source": "$request.query.source"
}
},
"variables": { "api_key": "internal-key" }
}
]
}Troubleshooting
Related docs
Last updated