// Example pipe for JWT access token with ttl of 60 minutes
// Note! For access tokens, jwt header 'typ' must be 'at+jwt'
{
"id": "client_credentials_pipe",
"config": {
"valves": [
{
"name": "CreateJwt",
"enabled": true,
"config": {
"dest": "access_token",
"jwt_ttl": 60,
"jwt_headers": {
"typ": "at+jwt"
},
"jwt_claims": {
"client_id": "${request.client_id}",
"sub": "${request.client_id}",
"iss": "https://op.example.com",
"aud": ["https://api.example.com/"],
"scope": "${request.scope}"
},
"keystore": {
"path": "/fortified_test/config/keystore.p12",
"password": "supersecret",
"type": "PKCS12"
},
"keystore_password": "supersecret",
"keystore_alias": "jwt"
}
},
{
"name": "JsonObjectCreate",
"enabled": true,
"config": {
"src": {
"access_token": "${item.access_token}",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "read"
},
"dest": "client_credentials"
}
}
]
}
}