|
@@ -40,6 +40,7 @@ public class AuthorizationWebFilter implements WebFilter {
|
|
@Override
|
|
@Override
|
|
public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
|
|
public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
|
|
return ReactiveSecurityContextHolder.getContext()
|
|
return ReactiveSecurityContextHolder.getContext()
|
|
|
|
+ .filter(c -> c.getAuthentication() != null)
|
|
.map(SecurityContext::getAuthentication)
|
|
.map(SecurityContext::getAuthentication)
|
|
.as(authentication -> this.accessDecisionManager.verify(authentication, exchange))
|
|
.as(authentication -> this.accessDecisionManager.verify(authentication, exchange))
|
|
.switchIfEmpty(chain.filter(exchange));
|
|
.switchIfEmpty(chain.filter(exchange));
|