0.0.10 • Published 10 years ago

dorongrinstein-jwt-generator v0.0.10

Weekly downloads
-
License
MIT
Repository
-
Last release
10 years ago

dorongrinstein-jwt-generator is a small library that generates JWTs which are Base64Url encoded.

Installation

npm install dorongrinstein-jwt-generator --save

Usage

// make sure you have a private key *.pem file 
// note that in lieu of a file name, you can provide the UTF-8 encoded private key string
// to the constructor below. It accepts either a file name or a string

let jwtGenerator = new (require('dorongrinstein-jwt-generator'))('./private_key.pem');
jwtGenerator.addClaim('name', 'doron');
jwtGenerator.addHeader('keyid', '1234'); // keyid is one special header that is valid. Not every header is acceptable 
let token = jwtGenerator.make();
console.log(token); // you've got a token buddy, enjoy..

Author

doron.grinstein@concur.com

License

This project is licensed under the MIT license. See the LICENSE file for more info.

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.4

10 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago