From 40d4dce3292d4595772f4a0fc3425421ead12713 Mon Sep 17 00:00:00 2001 From: Josh Cummings Date: Wed, 18 Dec 2019 10:53:59 -0700 Subject: [PATCH] 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 --- .../_includes/servlet/saml2/saml2-login.adoc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/docs/manual/src/docs/asciidoc/_includes/servlet/saml2/saml2-login.adoc b/docs/manual/src/docs/asciidoc/_includes/servlet/saml2/saml2-login.adoc index 0c308a50e2..71cfa96c55 100644 --- a/docs/manual/src/docs/asciidoc/_includes/servlet/saml2/saml2-login.adoc +++ b/docs/manual/src/docs/asciidoc/_includes/servlet/saml2/saml2-login.adoc @@ -258,10 +258,12 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { }; http + .authorizeRequests() + .anyRequest().authenticated() + .and() .saml2Login() - .addObjectPostProcessor(processor) + .addObjectPostProcessor(processor) ; - super.configure(http); } } ---- @@ -282,10 +284,12 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { authProvider.setAuthoritiesMapper(AUTHORITIES_MAPPER); authProvider.setAuthoritiesExtractor(AUTHORITIES_EXTRACTOR); http + .authorizeRequests() + .anyRequest().authenticated() + .and() .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 { AuthenticationManager authenticationManager = new MySaml2AuthenticationManager(...); http + .authorizeRequests() + .anyRequest().authenticated() + .and() .saml2Login() - .authenticationManager(authenticationManager) + .authenticationManager(authenticationManager) ; - super.configure(http); } } ----