szerhusenBC / jwt-spring-security-demo

A demo for using JWT (Json Web Token) with Spring Security and Spring Boot 2
MIT License
3.04k stars 1.33k forks source link

where does BCryptPasswordEncoder be used? #108

Closed joeyUOFA closed 4 years ago

joeyUOFA commented 4 years ago

Hi,

I saw PasswordEncoder is defined, but it is not been used in any where. How do you verify the password when use logs in?

Thanks

maxwellt commented 4 years ago

It is registered as a bean in the WebSecurityConfig.

szerhusenBC commented 4 years ago

@joeyUOFA : Like @maxwellt already mentioned it, it's configured as a @Bean and Spring is using it automatically as password decoder.