File tree 2 files changed +9
-3
lines changed
docs/modules/ROOT/pages/servlet/oauth2/resource-server
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -879,7 +879,9 @@ public class DirectlyConfiguredJwkSetUri {
879
879
.requestMatchers("/messages/**").access(hasScope("messages"))
880
880
.anyRequest().authenticated()
881
881
)
882
- .oauth2ResourceServer(OAuth2ResourceServerConfigurer::jwt);
882
+ .oauth2ResourceServer(oauth2 -> oauth2
883
+ .jwt(Customizer.withDefaults())
884
+ );
883
885
return http.build();
884
886
}
885
887
}
Original file line number Diff line number Diff line change @@ -204,7 +204,9 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
204
204
.authorizeHttpRequests(authorize -> authorize
205
205
.anyRequest().authenticated()
206
206
)
207
- .oauth2ResourceServer(OAuth2ResourceServerConfigurer::opaqueToken);
207
+ .oauth2ResourceServer(oauth2 -> oauth2
208
+ .opaqueToken(Customizer.withDefaults())
209
+ );
208
210
return http.build();
209
211
}
210
212
----
@@ -564,7 +566,9 @@ public class MappedAuthorities {
564
566
.requestMatchers("/messages/**").access(hasScope("messages"))
565
567
.anyRequest().authenticated()
566
568
)
567
- .oauth2ResourceServer(OAuth2ResourceServerConfigurer::opaqueToken);
569
+ .oauth2ResourceServer(oauth2 -> oauth2
570
+ .opaqueToken(Customizer.withDefaults())
571
+ );
568
572
return http.build();
569
573
}
570
574
}
You can’t perform that action at this time.
0 commit comments