@liuhlightning/jwt
v0.0.1
Published
json web token in full typescript.
Downloads
71
Maintainers
Readme
JWT
JSON Web Token
Reference
https://jwt.io/
https://datatracker.ietf.org/doc/html/rfc7519
How to use
npm install --save @liuhlightning/jwt
# or
yarn add @liuhlightning/jwt
import JWT from "@liuhlightning/jwt";
const jwt = new JWT("your jwt secret");
Sign a token
const token = jwt.sign({ uid: 1234, username: "alex" });
Verify a token and use payload
const payload = jwt.verify("input token");