js-jwt
v0.2.7
Published
a Javascript library for encoding into jwt
Downloads
124
Maintainers
Readme
js-jwt
JavaScript library of jwt encoding
- npm (Node.js package manager)
npm install js-jwt --save
Usage
Modular include:
var jwt = require("js-jwt");
jwt.init('SH256','secret-key') //you can init with secrete and without secret-key
var token = jwt.encode({id:1, name: 'john doe'}, 'secret-key') //here you can bas secret-key if you want to encode with different secretKey
...
console.log(token);
List of alg supported
SH256 SH512