[R9] Adjust request matchers

This commit is contained in:
Mirna Gama 2024-01-12 12:39:19 -03:00 committed by Mirna Gama
parent e8bb2e94bd
commit 845fc2f350

View File

@ -28,7 +28,7 @@ public class WebSecurityConfiguration {
return http.csrf(csrf -> csrf.disable()) return http.csrf(csrf -> csrf.disable())
.sessionManagement(sm -> sm.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) .sessionManagement(sm -> sm.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
.authorizeHttpRequests(req -> { .authorizeHttpRequests(req -> {
req.requestMatchers(HttpMethod.POST, "/api/auth").permitAll(); req.requestMatchers(HttpMethod.POST, "/api/auth/*").permitAll();
req.anyRequest().authenticated(); req.anyRequest().authenticated();
}) })
.addFilterBefore(authTokenFilter, UsernamePasswordAuthenticationFilter.class) .addFilterBefore(authTokenFilter, UsernamePasswordAuthenticationFilter.class)