I am happy to post another blog post on how to Integrate inmemory authentication for a Spring Boot application.
I have created a simple spring boot project in STS IDE using Spring Starter kit. While navigating through the starter kit for creating your spring boot application you need to select web so that the spring boot web dependencies get added to the pom.xml file.
Now I like to have a in-memory authentication for my sample project.
Open pom.xml add the below dependency
Create a simple class like this.
Take a maven build with goals as clean, install.
Run this spring boot application. You need to give the right credentials as in authentication class
Points to Ponder:
AuthenticationManagerBuilder ==>> SecurityBuilder used to create an AuthenticationManager. Allows for easily building in memory authentication, LDAP authentication, JDBC based authentication, adding UserDetailsService, and adding AuthenticationProvider’s.