私はBCryptで春のセキュリティを使用しています。 値が等しい場合、春のセキュリティでコード化されたパスワードはBCryptのようには見えません
は、だから私は、DBのパスワードでpasswordEncoder
@Autowired
public void configureAuthentication(AuthenticationManagerBuilder authenticationManagerBuilder) throws Exception {
authenticationManagerBuilder
.userDetailsService(this.userDetailsService)
.passwordEncoder(passwordEncoder());
}
@Bean
public PasswordEncoder passwordEncoder() {
return new BCryptPasswordEncoder();
}
を設定しています私のスニペットが正しくbcryptのように保存されますが、私は認証しようとしているとき、私は、エラー
Encoded password does not look like BCrypt
"status": 401,
"error": "Unauthorized",
"exception": "org.springframework.security.authentication.BadCredentialsException",
を受けています
この回答はうまくいくはずです:https://stackoverflow.com/questions/23456383/password-encoding-bcrypt-not-authorising-hashed-passwords-authorising-on-pl。 – NMSL