if (this.authorizeExchange != null) { ServerAuthenticationEntryPoint authenticationEntryPoint = getAuthenticationEntryPoint(); ExceptionTranslationWebFilter exceptionTranslationWebFilter = new ExceptionTranslationWebFilter(); if (authenticationEntryPoint != null) { exceptionTranslationWebFilter.setAuthenticationEntryPoint( authenticationEntryPoint); exceptionTranslationWebFilter.setAccessDeniedHandler( accessDeniedHandler);
@Override public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) { return chain.filter(exchange) .onErrorResume(AccessDeniedException.class, denied -> exchange.getPrincipal() .switchIfEmpty( commenceAuthentication(exchange, denied)) .flatMap( principal -> this.accessDeniedHandler .handle(exchange, denied)) ); }
@Override public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) { return chain.filter(exchange) .onErrorResume(AccessDeniedException.class, denied -> exchange.getPrincipal() .switchIfEmpty( commenceAuthentication(exchange, denied)) .flatMap( principal -> this.accessDeniedHandler.handle(exchange, denied)) ); }
if (this.authorizeExchange != null) { ServerAuthenticationEntryPoint authenticationEntryPoint = getAuthenticationEntryPoint(); ExceptionTranslationWebFilter exceptionTranslationWebFilter = new ExceptionTranslationWebFilter(); if (authenticationEntryPoint != null) { exceptionTranslationWebFilter.setAuthenticationEntryPoint( authenticationEntryPoint); exceptionTranslationWebFilter.setAccessDeniedHandler( accessDeniedHandler);
if (this.authorizeExchange != null) { ServerAuthenticationEntryPoint authenticationEntryPoint = getAuthenticationEntryPoint(); ExceptionTranslationWebFilter exceptionTranslationWebFilter = new ExceptionTranslationWebFilter(); if (authenticationEntryPoint != null) { exceptionTranslationWebFilter.setAuthenticationEntryPoint( authenticationEntryPoint); exceptionTranslationWebFilter.setAccessDeniedHandler( accessDeniedHandler);