Use the Java Web Token (JWT) Validator policy to authenticate a request with a token. When you apply this policy, API consumers must use their JWT credentials to sign their JWT. Before allowing API access to the consumer, the policy does the following:
The policy checks if the JWT token is valid
If valid, the policy processes the request
If invalid, the policy discards the request
Policy Execution Order
This JWT Validator policy executes after the request has been authorized.
Expression Enabled Fields in API Policies
All expression enabled fields take expressions from the SnapLogic Expression Language and the API Policy Manager functions.
Parameter Name | Description | Default Value | Example |
---|---|---|---|
Label | Required. The name for the API policy. | JSON Validator | Task JSON Validator |
When this policy should be applied | An expression enabled field that determines the condition to be fulfilled for the API policy to execute. For example, if the value in this field is request.method == "POST", the API policy is executed only if the request method is a POST. | True | request.method == "POST" |
Signing Algorithm |
| ||
Key | |||
Extract into $token | |||
Custom Query String Parameter Keys | |||
Authorization Header Type | |||
Extract User Info* | |||
User ID Expression | |||
Roles Expression | |||
Status | Indicates whether the API policy is enabled or disabled. | Enabled | Disabled |