mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-28 14:52:24 +00:00
Polish AuthenticationWebFilter
Code style
This commit is contained in:
parent
4ff0b52f74
commit
3e399f03a4
@ -53,11 +53,11 @@ public class AuthenticationWebFilter implements WebFilter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
|
public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
|
||||||
return authenticationConverter.apply(exchange)
|
return this.authenticationConverter.apply(exchange)
|
||||||
.switchIfEmpty(Mono.defer(() -> chain.filter(exchange).cast(Authentication.class)))
|
.switchIfEmpty(Mono.defer(() -> chain.filter(exchange).cast(Authentication.class)))
|
||||||
.flatMap( token -> authenticationManager.authenticate(token)
|
.flatMap( token -> this.authenticationManager.authenticate(token)
|
||||||
.flatMap(authentication -> authenticationSuccessHandler.success(authentication, exchange, chain))
|
.flatMap(authentication -> this.authenticationSuccessHandler.success(authentication, exchange, chain))
|
||||||
.onErrorResume( AuthenticationException.class, t -> entryPoint.commence(exchange, t))
|
.onErrorResume( AuthenticationException.class, t -> this.entryPoint.commence(exchange, t))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user