Use ignoringRequestMatchers

Issue gh-96
This commit is contained in:
Marcus Da Coregio
2022-10-10 08:00:16 -03:00
parent 14db25cb1d
commit fd73ddc121

View File

@@ -65,7 +65,7 @@ public class RestConfig {
.authorizeHttpRequests((authorize) -> authorize
.anyRequest().authenticated()
)
.csrf((csrf) -> csrf.ignoringAntMatchers("/token"))
.csrf((csrf) -> csrf.ignoringRequestMatchers("/token"))
.httpBasic(Customizer.withDefaults())
.oauth2ResourceServer(OAuth2ResourceServerConfigurer::jwt)
.sessionManagement((session) -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))