Closed
Description
Describe the bug
The Spring Security 6.1.1 documentation contains functions which are marked as deprecated by the RedHat VSCode extension.
Here is the warning that I am getting:
The method jwt() from the type OAuth2ResourceServerConfigurer<HttpSecurity> has been deprecated since version 6.1 and marked for removalJava(67110275)
Here is the documentation:
To Reproduce
- Install VSCode
- Install this official extension that warns you about deprecated functions: "redhat.java"
- Write this code snippet into your project:
// ... lines removed for brevity
@RequiredArgsConstructor
@Configuration
@EnableWebSecurity
public class SecurityConfig {
// ... lines removed for brevity
@Bean
public SecurityFilterChain filterChain(HttpSecurity http, AuthenticationConfiguration authenticationConfiguration) throws Exception {
http.authorizeHttpRequests(authorize -> authorize.anyRequest());
http.oauth2ResourceServer(OAuth2ResourceServerConfigurer::jwt); // <---- warning shows up here
// ... lines removed for brevity
return http.build();
}
}
Expected behavior
I expected the documentation not to contain deprecated code snippets.