1.0.3 • Published 2 years ago

basic-jwt v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Basic JWT

A simple JWT library for creating JWTs in TypeScript.

Usage

import {JWT} from 'basic-jwt/lib/jwt'

const payload = {
    username: 'foobar',
    email: 'foo.bar@baz.com',
}
const secret = 'foobarbaz'
const expire = 3600

// Create the JWT with the given data.
const token = JWT.create(payload, secret, expire)

// Verify the JWT
const data = JWT.verify(token, secret)
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago