Skip to content

Usage of deprecated function in JWT documentation  #13446

Closed
@sueszli

Description

@sueszli

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

  1. Install VSCode
  2. Install this official extension that warns you about deprecated functions: "redhat.java"
  3. 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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions