Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Official documentation for WebSecurityConfigurerAdapter is wrong #11458

Closed
yhojann-cl opened this issue Jul 2, 2022 · 1 comment
Closed

Official documentation for WebSecurityConfigurerAdapter is wrong #11458

yhojann-cl opened this issue Jul 2, 2022 · 1 comment
Labels
in: docs An issue in Documentation or samples status: duplicate A duplicate of another issue type: enhancement A general enhancement

Comments

@yhojann-cl
Copy link

In the official documentation of Spring Security 6.0.0 have an deprecated example:

@Configuration
 @EnableWebSecurity
 public class AuthorizeUrlsSecurityConfig extends WebSecurityConfigurerAdapter {

        @Override
        protected void configure(HttpSecurity http) throws Exception {
                http.authorizeRequests().antMatchers("/**").hasRole("USER").and().formLogin();
        }

        @Override
        protected void configure(AuthenticationManagerBuilder auth) throws Exception {
                auth.inMemoryAuthentication().withUser("user").password("password").roles("USER")
                                .and().withUser("admin").password("password").roles("ADMIN", "USER");
        }
 }

But WebSecurityConfigurerAdapter is deprecated. The documentation has outdated examples, it should have recommended examples for this version.

@yhojann-cl yhojann-cl added status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement labels Jul 2, 2022
@sjohnr
Copy link
Member

sjohnr commented Jul 5, 2022

@yhojann-cl thanks for trying 6.0 and welcome to the project! This is a duplicate of gh-11288 so I'll go ahead and close this as a duplicate.

@sjohnr sjohnr closed this as completed Jul 5, 2022
@sjohnr sjohnr added status: duplicate A duplicate of another issue in: docs An issue in Documentation or samples and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: docs An issue in Documentation or samples status: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants