sign
This block is part of the json web token group and was last modified in core v10.4.28.
sign v10.4.28 Creates and signs a new json web token.
- flow
flow - payload required
objectthe payload to add to the jwt
- secret required
valuethe secret or private key to sign the jwt with
- expires required
datewhen the jwt should expire
- flow
flow - success
condition - error
value - token
value
HS256-signs the payload with the secret and outputs the token. The payload must be an object without its own exp key : string, number, or boolean payloads fail with typed INVALID_EXPIRES_IN_FOR_* errors, an existing exp with INVALID_EXPIRES_IN. The token gets iat (now, unless the payload supplies a numeric one; a non-numeric iat fails with INVALID_IAT) and exp set to iat PLUS the expires value, which defaults to now-plus-4-hours as a unix number; an expires value at or before now fails with INVALID_EXPIRY_IN_PAST.
jwt |
A typical wiring for sign: a function trigger starts the flow; new object feeds the payload pin; value feeds the secret pin; date now feeds the expiresin pin; the flow out pin feeds debug.
Version history
Introduced in v10.4.28.
Back to
json web token Return to the main group to view all sub-groups Back to json web token Return to the group to view all blocks within this group 