浏览代码

Polish Documentation

Changed indentation on saml2Login() snippets to align more closely
with surrounding documentation.

Also removed call to super.configure as this would enable formLogin as
well as httpBasic. Replaced with default endpoint authorization
statement.

Issue gh-7654
Josh Cummings 5 年之前
父节点
当前提交
40d4dce329
共有 1 个文件被更改,包括 12 次插入6 次删除
  1. 12 6
      docs/manual/src/docs/asciidoc/_includes/servlet/saml2/saml2-login.adoc

+ 12 - 6
docs/manual/src/docs/asciidoc/_includes/servlet/saml2/saml2-login.adoc

@@ -258,10 +258,12 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
         };
         };
 
 
         http
         http
+            .authorizeRequests()
+                .anyRequest().authenticated()
+                .and()
             .saml2Login()
             .saml2Login()
-            .addObjectPostProcessor(processor)
+                .addObjectPostProcessor(processor)
         ;
         ;
-        super.configure(http);
     }
     }
 }
 }
 ----
 ----
@@ -282,10 +284,12 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
         authProvider.setAuthoritiesMapper(AUTHORITIES_MAPPER);
         authProvider.setAuthoritiesMapper(AUTHORITIES_MAPPER);
         authProvider.setAuthoritiesExtractor(AUTHORITIES_EXTRACTOR);
         authProvider.setAuthoritiesExtractor(AUTHORITIES_EXTRACTOR);
         http
         http
+            .authorizeRequests()
+                .anyRequest().authenticated()
+                .and()
             .saml2Login()
             .saml2Login()
-            .authenticationManager(new ProviderManager(asList(authProvider)))
+                .authenticationManager(new ProviderManager(asList(authProvider)))
         ;
         ;
-        super.configure(http);
     }
     }
 }
 }
 ----
 ----
@@ -305,10 +309,12 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
     protected void configure(HttpSecurity http) throws Exception {
     protected void configure(HttpSecurity http) throws Exception {
         AuthenticationManager authenticationManager = new MySaml2AuthenticationManager(...);
         AuthenticationManager authenticationManager = new MySaml2AuthenticationManager(...);
         http
         http
+            .authorizeRequests()
+                .anyRequest().authenticated()
+                .and()
             .saml2Login()
             .saml2Login()
-            .authenticationManager(authenticationManager)
+                .authenticationManager(authenticationManager)
         ;
         ;
-        super.configure(http);
     }
     }
 }
 }
 ----
 ----