Fix Javadoc for anonymous
This commit is contained in:
parent
4fa1d08e20
commit
98e75eb51a
|
@ -1611,14 +1611,18 @@ public final class HttpSecurity extends
|
|||
* <pre>
|
||||
* @Configuration
|
||||
* @EnableWebSecurity
|
||||
* public class AnononymousSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
* public class AnonymousSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
*
|
||||
* @Override
|
||||
* protected void configure(HttpSecurity http) throws Exception {
|
||||
* http.authorizeRequests().antMatchers("/**").hasRole("USER").and().formLogin()
|
||||
* http
|
||||
* .authorizeRequests()
|
||||
* .antMatchers("/**").hasRole("USER")
|
||||
* .and()
|
||||
* // sample anonymous customization
|
||||
* .anonymous().authorities("ROLE_ANON");
|
||||
* .formLogin()
|
||||
* .and()
|
||||
* // sample anonymous customization
|
||||
* .anonymous().authorities("ROLE_ANON");
|
||||
* }
|
||||
*
|
||||
* @Override
|
||||
|
@ -1635,14 +1639,18 @@ public final class HttpSecurity extends
|
|||
* <pre>
|
||||
* @Configuration
|
||||
* @EnableWebSecurity
|
||||
* public class AnononymousSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
* public class AnonymousSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
*
|
||||
* @Override
|
||||
* protected void configure(HttpSecurity http) throws Exception {
|
||||
* http.authorizeRequests().antMatchers("/**").hasRole("USER").and().formLogin()
|
||||
* http
|
||||
* .authorizeRequests()
|
||||
* .antMatchers("/**").hasRole("USER")
|
||||
* .and()
|
||||
* // sample anonymous customization
|
||||
* .anonymous().disabled();
|
||||
* .formLogin()
|
||||
* .and()
|
||||
* // sample anonymous customization
|
||||
* .anonymous().disable();
|
||||
* }
|
||||
*
|
||||
* @Override
|
||||
|
@ -1674,7 +1682,7 @@ public final class HttpSecurity extends
|
|||
* <pre>
|
||||
* @Configuration
|
||||
* @EnableWebSecurity
|
||||
* public class AnononymousSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
* public class AnonymousSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
*
|
||||
* @Override
|
||||
* protected void configure(HttpSecurity http) throws Exception {
|
||||
|
@ -1712,9 +1720,14 @@ public final class HttpSecurity extends
|
|||
* .formLogin(withDefaults())
|
||||
* // sample anonymous customization
|
||||
* .anonymous(anonymous ->
|
||||
* anonymous.disabled()
|
||||
* anonymous.disable()
|
||||
* );
|
||||
* }
|
||||
*
|
||||
* @Override
|
||||
* protected void configure(AuthenticationManagerBuilder auth) throws Exception {
|
||||
* auth.inMemoryAuthentication().withUser("user").password("password").roles("USER");
|
||||
* }
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue