Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to get decoded value of JWT in response?

I am calling an API proxy to decode JWT (passing it as Authorization Header),

I have added Policy JWT Decoder, in the ProxyEndpoint preflow response.

I am able to see the decoded values of the JWT in the EDGE Trace console.

I want the values in the JSON response of the API proxy as well.

Solved Solved
1 6 2,001
1 ACCEPTED SOLUTION

..

You need to form your payload using the flow variables shown in the Trace session.

In the response side add an Assign Message policy and use Set >> Payload and add all the required flow variables.

jwt.{policy_name}.{variable_name}
<AssignMessage name="set-payload-1">
  <Set>
    <Payload contentType="application/json">
"audience":"jwt.JWT-Decode-1.claim.audience"
</Payload>
  </Set>
</AssignMessage>

View solution in original post

6 REPLIES 6
Top Solution Authors