Hi there
I have a use case to create JWT with RS256 and PS256 algo. for RS256 I will be using generate jwt out of box policy. For PS256, I will be using javacallout. This whole logic will be in shared flow. My query is to use out of box policy, Can I add dynamic claims in GenerateJWT policy so that same policy can be reused for different flows
<GenerateJWT async="false" continueOnError="false" enabled="true" name="GJWTGenerate"> <DisplayName>GJWTGenerate</DisplayName> <Algorithm>RS256</Algorithm> <PrivateKey> <Value ref="private.signKey"/> <Id ref="MY_KID"/> </PrivateKey> <Subject ref="MY_ID"/> <Issuer ref="MY_ID"/> <Audience ref="MY_AUD"/> <ExpiresIn>60m</ExpiresIn> <AdditionalClaims> <Claim name="scope">ASPSPReadAccess TPPReadAll AuthoritiesReadAccess</Claim> </AdditionalClaims> <OutputVariable>token-jwt</OutputVariable> </GenerateJWT>
Solved! Go to Solution.
Yes.
Did you try it?
And ?
Any trouble at all ?
Specifically which claims do you want to be dynamic? The issuer, subject, and audience? sure. This is all documented. It does not matter that the policy runs within a SharedFlow. The policy will reference the variables to set the specific claims.
Did you try it?