Spring Boot Session +STOMP +Websocket +Javaconfig

By Dhiraj Ray, 21 December,2016

In this post, we will be discussing about how to maintain spring session when using websockets through HandshakeInterceptor.Doing so we can track user session during every websocket request and can utilize this session to track client activities from the server even after the server is connected through websocket prorocol.Now, let see by code how we can achieve it using Spring boot....

Read more ➤ seperator

Spring Boot Security Redirect After Login

By Dhiraj Ray, 18 December,2016

Sometimes it's required to redirect user to different pages post login based on the role of the user.For example if an user has an USER role then we want him to be redirected to /user and similarly to /admin for users having ADMIN role.In this post, we will be discussing about how to redirect user to different pages post login based on the role of the user.We will be implementing AuthenticationSuccessHandler of...

Read more ➤ seperator

Spring Security +Hibernate Integration +JavaConfig Example

By Dhiraj Ray, 17 December,2016

In this post, let us discuss about auhtenticating user present in database using spring security with form login feature. In this course, we will be using hibernate with integration to spring to connect to the database. We will continue to use spring boot features similar to previous posts to avoid common configurations.By using spring security we will ensure that our app is secured against Cross Site Request Forgery (CSRF) attacks....

Read more ➤ seperator

Spring Security +REST +Basic Authentication +Javaconfig

By Dhiraj Ray, 16 December,2016

In the last post we tried securing our Spring MVC app using spring security here.We protected our app against CSRF attack too. Today we will see how to secure REST Api using Basic Authentication with Spring security features.Here we will be using Spring boot to avoid basic configurations and complete java config.We will try to perform simple CRUD operation...

Read more ➤ seperator

Spring Security +Spring MVC Example +Spring Boot

By Dhiraj Ray, 07 December,2016

In any web app, security has always been a great concern. Today, we will be securing our Spring MVC app using Spring Security login form feature.To build this application we will be using Spring boot to build it and hence we will have a complete javaconfig. Using Spring boot, different boiler plate configurations will be automatically removed. We will also take care of protecting the app against Cross Site Request Forgery (CSRF) attacks....

Read more ➤ seperator