Skip to content

Commit 99f768b

Browse files
Steve Riesenbergsjohnr
Steve Riesenberg
authored andcommitted
Polish HttpSecurity
1 parent 984355e commit 99f768b

File tree

1 file changed

+65
-65
lines changed
  • config/src/main/java/org/springframework/security/config/annotation/web/builders

1 file changed

+65
-65
lines changed

config/src/main/java/org/springframework/security/config/annotation/web/builders/HttpSecurity.java

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -408,23 +408,23 @@ public HttpSecurity openidLogin(Customizer<OpenIDLoginConfigurer<HttpSecurity>>
408408
* &#064;EnableWebSecurity
409409
* public class CsrfSecurityConfig {
410410
*
411-
* &#064;Bean
412-
* public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
413-
* http
414-
* .headers()
415-
* .contentTypeOptions()
416-
* .and()
417-
* .xssProtection()
418-
* .and()
419-
* .cacheControl()
420-
* .and()
421-
* .httpStrictTransportSecurity()
422-
* .and()
423-
* .frameOptions()
424-
* .and()
425-
* ...;
426-
* return http.build();
427-
* }
411+
* &#064;Bean
412+
* public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
413+
* http
414+
* .headers()
415+
* .contentTypeOptions()
416+
* .and()
417+
* .xssProtection()
418+
* .and()
419+
* .cacheControl()
420+
* .and()
421+
* .httpStrictTransportSecurity()
422+
* .and()
423+
* .frameOptions()
424+
* .and()
425+
* ...;
426+
* return http.build();
427+
* }
428428
* }
429429
* </pre>
430430
*
@@ -435,13 +435,13 @@ public HttpSecurity openidLogin(Customizer<OpenIDLoginConfigurer<HttpSecurity>>
435435
* &#064;EnableWebSecurity
436436
* public class CsrfSecurityConfig {
437437
*
438-
* &#064;Bean
439-
* public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
440-
* http
441-
* .headers().disable()
442-
* ...;
443-
* return http.build();
444-
* }
438+
* &#064;Bean
439+
* public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
440+
* http
441+
* .headers().disable()
442+
* ...;
443+
* return http.build();
444+
* }
445445
* }
446446
* </pre>
447447
*
@@ -456,18 +456,18 @@ public HttpSecurity openidLogin(Customizer<OpenIDLoginConfigurer<HttpSecurity>>
456456
* &#064;EnableWebSecurity
457457
* public class CsrfSecurityConfig {
458458
*
459-
* &#064;Bean
460-
* public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
461-
* http
462-
* .headers()
463-
* .defaultsDisabled()
464-
* .cacheControl()
465-
* .and()
466-
* .frameOptions()
467-
* .and()
468-
* ...;
469-
* return http.build();
470-
* }
459+
* &#064;Bean
460+
* public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
461+
* http
462+
* .headers()
463+
* .defaultsDisabled()
464+
* .cacheControl()
465+
* .and()
466+
* .frameOptions()
467+
* .and()
468+
* ...;
469+
* return http.build();
470+
* }
471471
* }
472472
* </pre>
473473
*
@@ -480,16 +480,16 @@ public HttpSecurity openidLogin(Customizer<OpenIDLoginConfigurer<HttpSecurity>>
480480
* &#064;EnableWebSecurity
481481
* public class CsrfSecurityConfig {
482482
*
483-
* &#064;Bean
484-
* public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
485-
* http
486-
* .headers()
487-
* .frameOptions()
488-
* .disable()
489-
* .and()
490-
* ...;
491-
* return http.build();
492-
* }
483+
* &#064;Bean
484+
* public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
485+
* http
486+
* .headers()
487+
* .frameOptions()
488+
* .disable()
489+
* .and()
490+
* ...;
491+
* return http.build();
492+
* }
493493
* }
494494
* </pre>
495495
* @return the {@link HeadersConfigurer} for further customizations
@@ -625,12 +625,12 @@ public CorsConfigurer<HttpSecurity> cors() throws Exception {
625625
* &#064;EnableWebSecurity
626626
* public class CorsSecurityConfig {
627627
*
628-
* &#064;Bean
629-
* public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
630-
* http
631-
* .cors(withDefaults());
632-
* return http.build();
633-
* }
628+
* &#064;Bean
629+
* public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
630+
* http
631+
* .cors(withDefaults());
632+
* return http.build();
633+
* }
634634
* }
635635
* </pre>
636636
* @param corsCustomizer the {@link Customizer} to provide more options for the
@@ -1836,13 +1836,13 @@ public HttpSecurity servletApi(Customizer<ServletApiConfigurer<HttpSecurity>> se
18361836
* &#064;EnableWebSecurity
18371837
* public class CsrfSecurityConfig {
18381838
*
1839-
* &#064;Bean
1840-
* public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
1841-
* http
1842-
* .csrf().disable()
1843-
* ...;
1844-
* return http.build();
1845-
* }
1839+
* &#064;Bean
1840+
* public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
1841+
* http
1842+
* .csrf().disable()
1843+
* ...;
1844+
* return http.build();
1845+
* }
18461846
* }
18471847
* </pre>
18481848
* @return the {@link CsrfConfigurer} for further customizations
@@ -1862,12 +1862,12 @@ public CsrfConfigurer<HttpSecurity> csrf() throws Exception {
18621862
* &#064;EnableWebSecurity
18631863
* public class CsrfSecurityConfig {
18641864
*
1865-
* &#064;Bean
1866-
* public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
1867-
* http
1868-
* .csrf((csrf) -&gt; csrf.disable());
1869-
* return http.build();
1870-
* }
1865+
* &#064;Bean
1866+
* public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
1867+
* http
1868+
* .csrf((csrf) -&gt; csrf.disable());
1869+
* return http.build();
1870+
* }
18711871
* }
18721872
* </pre>
18731873
* @param csrfCustomizer the {@link Customizer} to provide more options for the

0 commit comments

Comments
 (0)