Pārlūkot izejas kodu

oauth2ResourceServer deprecation fix

Ahmet Say 1 gadu atpakaļ
vecāks
revīzija
5d3072f3bb

+ 1 - 1
servlet/spring-boot/java/oauth2/resource-server/hello-security/src/main/java/example/OAuth2ResourceServerSecurityConfiguration.java

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