redis

Spring Boot with JWT authentication using Redis

It has been a long time since i posted any java related blog post. Today it is a time i came up from my busy schedule. So in this post i am just only going to demonstrate how to add JWT authentication for small boot application which will use redis for saving its user’s session and information. There are many way we can use session but lets try this time with Redis as primary source for session storage.

I have my redis server in my VMWare which is opened in default port  6379. So now all i need is small spring boot application to get started. Lets start a new project with clean maven project and some dependencies essential for making JWT Token based session using redis.

1. Project Create

Here we have just added <parent> for making the project to inherit all the stuffs from the spring-boot-starter-parent. So now we have added spring-boot-starter-web, spring-boot-starter-data-redis, spring-security, jwt, jedis(redis) and lombok in our project which are essential dependency for starting our spring boot rest application with redis support.

Read More »Spring Boot with JWT authentication using Redis