Sudoo-JWT

Continuous Integration codecov npm version downloads

JWT generator verifier for Node

Install

yarn add @sudoo/jwt
yarn add @sudoo/token # Peer Dependency
# Or
npm install @sudoo/jwt --save
npm install @sudoo/token --save # Peer Dependency

Creator Usage

import { JWTCreator } from "@sudoo/jwt";

const creator: JWTCreator = JWTCreator.instantiate("<Private Key>");
const token: string = creator.create({
    header: {
        foo: 'bar',
    },
    body: {
        foo: 'bar',
    },
}); // Signed Token