1.0.5 • Published 3 years ago

jwt-tiny v1.0.5

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

jwt-tiny

npm version size

Zero dependency, pure JS, tiny JWT for servers.

npm test

import { JWT } from 'jwt-tiny')

const secret = 'your-256-bit-secret'
const payload = {
  name: "John Doe",
  roles: ["admin"]
  iat: +new Date()
}

const jwt = new JWT(secret)
const jwtstr = jwt.create(payload)
const payload = jwt.verify(jwtstr)
const asJSON = jwt.verifyJSON(jwtstr)
console.log(jwtstr, asJSON)
1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago