API Management
13.2 13.1 13.0 12.2 12.1 12.0 11.0
13.2 13.1 13.0 12.2 12.1 12.0 11.0

Decode Json Web Token

Decode the JWT token header and payload and return the JSON object.

Configuration

ID Identifier property specifies the manner in which the token is passed. Click ID Identifier edit icon to configure Message Part Identifier.

decode_policy_config.png
Figure 1: Decode Json Web Token policy configuration attributes

Request

Use browser/Postman.

curl -X GET \http://192.168.2.134:1860/jwt/1.0/decode -H 'jwt-token: ewogICJ0eXBlIiA6ICJKV1QiLAogICJhbGciIDogIkhTMjU2IiwKICAia0lEIiA6ICIxMjM0NTYiCn0=.ewogICJzdWIiIDogIkpzb24tVG9rZW4tR2VuZXJhdGlvblwiIiwKICAiaXNzIiA6ICJGaW9yYW5vIHNvZnR3YXJlIHByaXZhdGUgbHRkIiwKICAiYXVkIiA6ICJhdWRpZW5jZSIsCiAgImlhdCIgOiAiMTU0Mzk5MzY1NDUyMyIsCiAgImV4cCIgOiAiMTU0NDU5MzY1NDUyMyIsCiAgInNob3ciIDogIkp3dCB0b2tlbiAiLAogICJhZGRpdGlvbmFsQ2xhaW0iIDogeyB9Cn0=.w+QytOrnVklseLee6T8/MpSahHAS2XqXfNOA+l3xWTA=' \

Response

The decoded JWT Header and Claims and Additional claims are populated into context variables with the prefix "jwt.decode".

decoded_claims.png
Figure 2: Decode Json Web Token policy configuration attributes