Skip to content

Latest commit

 

History

History

node

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

MIT License

See the main README for general information.

Generate (JWT generation sample)

Generates/mints a JWT and prints it to shell’s standard output.

Installation and Usage

In subdirectorty jwt/node/generate:

  • Install dependencies

npm install
  • Run

# generate an app token
node generate.js --key=path/to/private_key.pem --issuer-id=issuer-id

# generate a user token
node generate.js --key=path/to/private_key.pem --issuer-id=issuer-id --username=username
  • Example

node generate.js -k /home/secured/private_key.pem -i f4d3dc80-885cbe1f-5f2b-4c74-0097-39dc59ae751c -u sbMem5c758c42bb1d12

Requirements

(Use node -v to test your Node.js version.)