lagden / jwt

Sign, verify and parse a JSON Web Token

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JWT

NPM version Build Status Coverage Status FOSSA Status


JWT

Sign, verify and parse a JSON Web Token

Install

$ npm i -S @tadashi/jwt

Usage

import {sign, verify, parse} from '@tadashi/jwt'

const jwt = await sign({name: 'Lucas Tadashi'})
// => eyJhbGciOiJIUz...

const {payload} = await verify(jwt)
// => {data: {name: 'Lucas Tadashi'}, jti: '6125968b0000000000f0b9f2', nbf: 1629853313}

const {data: {name}} = parse(jwt)
// => Lucas Tadashi

License

MIT © Thiago Lagden

FOSSA Status

About

Sign, verify and parse a JSON Web Token

License:MIT License


Languages

Language:JavaScript 84.6%Language:Shell 15.4%