GenerateJWT Policy Audience Claim Message Templating

manish
New Member

At present Audience Claim in GenerateJWT policy does not support template /variable reference.

Is there any specific reason or any roadmap to support this in future? We have to modify Audience claim in our Generate JWT policy for non production and production environments.

As per Apigee documentation, VerifyJWT has support for variables reference but GenerateJWT doesn't .

0 2 83
2 REPLIES 2

Maybe the documentation is in error, but this works for me:

<GenerateJWT name="GenerateJWT-1">
    <Algorithm>RS256</Algorithm>
    <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
    <PrivateKey>
        <Value ref="private.private_key"/>
    </PrivateKey>
    <ExpiresIn>8h</ExpiresIn>
    <Audience ref="desired_audience"/>
    <OutputVariable>output_jwt</OutputVariable>
</GenerateJWT>

oh, and here's a screencast showing this working.

This is a companion screencast showing the Verify case.