|
270 | 270 | * @Bean |
271 | 271 | * public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { |
272 | 272 | * http |
273 | | - * .authorizeExchange() |
274 | | - * .anyExchange().authenticated() |
275 | | - * .and() |
276 | | - * .httpBasic().and() |
| 273 | + * .authorizeExchange((exchange) -> exchange.anyExchange().authenticated()) |
| 274 | + * .httpBasic(Customizer.withDefaults()) |
277 | 275 | * .formLogin(); |
278 | 276 | * return http.build(); |
279 | 277 | * } |
@@ -1219,9 +1217,8 @@ public ServerHttpSecurity oidcLogout(Customizer<OidcLogoutSpec> oidcLogoutCustom |
1219 | 1217 | * // ... |
1220 | 1218 | * .headers() |
1221 | 1219 | * // customize frame options to be same origin |
1222 | | - * .frameOptions() |
1223 | | - * .mode(XFrameOptionsServerHttpHeadersWriter.Mode.SAMEORIGIN) |
1224 | | - * .and() |
| 1220 | + * .frameOptions((frame) -> frame |
| 1221 | + * .mode(XFrameOptionsServerHttpHeadersWriter.Mode.SAMEORIGIN)) |
1225 | 1222 | * // disable cache control |
1226 | 1223 | * .cache().disable(); |
1227 | 1224 | * return http.build(); |
@@ -1857,7 +1854,7 @@ protected void setApplicationContext(ApplicationContext applicationContext) thro |
1857 | 1854 | * |
1858 | 1855 | * @author Rob Winch |
1859 | 1856 | * @since 5.0 |
1860 | | - * @see #authorizeExchange() |
| 1857 | + * @see #authorizeExchange(Customizer) |
1861 | 1858 | */ |
1862 | 1859 | public class AuthorizeExchangeSpec extends AbstractServerWebExchangeMatcherRegistry<AuthorizeExchangeSpec.Access> { |
1863 | 1860 |
|
@@ -2306,7 +2303,7 @@ public Duration getMaxIdleTime() { |
2306 | 2303 | * |
2307 | 2304 | * @author Josh Cummings |
2308 | 2305 | * @since 5.1 |
2309 | | - * @see #redirectToHttps() |
| 2306 | + * @see #redirectToHttps(Customizer) |
2310 | 2307 | */ |
2311 | 2308 | public class HttpsRedirectSpec { |
2312 | 2309 |
|
@@ -2380,7 +2377,7 @@ public ServerHttpSecurity and() { |
2380 | 2377 | * |
2381 | 2378 | * @author Rob Winch |
2382 | 2379 | * @since 5.0 |
2383 | | - * @see #csrf() |
| 2380 | + * @see #csrf(Customizer) |
2384 | 2381 | */ |
2385 | 2382 | public final class CsrfSpec { |
2386 | 2383 |
|
@@ -2483,7 +2480,7 @@ protected void configure(ServerHttpSecurity http) { |
2483 | 2480 | * |
2484 | 2481 | * @author Rob Winch |
2485 | 2482 | * @since 5.0 |
2486 | | - * @see #exceptionHandling() |
| 2483 | + * @see #exceptionHandling(Customizer) |
2487 | 2484 | */ |
2488 | 2485 | public final class ExceptionHandlingSpec { |
2489 | 2486 |
|
@@ -2532,7 +2529,7 @@ public ServerHttpSecurity and() { |
2532 | 2529 | * |
2533 | 2530 | * @author Rob Winch |
2534 | 2531 | * @since 5.0 |
2535 | | - * @see #requestCache() |
| 2532 | + * @see #requestCache(Customizer) |
2536 | 2533 | */ |
2537 | 2534 | public final class RequestCacheSpec { |
2538 | 2535 |
|
@@ -2588,7 +2585,7 @@ public ServerHttpSecurity disable() { |
2588 | 2585 | * |
2589 | 2586 | * @author Rob Winch |
2590 | 2587 | * @since 5.0 |
2591 | | - * @see #httpBasic() |
| 2588 | + * @see #httpBasic(Customizer) |
2592 | 2589 | */ |
2593 | 2590 | public final class HttpBasicSpec { |
2594 | 2591 |
|
@@ -2814,7 +2811,7 @@ private PasswordManagementSpec() { |
2814 | 2811 | * |
2815 | 2812 | * @author Rob Winch |
2816 | 2813 | * @since 5.0 |
2817 | | - * @see #formLogin() |
| 2814 | + * @see #formLogin(Customizer) |
2818 | 2815 | */ |
2819 | 2816 | public final class FormLoginSpec { |
2820 | 2817 |
|
@@ -3080,7 +3077,7 @@ protected void configure(ServerHttpSecurity http) { |
3080 | 3077 | * |
3081 | 3078 | * @author Rob Winch |
3082 | 3079 | * @since 5.0 |
3083 | | - * @see #headers() |
| 3080 | + * @see #headers(Customizer) |
3084 | 3081 | */ |
3085 | 3082 | public final class HeaderSpec { |
3086 | 3083 |
|
@@ -3916,7 +3913,7 @@ public HeaderSpec and() { |
3916 | 3913 | * |
3917 | 3914 | * @author Shazin Sadakath |
3918 | 3915 | * @since 5.0 |
3919 | | - * @see #logout() |
| 3916 | + * @see #logout(Customizer) |
3920 | 3917 | */ |
3921 | 3918 | public final class LogoutSpec { |
3922 | 3919 |
|
@@ -4136,7 +4133,7 @@ private CorsWebFilter getCorsFilter() { |
4136 | 4133 | * |
4137 | 4134 | * @author Alexey Nesterov |
4138 | 4135 | * @since 5.2 |
4139 | | - * @see #x509() |
| 4136 | + * @see #x509(Customizer) |
4140 | 4137 | */ |
4141 | 4138 | public final class X509Spec { |
4142 | 4139 |
|
@@ -5275,7 +5272,7 @@ private void registerDefaultCsrfOverride(ServerHttpSecurity http) { |
5275 | 5272 | AndServerWebExchangeMatcher matcher = new AndServerWebExchangeMatcher( |
5276 | 5273 | CsrfWebFilter.DEFAULT_CSRF_MATCHER, |
5277 | 5274 | new NegatedServerWebExchangeMatcher(this.authenticationConverterServerWebExchangeMatcher)); |
5278 | | - http.csrf().requireCsrfProtectionMatcher(matcher); |
| 5275 | + http.csrf((csrf) -> csrf.requireCsrfProtectionMatcher(matcher)); |
5279 | 5276 | } |
5280 | 5277 | } |
5281 | 5278 |
|
|
0 commit comments