Socket
Socket
Sign inDemoInstall

jwt-simple

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jwt-simple

JWT(JSON Web Token) encode and decode module


Version published
Weekly downloads
164K
decreased by-20.35%
Maintainers
1
Weekly downloads
 
Created

What is jwt-simple?

The jwt-simple npm package is a lightweight library for encoding and decoding JSON Web Tokens (JWT). It provides a simple API for creating and verifying JWTs, which are commonly used for authentication and secure data exchange.

What are jwt-simple's main functionalities?

Encoding a JWT

This feature allows you to encode a payload into a JWT using a secret key. The resulting token can be used for secure data transmission.

const jwt = require('jwt-simple');
const payload = { foo: 'bar' };
const secret = 'mysecretkey';
const token = jwt.encode(payload, secret);
console.log(token);

Decoding a JWT

This feature allows you to decode a JWT using the same secret key that was used to encode it. The decoded payload can then be accessed and used as needed.

const jwt = require('jwt-simple');
const token = 'your.jwt.token';
const secret = 'mysecretkey';
const decoded = jwt.decode(token, secret);
console.log(decoded);

Other packages similar to jwt-simple

Keywords

FAQs

Package last updated on 26 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc