How to create Custom UserDetail Object in Spring Security

前端 未结 3 993
春和景丽
春和景丽 2020-12-16 21:06

I have built my custom Authenticaton Manager for Spring Security which goes something like this

   public class AccountAuthenticationProvider implements  Aut         


        
3条回答
  •  春和景丽
    2020-12-16 21:43

    you need to implement UserDetailsService and override loadUserByUsername method to return your customized UserDetails class.

    check below links:

    http://www.javaroots.com/2013/03/how-to-use-custom-dao-classe-in-spring.html http://www.javacodegeeks.com/2012/08/spring-security-implementing-custom.html

提交回复
热议问题