Use this policy when you want to generate a JWT token to be sent in the response
JWT (JSON Web Token) token generation refers to the process of creating a JWT, which is a compact, digitally signed, and self-contained token that securely represents claims between two parties. JWT tokens are commonly used for authentication and authorization purposes in web applications and APIs.
The process of JWT token generation typically involves the following steps:
Once a JWT token is generated, it can be used by clients to authenticate with an application or API. The receiving party can validate the token's signature, verify the claims, and make authorization decisions based on the information contained within the token.
It's worth noting that the specific implementation and libraries used for JWT token generation may vary depending on the programming language or framework being used.
To learn about the parts of a JWT and how they are encrypted and signed, refer to RFC7519.
The configuration fields for the policy are:
[* Indicates a mandatory field]
Name *: Display name of the policy
Description: Description of policy
Enabled: Flag to indicate if the policy is enabled. If this field is not checked, the policy will be ignored at runtime and any fields from its output will contain a default initial value
Continue on Error: Flag to indicate that the flow should continue even if this policy throws an error
Algorithm: Specifies the algorithm to be used for token signature
Expires In: The time duration for which the claim will remain valid. This field specifies after what time the token will expire or become invalid.
Expiry Unit: Specifies the unit of time. The possible values are seconds, minutes and hours.
Subject: The "sub" (subject) claim identifies the principal that is the subject of the JWT. The claims in a JWT are normally statements about the subject. The subject value MUST either be scoped to be locally unique in the context of the issuer or be globally unique. The processing of this claim is generally application specific. The "sub" value is a case-sensitive string containing a StringOrURI value. Use of this claim is OPTIONAL.
Issuer: This value identifies the principal that issued the JWT. The processing of this claim is generally application specific. This value is a case-sensitive string containing a StringOrURI value.
secretKey: The key used to sign the token
claims: A set of name value pairs the denote additional claims. This value
isValid: Returns a boolean true if the api key is valid and access is allowed to the request
blockedAddress: IP address that is blocked for any request
Contact