1.0.3 • Published 3 years ago

basic-jwt v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 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

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago