Spring Security authentication from custom tables
I was looking into spring security, it has good features, but my requirement is bit different. I have one table: 1. Employee (fields ename, epassword) I want to authenticate user from this table but using spring security. I know spring security has kinda feature of enable and ROLE but didn't able to get how I can get authentication from my table. I have seen some examples and google certain link but some good links will be more helpful.
You can have cutom UserDetaialsService and give an implementation for loadUserByUsername(String username) to load user info from database. After that you can have custom implementation of AuthenticationProvider which uses your custom UserDetailsService to authenticate the user. Spring security is also having same kind of implementation to authenticate the user from table but have some limitation on table structure etc. you can have a look on DaoAuthenticationProvider to implement your own AuthenticationProvider and JdbcDaoImpl to have your custom UserDetailsService.
How do I fix my hibernate hbm.xml file to make my composite primary keys work? (MappingException)
Java deadlock with one lock
Gson fromJson and toJson for simple object returning null in Java
How to repeat audio file in java
Random int function behavior in Java
Is it necessary to use generics with ArrayList?
String Array throws error-Java
I get a null pointer exception when using an interface in onResponse volley library
Mocking Java objects in my target where target has no setters available
Lowest and highest number in an array
program stopping due java.lang.NullPointerException: Attempt to invoke virtual method [duplicate]
Is there a more efficient way to create new variables in a for loop?
Java CardLayout does not change Panel until unrelated loop is finished
Elastic search tokenizer &filter for Split the given data
Nested XML pull parser issue ,cannot get child elements
Taking from a file then summing the integers but getting 0 as answer