validate-method
This command controls whether to validate a JWT by using decryption methods, verification methods, or custom processing, or any combination of these methods.
Syntax
validate-method method
Parameters
- method
- Specifies the method for validating a JWT. To specify all methods, concatenate
each method with the + character.
decrypt- Decrypts the JWT.
verify- Verifies the JWT signature. This setting is the default value.
customized- Uses a stylesheet or GatewayScript file to validate a JWT.
Guidelines
The validate-method command controls whether to validate a JWT by using decryption methods, verification methods, or custom processing, or using all methods.
- To use decryption methods, specify how to decrypt the JWT with the decrypt-type command. Different decryption methods require different crypto material.
- To use verification methods, specify how to verify the signature with the verify-type command. Different verification methods require different crypto material.
- To use custom processing, specify the stylesheet or GatewayScript file with the customized-script command.
You can use custom processing only after the JWT is successfully validated by using the decryption methods or verification methods, or both decryption and verification methods.
Examples
- Decrypt the JWT with the
device_idkey alias.# validate-method decrypt # decrypt-type pkix # decrypt-key device_id - Verify the JWT signature with the
ss_keyshared secret key alias.# validate-method verify # verify-type ssecret # verify-ssecret ss_key - Use a
local:///custom_script.js filefile to validate the JWT.# validate-method customized # customized-script local:///custom_script.js