Generate Json Web Signature
Contents
Generate Json Web Signature policy generates a Json Web Signature with headers specified here and the payload sent along with the request.
Configuration
The properties that have to be configured to use the policy are described below.
Figure 1: Generate Json Web Signature configuration attributes
Property | Description |
Secret Key | Where HS256 symmetric algorithm is chosen, Secret Key has to be provided. The minimum length of the string has to be 256 bit. |
Time to Expire | Specify how long the token should be valid; token expires after those many seconds. |
Headers | The Header table must have at least one Header bearing the name "alg". Click the Add Generating JWSSymmetric algorithmWhile using Symmetric Algorithms like HS256, use "alg" Identifier value as "HS256". HS256 Asymmetric algorithmWhile using Asymmetric algorithms like ES256 or RS256, providing two headers — "alg" and "kid" is mandatory. Please refer to the Key ID description in the Json Web Token policy section to know how to set the "kid" Header value and to input the Private JSON Web keys. RS256 ES256 |
Example
Request
curl -X POST \ http://192.168.2.231:2160/generateSignature/1.0/ -d '{"iss":"fiorano"}'
Response
Generates JWS and sets it in the context variable named "jws.signature".