How to parse custom JTW claims in TYK Gateway config?

66 Views Asked by At

I want to add new headers: x-application-id x-application-name x-organisation-id x-organisation-name

if I do like this "$tyk_context.jwt_claims_client_metadata.organisation_name" it does not work.

in the logs I see: “x-organisation-name-”

Question: how can I parse an array?

My jwt is:

{
  "pol": "MyAPI",
  "client_metadata": {
    "application_id": "1",
    "application_name": "SuperApp",
    "organisation_id": "1",
    "organisation_name": "SuperOrg"
  },
  "iss": "http://example.com/",
  "scope": "view create",
  "gty": "client-credentials"
}
1

There are 1 best solutions below

0
On

It appears it is currently not possible to reach nested claims using context variables. More info here