JSON Web Token authentication in sinatra example app
Helpful articles about JSON Web Token and ruby:
Built using:
Clone this repo and run bundle
To start the sinatra server:
from jwt-sinatra-example/
ruby app.rb
You should see sinatra fire up with Webrick. Point your web browser to:
This app will load app.rsa and app.rsa.pub as sign and verify keys for the JWT encode and decode
the app.rsa and app.rsa.pub were generated with:
openssl genrsa -out app.rsa 2048
openssl rsa -in app.rsa -pubout > app.rsa.pub