Skip to content

Latest commit

 

History

History

ruby

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/ruby/generate:

  • Install dependencies using Bundler

bundle install
  • Run

# generate an app token
ruby generate.rb -k path/to/private_key.pem -i issuer-id

# generate an user token
ruby generate.rb -k path/to/private_key.pem -i issuer-id -u username
  • Example

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

Requirements/Dependencies

(Use ruby -v to test your Ruby version.)