From bf570854b8347c6648a67bba5ce2e7e24e828d69 Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Tue, 14 Nov 2017 15:31:21 -0600 Subject: [PATCH] serverLogoutHandler->logoutHandler Issue: gh-4822 --- .../security/config/web/server/ServerHttpSecurity.java | 4 ++-- .../server/authentication/logout/LogoutWebFilter.java | 10 +++++----- 2 files changed, 7 insertions(+), 7 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 206ebae495..17d865d3d7 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 @@ -736,8 +736,8 @@ public class ServerHttpSecurity { public final class LogoutSpec { private LogoutWebFilter logoutWebFilter = new LogoutWebFilter(); - public LogoutSpec logoutHandler(ServerLogoutHandler serverLogoutHandler) { - this.logoutWebFilter.setServerLogoutHandler(serverLogoutHandler); + public LogoutSpec logoutHandler(ServerLogoutHandler logoutHandler) { + this.logoutWebFilter.setLogoutHandler(logoutHandler); return this; } diff --git a/web/src/main/java/org/springframework/security/web/server/authentication/logout/LogoutWebFilter.java b/web/src/main/java/org/springframework/security/web/server/authentication/logout/LogoutWebFilter.java index e414cba6a9..5216157483 100644 --- a/web/src/main/java/org/springframework/security/web/server/authentication/logout/LogoutWebFilter.java +++ b/web/src/main/java/org/springframework/security/web/server/authentication/logout/LogoutWebFilter.java @@ -42,7 +42,7 @@ public class LogoutWebFilter implements WebFilter { private AnonymousAuthenticationToken anonymousAuthenticationToken = new AnonymousAuthenticationToken("key", "anonymous", AuthorityUtils.createAuthorityList("ROLE_ANONYMOUS")); - private ServerLogoutHandler serverLogoutHandler = new SecurityContextServerLogoutHandler(); + private ServerLogoutHandler logoutHandler = new SecurityContextServerLogoutHandler(); private ServerLogoutSuccessHandler serverLogoutSuccessHandler = new RedirectServerLogoutSuccessHandler(); @@ -69,7 +69,7 @@ public class LogoutWebFilter implements WebFilter { } private Mono logout(WebFilterExchange webFilterExchange, Authentication authentication) { - return this.serverLogoutHandler.logout(webFilterExchange, authentication) + return this.logoutHandler.logout(webFilterExchange, authentication) .then(this.serverLogoutSuccessHandler.onLogoutSuccess(webFilterExchange, authentication)) .subscriberContext(ReactiveSecurityContextHolder.clearContext()); } @@ -84,9 +84,9 @@ public class LogoutWebFilter implements WebFilter { this.serverLogoutSuccessHandler = serverLogoutSuccessHandler; } - public void setServerLogoutHandler(ServerLogoutHandler serverLogoutHandler) { - Assert.notNull(serverLogoutHandler, "logoutHandler must not be null"); - this.serverLogoutHandler = serverLogoutHandler; + public void setLogoutHandler(ServerLogoutHandler logoutHandler) { + Assert.notNull(logoutHandler, "logoutHandler must not be null"); + this.logoutHandler = logoutHandler; } public void setRequiresLogout(ServerWebExchangeMatcher serverWebExchangeMatcher) {