From 76195560660b027b49122149f4f9caacbf107630 Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Mon, 13 Nov 2017 15:59:37 -0600 Subject: [PATCH] FormLoginBuilder->FormLoginSpec Issue: gh-4822 --- .../config/web/server/ServerHttpSecurity.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java b/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java index b5f1abca95..7841094e35 100644 --- a/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java +++ b/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java @@ -107,7 +107,7 @@ public class ServerHttpSecurity { private final RequestCacheSpec requestCache = new RequestCacheSpec(); - private FormLoginBuilder formLogin; + private FormLoginSpec formLogin; private LogoutBuilder logout = new LogoutBuilder(); @@ -168,9 +168,9 @@ public class ServerHttpSecurity { return this.httpBasic; } - public FormLoginBuilder formLogin() { + public FormLoginSpec formLogin() { if(this.formLogin == null) { - this.formLogin = new FormLoginBuilder(); + this.formLogin = new FormLoginSpec(); } return this.formLogin; } @@ -528,7 +528,7 @@ public class ServerHttpSecurity { * @author Rob Winch * @since 5.0 */ - public class FormLoginBuilder { + public class FormLoginSpec { private final RedirectServerAuthenticationSuccessHandler defaultSuccessHandler = new RedirectServerAuthenticationSuccessHandler("/"); private RedirectServerAuthenticationEntryPoint defaultEntryPoint; @@ -545,19 +545,19 @@ public class ServerHttpSecurity { private ServerAuthenticationSuccessHandler serverAuthenticationSuccessHandler = this.defaultSuccessHandler; - public FormLoginBuilder authenticationManager(ReactiveAuthenticationManager authenticationManager) { + public FormLoginSpec authenticationManager(ReactiveAuthenticationManager authenticationManager) { this.authenticationManager = authenticationManager; return this; } - public FormLoginBuilder serverAuthenticationSuccessHandler( + public FormLoginSpec serverAuthenticationSuccessHandler( ServerAuthenticationSuccessHandler serverAuthenticationSuccessHandler) { Assert.notNull(serverAuthenticationSuccessHandler, "serverAuthenticationSuccessHandler cannot be null"); this.serverAuthenticationSuccessHandler = serverAuthenticationSuccessHandler; return this; } - public FormLoginBuilder loginPage(String loginPage) { + public FormLoginSpec loginPage(String loginPage) { this.defaultEntryPoint = new RedirectServerAuthenticationEntryPoint(loginPage); this.serverAuthenticationEntryPoint = this.defaultEntryPoint; this.requiresAuthenticationMatcher = ServerWebExchangeMatchers.pathMatchers(HttpMethod.POST, loginPage); @@ -565,22 +565,22 @@ public class ServerHttpSecurity { return this; } - public FormLoginBuilder authenticationEntryPoint(ServerAuthenticationEntryPoint serverAuthenticationEntryPoint) { + public FormLoginSpec authenticationEntryPoint(ServerAuthenticationEntryPoint serverAuthenticationEntryPoint) { this.serverAuthenticationEntryPoint = serverAuthenticationEntryPoint; return this; } - public FormLoginBuilder requiresAuthenticationMatcher(ServerWebExchangeMatcher requiresAuthenticationMatcher) { + public FormLoginSpec requiresAuthenticationMatcher(ServerWebExchangeMatcher requiresAuthenticationMatcher) { this.requiresAuthenticationMatcher = requiresAuthenticationMatcher; return this; } - public FormLoginBuilder authenticationFailureHandler(ServerAuthenticationFailureHandler serverAuthenticationFailureHandler) { + public FormLoginSpec authenticationFailureHandler(ServerAuthenticationFailureHandler serverAuthenticationFailureHandler) { this.serverAuthenticationFailureHandler = serverAuthenticationFailureHandler; return this; } - public FormLoginBuilder securityContextRepository(ServerSecurityContextRepository serverSecurityContextRepository) { + public FormLoginSpec securityContextRepository(ServerSecurityContextRepository serverSecurityContextRepository) { this.serverSecurityContextRepository = serverSecurityContextRepository; return this; } @@ -619,7 +619,7 @@ public class ServerHttpSecurity { http.addFilterAt(authenticationFilter, SecurityWebFiltersOrder.FORM_LOGIN); } - private FormLoginBuilder() { + private FormLoginSpec() { } }