Original Message:
Sent: Thu March 27, 2025 06:21 AM
From: Hindrik Brouwer
Subject: How to use user defied validity period(token expiry time) in JWT-generate
Hello Sunil,
You can use context variables as policy inputs, by using the $() notation. Set the desired expiration in a context variable with the set-variable policy, or in gatewayscript and then use this variable as input for the jwt-generate policy's exp-claim field.
Alternatively, you could use the Datapower jwt module, described in https://www.ibm.com/docs/en/datapower-gateway/10.6.x?topic=apis-jwt-module, which can be imported into a gatewayscript policy.
Hope that helps
------------------------------
Hindrik Brouwer
Original Message:
Sent: Thu March 13, 2025 12:36 PM
From: Sunil kumar Sure
Subject: How to use user defied validity period(token expiry time) in JWT-generate
Hi Team,
I have some requirement to generate custom token expiration time(Validity period) instead of using static value in sec of JWT-generate token in APIC.
User is going to send this token expiration sec in input data and same need to taken as jwt-generate action and generate token based on this instead of static value given in Validity Period(sec).
Thanks in advance.
------------------------------
Sunil Kumar Sure
------------------------------