Socket
Socket
Sign inDemoInstall

@egendata/jwt-lite

Package Overview
Dependencies
2
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @egendata/jwt-lite

isomorphic library to decode, sign, and verify JSON Web Tokens


Version published
Weekly downloads
0
decreased by-100%
Maintainers
3
Created
Weekly downloads
 

Readme

Source

jwt-lite

Install

npm install @egendata/jwt-lite

Usage

const jwt = require('@egendata/jwt-lite')

const decoded = jwt.decode('somejwt');
const {
  header,         // jose header
  claimsSet,      // claimsSet as a JSON object
  signedContent,  // UintArray of the signed content
  signature       // UintArray of the signature
} = decoded;

jwt.sign(payload, jwk)
.then(jwtToken => console.log(jwtToken))

jwt.verify(jwtToken, jwk)
.then(payload => console.log(payload))

Can it be smaller?

If you use ES6 imports with a bundler that supports tree-shaking, yes!

import { sign } from '@egendata/jwt-lite'

License

MIT

FAQs

Last updated on 05 Sep 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc