1.0.5 • Published 2 years ago

jwt-tiny v1.0.5

Weekly downloads
-
License
-
Repository
-
Last release
2 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

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago