npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

node-red-contrib-jsonwebtoken

v1.0.7

Published

This node allows you to sign and validate JSON Web Token (JWT)

Readme

This Node-RED node allows signing and validating JSON Web Tokens (JWT).

Install

node-red-contrib-jsonwebtoken is available in the Node-RED Palette Manager. To install it:

  • Open the menu in the top-right of Node-RED
  • Click "Manage Palette"
  • Switch to the "Install" tab
  • Search node-red-contrib-jsonwebtoken
  • Install the node-red-contrib-jsonwebtoken package The nodes will then be available in your editor for you to get started.

It is also possible to install it via npm:

npm install node-red-contrib-jsonwebtoken

Node jwt-sign

This node allows you to sign and validate JSON Web Token (JWT)

Inputs

: payload (string | object) : the payload of the message to publish.

Outputs

  1. Standard output : payload (string) : the standard output of the command.

  2. Standard error : payload (object) : the standard error of the command.

Form fields

  • Mode: Mode to use for verifying the token.
  • Algorithm: Token encryption algorithm, it is recommended to use a private key as it provides more security to the token.
  • Private Key: In case of selecting the private key mode, the source of the key must be specified. The input variable must be of type buffer, for any of the selected cases, whether it comes from the message payload or environment variables.
  • Secret: In the case of signing the token with a secret key, the source of the key must be specified, which can be a string, input message, or environment variable.
  • Expires In: Token expiration time in seconds.
  • Data to Sign: Source of the data to be signed, the input must be a JavaScript object. If the input is different from an object, the token is signed with the 'data' claim and the data is added there.
  • Audience: Allows configuring the audience of the token.
  • Issuer: Allows configuring the issuer of the token.
  • Not Before: The "Not Before" (NBF) field in a token is used to specify the moment from which the token is valid. This means that the token will not be accepted by the server before the date and time specified in this field. The value is expressed in seconds.
  • Keyid: The Keyid field enables the inclusion of the kid header in token signatures.

Node jwt-verify

This node allows verifying the authenticity of a JSON Web Token (JWT).

Inputs

: payload (string) : the payload of the message to publish.

Outputs

  1. Standard output : payload (object) : the standard output of the command.

  2. Standard error : payload (object) : the standard error of the command.

Form fields

  • Mode: Mode to use for verifying the token.
  • Private Key: In case of selecting the private key mode, the source of the key must be specified. The input variable must be of type buffer, for any of the selected cases, whether it comes from the message payload or environment variables.
  • Secret: In the case of signing the token with a secret key, the source of the key must be specified, which can be a string, input message, or environment variable.
  • Token origin: Source of the token.
  • Algorithms: Optional, if not specified a defaults will be used based on the type of key provided
  • Ignore Expiration: The default value is false; if true, it bypasses the token's expiration date.
  • Ignore "NotBefore": The default value is false; if true, it bypasses the validation that the token is validated before the specified date.
  • Validate Audience: Validates that the audience is correct.
  • Validate Issuer: Validates that the token issuer is correct.
  • Validate Max Age: The "max age" in a JSON Web Token (JWT) refers to the maximum time a token can be considered valid from the moment it was issued. The value is expressed in seconds
  • Validate Claims: Allows validating the different claims of the token, ideal for validating the scopes, roles, and users with access to some API resources. It is also possible to validate objects in depth like "user.roles[0]"

Examples

Review the node examples for more clarity on how to use it. You can import it in the import menu and search for the node example "node-red-contrib-jsonwebtoken" or the json for the site GitHub.

References