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 './private_key.pem';jwtGenerator;jwtGenerator; // keyid is one special header that is valid. Not every header is acceptable let token = jwtGenerator;console; // you've got a token buddy, enjoy..
Author
License
This project is licensed under the MIT license. See the LICENSE file for more info.