Skip to content

Demonstration App on how to secure REST APIs using JWTs in Java using JJWT library and JAX-RS REST spec.

License

Notifications You must be signed in to change notification settings

nileshprasad137/jjwt-jaxrs-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sample-jaxrs-jwt

This is a simple demo app for demonstrating how to use JWT tokens for token-based authentication in Java using JJWT library.

Technologies:

Instructions to use:

This is just a server side implementation and does not include client side code. So, you'll need POSTMAN or relevant tool in order to test this on you local system.

Clone this project and set it up in Eclipse. You'll also need to set up environment variable for storing your secret key. Using Eclipse, you can easily do so by going to Run->Run Configurations under Environment tab. You must set the name of the variable as SECRET_KEY_JWT and restart IDE after setting the env. var. It must be strong enough for HMAC-SHA256 Algorithm (>=256bits).

You'll also need MySQL 5.7+. Run the dump SQL files to set up your DB.

Hit /auth_control/auth/ endpoint to generate token and /services_control/todo/list_todos to access your Resources.

References:

License

MIT

About

Demonstration App on how to secure REST APIs using JWTs in Java using JJWT library and JAX-RS REST spec.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages