This function allows users to create JSON web tokens (JWTs). It uses a key to create a hash of the JWT payload. The hash is included in the JWT content to allow validation. The JWT payload isn’t encrypted.
The difference between
GetJWT() and its companion function
GetJWTByKeyName() is the first parameter. The
GetJWT() first parameter is a key string that the caller supplies directly through their preferred method. For example, the key string is encrypted and stored in a data extension.
|1||string||Required||A key string.|
|2||string||Required||Name of a JWT standard hash algorithm from among |
|3||string||Required||The payload, typically a JSON object with name-value pairs. The payload isn't encrypted.|
The function returns a JWT string. If syntax for the function is invalid, the parser throws an
InvalidFunctionException. If the function call is invalid, for example, as having an invalid parameter value, the parser throws a
FunctionExecutionException, including details in an inner exception.
The output is a JWT that looks like this example.