@neumatter/jwt
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

JWT

JavaScript Style Guide


Table of Contents


Install

npm i @neumatter/jwt

Usage

Signing:

import { JWS, UnsecuredJWT } from '@neumatter/jwt'

const jwt = new UnsecuredJWT({ expiresIn: 'PT4H', id: '123456789' }, { alg: 'HS256' })
const jws = await JWS.sign(jwt, process.env.SECRET_JWT)

Verifying:

import { JWS } from '@neumatter/jwt'

const jws = new JWS(signedString)
const unsecuredJWT = await jws.verify(process.env.SECRET_JWT)

Package Sidebar

Install

npm i @neumatter/jwt

Weekly Downloads

0

Version

1.0.1

License

none

Unpacked Size

69.3 kB

Total Files

16

Last publish

Collaborators

  • clyng57