/spark-jwt-auth

JSON Web Token Authentication with SparkFramework

Primary LanguageJavaMIT LicenseMIT

JSON Web Token Authentication with SparkFramework

This is a Spark based authentication server. The goal is to take care of authentication/registration/ using a REST API.

Installation


Be sure install them!

  • Java 8
  • Redis

Redis run on default port.

How do I use it?

Install maven dependency and launch the server.

Register (POST /register)

 Parameters raw (json body)
{
    "username":      The email of the user 
    "password":   The password of the user
}

Token (POST /token)

 Parameters raw (json body)

{
    "username":      The email of the user 
    "password":   The password of the user
}

Protected Message (POST /protected/deneme)

 HEADER

{
    "X-API-TOKEN":      TOKEN 
}

FORK IT :)

TODO

  • Unit and Integration Test
  • Hash or Encrypted password