Adding new users in Spring Security

前端 未结 4 638
孤独总比滥情好
孤独总比滥情好 2021-02-02 15:58

I have basic spring security set up in my Spring / Java EE web app. I can restrict access to certain pages and force login (with roles etc.). There needs to be a form where ne

4条回答
  •  误落风尘
    2021-02-02 16:18

    Spring Security has JdbcUserDetailsManager. It's a subclass of the default JDBC-based UserDetailsService with additional methods for creating users and so on. You can use it as a DAO instead of your own.

    However password hashing should be handled explicitly. For example, if you use SHA hash, you can use ShaPasswordEncoder.encodePassword().

提交回复
热议问题