Boa tarde!
Queria saber o que estou esquecendo, o login não funciona.
Digito o user e senha mas parece que não está sendo lido.
Alguém pode ajudar?
Estou usando Spring Boot --> Security.
Meu código:
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.inMemoryAuthentication()
.withUser("admin").password("admin").roles("USER");
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
.anyRequest()
.fullyAuthenticated()
.and()
.httpBasic();
http
.csrf()
.disable();
}
O login aparece, mas dá este erro:
Your login attempt was not successful, try again.
Reason: Bad credentials