Skip to content

Commit 40d4dce

Browse files
committed
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
1 parent c745889 commit 40d4dce

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

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

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,12 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
258258
};
259259
260260
http
261+
.authorizeRequests()
262+
.anyRequest().authenticated()
263+
.and()
261264
.saml2Login()
262-
.addObjectPostProcessor(processor)
265+
.addObjectPostProcessor(processor)
263266
;
264-
super.configure(http);
265267
}
266268
}
267269
----
@@ -282,10 +284,12 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
282284
authProvider.setAuthoritiesMapper(AUTHORITIES_MAPPER);
283285
authProvider.setAuthoritiesExtractor(AUTHORITIES_EXTRACTOR);
284286
http
287+
.authorizeRequests()
288+
.anyRequest().authenticated()
289+
.and()
285290
.saml2Login()
286-
.authenticationManager(new ProviderManager(asList(authProvider)))
291+
.authenticationManager(new ProviderManager(asList(authProvider)))
287292
;
288-
super.configure(http);
289293
}
290294
}
291295
----
@@ -305,10 +309,12 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
305309
protected void configure(HttpSecurity http) throws Exception {
306310
AuthenticationManager authenticationManager = new MySaml2AuthenticationManager(...);
307311
http
312+
.authorizeRequests()
313+
.anyRequest().authenticated()
314+
.and()
308315
.saml2Login()
309-
.authenticationManager(authenticationManager)
316+
.authenticationManager(authenticationManager)
310317
;
311-
super.configure(http);
312318
}
313319
}
314320
----

0 commit comments

Comments
 (0)