1
0
mirror of synced 2026-08-06 02:08:01 +00:00

serverAuthenticationSuccessHandler->authenticationSuccessHandler

Issue: gh-4822
This commit is contained in:
Rob Winch
2017-11-14 15:05:06 -06:00
parent 5c83f92ddc
commit 520e0a5a68
4 changed files with 12 additions and 12 deletions
@@ -43,7 +43,7 @@ public class AuthenticationWebFilter implements WebFilter {
private final ReactiveAuthenticationManager authenticationManager;
private ServerAuthenticationSuccessHandler serverAuthenticationSuccessHandler = new WebFilterChainServerAuthenticationSuccessHandler();
private ServerAuthenticationSuccessHandler authenticationSuccessHandler = new WebFilterChainServerAuthenticationSuccessHandler();
private Function<ServerWebExchange,Mono<Authentication>> authenticationConverter = new ServerHttpBasicAuthenticationConverter();
@@ -81,7 +81,7 @@ public class AuthenticationWebFilter implements WebFilter {
SecurityContextImpl securityContext = new SecurityContextImpl();
securityContext.setAuthentication(authentication);
return this.securityContextRepository.save(exchange, securityContext)
.then(this.serverAuthenticationSuccessHandler
.then(this.authenticationSuccessHandler
.onAuthenticationSuccess(webFilterExchange, authentication));
}
@@ -91,8 +91,8 @@ public class AuthenticationWebFilter implements WebFilter {
this.securityContextRepository = securityContextRepository;
}
public void setServerAuthenticationSuccessHandler(ServerAuthenticationSuccessHandler serverAuthenticationSuccessHandler) {
this.serverAuthenticationSuccessHandler = serverAuthenticationSuccessHandler;
public void setAuthenticationSuccessHandler(ServerAuthenticationSuccessHandler authenticationSuccessHandler) {
this.authenticationSuccessHandler = authenticationSuccessHandler;
}
public void setAuthenticationConverter(Function<ServerWebExchange,Mono<Authentication>> authenticationConverter) {
@@ -69,7 +69,7 @@ public class AuthenticationWebFilterTests {
@Before
public void setup() {
this.filter = new AuthenticationWebFilter(this.authenticationManager);
this.filter.setServerAuthenticationSuccessHandler(this.successHandler);
this.filter.setAuthenticationSuccessHandler(this.successHandler);
this.filter.setAuthenticationConverter(this.authenticationConverter);
this.filter.setSecurityContextRepository(this.securityContextRepository);
this.filter.setAuthenticationFailureHandler(this.failureHandler);