No Metodo SecurityFilterChain tive q mudar o antMatchers por requestMatchers e fica agora voltando erro de token, ele nao entra no if, consegue me dar uma luz ? ç.ç
`
@Configuration
@EnableWebSecurity
public class SecurityConfigurations {
@Bean
SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
return http.csrf().disable()
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
.and().authorizeRequests()
.requestMatchers(HttpMethod.POST, "/login").permitAll()
.anyRequest().authenticated()
.and().addFilterBefore(securityFilter, UsernamePasswordAuthenticationFilter.class)
.build();
}
`