2
0
Steve Riesenberg 3 жил өмнө
parent
commit
15f525c614

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

@@ -186,23 +186,23 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
 	 * &#064;EnableWebSecurity
 	 * public class CsrfSecurityConfig {
 	 *
-	 *     &#064;Bean
-	 *     public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
-	 *         http
-	 *             .headers()
-	 *                 .contentTypeOptions()
-	 *                 .and()
-	 *                 .xssProtection()
-	 *                 .and()
-	 *                 .cacheControl()
-	 *                 .and()
-	 *                 .httpStrictTransportSecurity()
-	 *                 .and()
-	 *                 .frameOptions()
-	 *                 .and()
-	 *             ...;
-	 *         return http.build();
-	 *     }
+	 * 	&#064;Bean
+	 * 	public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
+	 * 		http
+	 * 			.headers()
+	 * 				.contentTypeOptions()
+	 * 				.and()
+	 * 				.xssProtection()
+	 * 				.and()
+	 * 				.cacheControl()
+	 * 				.and()
+	 * 				.httpStrictTransportSecurity()
+	 * 				.and()
+	 * 				.frameOptions()
+	 * 				.and()
+	 * 			...;
+	 * 		return http.build();
+	 * 	}
 	 * }
 	 * </pre>
 	 *
@@ -213,13 +213,13 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
 	 * &#064;EnableWebSecurity
 	 * public class CsrfSecurityConfig {
 	 *
-	 *     &#064;Bean
-	 *     public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
-	 *         http
-	 *             .headers().disable()
-	 *             ...;
-	 *         return http.build();
-	 *     }
+	 * 	&#064;Bean
+	 * 	public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
+	 * 		http
+	 * 			.headers().disable()
+	 * 			...;
+	 * 		return http.build();
+	 * 	}
 	 * }
 	 * </pre>
 	 *
@@ -234,18 +234,18 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
 	 * &#064;EnableWebSecurity
 	 * public class CsrfSecurityConfig {
 	 *
-	 *     &#064;Bean
-	 *     public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
-	 *         http
-	 *             .headers()
-	 *                  .defaultsDisabled()
-	 *                  .cacheControl()
-	 *                  .and()
-	 *                  .frameOptions()
-	 *                  .and()
-	 *             ...;
-	 *         return http.build();
-	 *     }
+	 * 	&#064;Bean
+	 * 	public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
+	 * 		http
+	 * 			.headers()
+	 * 				.defaultsDisabled()
+	 * 				.cacheControl()
+	 * 				.and()
+	 * 				.frameOptions()
+	 * 				.and()
+	 * 			...;
+	 * 		return http.build();
+	 * 	}
 	 * }
 	 * </pre>
 	 *
@@ -258,16 +258,16 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
 	 * &#064;EnableWebSecurity
 	 * public class CsrfSecurityConfig {
 	 *
-	 *     &#064;Bean
-	 *     public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
-	 *         http
-	 *             .headers()
-	 *                  .frameOptions()
-	 *                  	.disable()
-	 *                  .and()
-	 *             ...;
-	 *         return http.build();
-	 *     }
+	 * 	&#064;Bean
+	 * 	public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
+	 * 		http
+	 * 			.headers()
+	 * 				 .frameOptions()
+	 * 				 	.disable()
+	 * 				 .and()
+	 * 			...;
+	 * 		return http.build();
+	 * 	}
 	 * }
 	 * </pre>
 	 * @return the {@link HeadersConfigurer} for further customizations
@@ -403,12 +403,12 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
 	 * &#064;EnableWebSecurity
 	 * public class CorsSecurityConfig {
 	 *
-	 *     &#064;Bean
-	 *     public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
-	 *         http
-	 *             .cors(withDefaults());
-	 *         return http.build();
-	 *     }
+	 * 	&#064;Bean
+	 * 	public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
+	 * 		http
+	 * 			.cors(withDefaults());
+	 * 		return http.build();
+	 * 	}
 	 * }
 	 * </pre>
 	 * @param corsCustomizer the {@link Customizer} to provide more options for the
@@ -1614,13 +1614,13 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
 	 * &#064;EnableWebSecurity
 	 * public class CsrfSecurityConfig {
 	 *
-	 *     &#064;Bean
-	 *     public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
-	 *         http
-	 *             .csrf().disable()
-	 *             ...;
-	 *         return http.build();
-	 *     }
+	 * 	&#064;Bean
+	 * 	public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
+	 * 		http
+	 * 			.csrf().disable()
+	 * 			...;
+	 * 		return http.build();
+	 * 	}
 	 * }
 	 * </pre>
 	 * @return the {@link CsrfConfigurer} for further customizations
@@ -1640,12 +1640,12 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
 	 * &#064;EnableWebSecurity
 	 * public class CsrfSecurityConfig {
 	 *
-	 *     &#064;Bean
-	 *     public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
-	 *         http
-	 *             .csrf((csrf) -&gt; csrf.disable());
-	 *         return http.build();
-	 *     }
+	 * 	&#064;Bean
+	 * 	public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
+	 * 		http
+	 * 			.csrf((csrf) -&gt; csrf.disable());
+	 * 		return http.build();
+	 * 	}
 	 * }
 	 * </pre>
 	 * @param csrfCustomizer the {@link Customizer} to provide more options for the