oauth2ResourceServer deprecation fix

This commit is contained in:
Ahmet Say
2023-10-19 23:48:05 +03:00
committed by Marcus Hert Da Coregio
parent 6ba872a6bf
commit 5d3072f3bb

View File

@@ -47,7 +47,7 @@ public class OAuth2ResourceServerSecurityConfiguration {
.requestMatchers(HttpMethod.POST, "/message/**").hasAuthority("SCOPE_message:write") .requestMatchers(HttpMethod.POST, "/message/**").hasAuthority("SCOPE_message:write")
.anyRequest().authenticated() .anyRequest().authenticated()
) )
.oauth2ResourceServer(OAuth2ResourceServerConfigurer::jwt); .oauth2ResourceServer(oauth2 -> oauth2.jwt(withDefaults()));
// @formatter:on // @formatter:on
return http.build(); return http.build();
} }