Spring Security & Register Using sql Authorization & Authentication using UserDetailsService in a Spring Boot App (register,login,logout)
1) Register user and role (one to many mapping)
2) Authentication using Sql DB Connectivity using custom user details service.
3) Authorization using GrantedAuthority roles for method level security
4) how to use the interface of an UserDetailsService
http://localhost:4000/register ----> register(role : either USER (OR) ADMIN) still validation remaining
http://localhost:4000/secured/loginUser ----> for User Role Login
http://localhost:4000/secured/login ----> for Admin Role Login
Note: Register first and then use other urls (change application.properties according to your db config)
attached(sql.txt)
mvn clean install