Skip to content

Diasporism/jwt_rails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example JWT Auth Server

This is an example JWT Authorization Server. It holds the users table and just enough information to authenticate and authorize users. It's meant to be used in conjunction with another API or codebase that holds your application's business logic.

After authenticating a user, the JWT Auth Server sends a JWT (JSON Web Token) back to the client. The client stores this JWT and sends it back to the server with every subsequent request in the Authorization header.

You can read more about the JWT specification at jwt.io.

Egghead.io has a great (and short) series of videos explaining how the client and server interact using JWTs. You can view them here.

Pre-requisites

Installation

Simply clone the repo and install its dependencies:

$ git clone [email protected]:Diasporism/jwt_rails.git
$ cd jwt_rails/
$ bundle
$ rake db:create db:migrate

Run the Server

Just type...

$ unicorn

and visit localhost:8080.

Run the Specs

Just type...

$ rspec

from the root of the project.

About

An example JWT authentication server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages