verify

This block is part of the json web token group and was last modified in core v10.4.28.

verify v10.4.28

Verifies the given json web token and returns the payload if valid.

In pins 2 + flow
  • flow
    flow
  • token required
    value

    the token to be verified

  • secret required
    value

    the secret or private key used to sign the jwt

Out pins 3 + flow
  • flow
    flow
  • success
    condition
  • error
    value
  • payload
    object

Verifies the JWT signature and standard claims (including expiry) against the secret, outputting the claims on payload with success=true. Any parse or signature failure gives success=false with the library's error message; an empty token or secret fails with MISSING_TOKEN / MISSING_SECRET.

jwt

A typical wiring for verify: a function trigger starts the flow; value feeds the token pin; value feeds the secret pin; the flow out pin feeds debug.

Studio canvas example for the verify block: typical wiring for verify.

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