Mapping
To enable JWT authorization to perform the above tasks, you need to map the values of your JWT payload so your instance can extract the relevant data.
You can map the decrypted JWT content by using the payload
keyword. Also, body
, headers
, and query
are available for mapping via the corresponding keywords.
In the configuration field, you need to map your values using IML, a templating language used by Make. You can use the following pattern:
{{payload.yourParameterName}}
The following are examples of IML mapping for the fields in the JWT configuration section:
User
externalID
{{payload.userId}}
{{payload.userEmail}}
name
{{payload.userName}}
country
{{payload.country}}
Note: Countries must conform to ISO 3166-1.
timezone
{{payload.tz}}
Note: Time zones must conform to the tz database.
locale
{{payload.userLocale}}
language
{{payload.lang}}
Organization
externalId
{{payload.organizationId}}
name
{{payload.orgName}}
timezone
{{payload.orgName}}
timezone
{{payload.tz}}
Team
externalId
{{payload.teamId}}
name
{{payload.teamName}}
The following are examples of IML mapping for the fields in the JWT configuration section:
Custom contexts
The following procedure creates a custom context:
Click + Add item.
In the property field, enter the internal Make parameter you want to map.
In the value field, map the payload parameter value you want extracted.
Click Save in the lower right corner.
Your custom context is now available as environment.context
in AccountWorkers and RPCWorkers.
Example: A custom base domain
In this example, your JWT payload contains a custom base domain that you need for creating new accounts.
Use the following property and value to map the custom base domain:
property:
teamdomain
value:
{{payload.customBaseDomain}}
Last updated