I am using Spring Boot, Spring Security, OAuth2 and JWT to authenticate my application, but I keep getting this nasty error and I don\'t have any idea what is wrong. My
In Spring Security 5, the default encoder is DelegatingPasswordEncoder, which required Password Storage Format.
Read this
private PasswordEncoder delegateEncoder =
PasswordEncoderFactories.createDelegatingPasswordEncoder();
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception{
clients
.jdbc(dataSource)
.passwordEncoder(delegateEncoder);
}
Generate the password or secret code using default encoder which is DelegatingPasswordEncoder
System.out.println(delegateEncoder.encode("123123"));
// it generates the encoded code something like this:
// {bcrypt}$2a$10$0aISzamI0jBCVTxONzJlHOk7O7QS.XPFIheLVhXultVa9Ju7SarZ6