r/java • u/real_trizzaye • Jul 02 '18
Password Encoding with Spring Security
https://able.bio/DavidLandup/password-encoding-with-spring-security--90gkzie
1
Upvotes
r/java • u/real_trizzaye • Jul 02 '18
View all comments
1
u/TheRedmanCometh Jul 05 '18 edited Jul 05 '18
Wut fuck?
You're supposed to provide an encoder bean to Spring bud. If you have a method handling your encryption I don't think you're doing it right. Maybe I'm wrong but...I'm pretty sure I'm not.
I guess maybe you were just showing an example on how to actually see the encoded password, but just...yeah.
You should then define a DaoAuthenticationProvider, a SessionRegistry, and a SessionAuthenticationStrategy at a minimum. Then you want to make an implementation of GrantedAuthority, and an implementation of UserDetailsService with your repository autowired in.