Class ExceptionTranslationWebFilter

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.MessageSourceAware, org.springframework.web.server.WebFilter

    public class ExceptionTranslationWebFilter
    extends java.lang.Object
    implements org.springframework.web.server.WebFilter, org.springframework.context.MessageSourceAware
    Since:
    5.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.springframework.context.support.MessageSourceAccessor messages  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      reactor.core.publisher.Mono<java.lang.Void> filter​(org.springframework.web.server.ServerWebExchange exchange, org.springframework.web.server.WebFilterChain chain)  
      void setAccessDeniedHandler​(ServerAccessDeniedHandler accessDeniedHandler)
      Sets the access denied handler.
      void setAuthenticationEntryPoint​(ServerAuthenticationEntryPoint authenticationEntryPoint)
      Sets the authentication entry point used when authentication is required
      void setAuthenticationTrustResolver​(org.springframework.security.authentication.AuthenticationTrustResolver authenticationTrustResolver)
      Sets the authentication trust resolver.
      void setMessageSource​(org.springframework.context.MessageSource messageSource)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • messages

        protected org.springframework.context.support.MessageSourceAccessor messages
    • Constructor Detail

      • ExceptionTranslationWebFilter

        public ExceptionTranslationWebFilter()
    • Method Detail

      • filter

        public reactor.core.publisher.Mono<java.lang.Void> filter​(org.springframework.web.server.ServerWebExchange exchange,
                                                                  org.springframework.web.server.WebFilterChain chain)
        Specified by:
        filter in interface org.springframework.web.server.WebFilter
      • setAccessDeniedHandler

        public void setAccessDeniedHandler​(ServerAccessDeniedHandler accessDeniedHandler)
        Sets the access denied handler.
        Parameters:
        accessDeniedHandler - the access denied handler to use. Default is HttpStatusAccessDeniedHandler with HttpStatus.FORBIDDEN
      • setAuthenticationTrustResolver

        public void setAuthenticationTrustResolver​(org.springframework.security.authentication.AuthenticationTrustResolver authenticationTrustResolver)
        Sets the authentication trust resolver.
        Parameters:
        authenticationTrustResolver - the authentication trust resolver to use. Default is AuthenticationTrustResolverImpl
        Since:
        5.5
      • setMessageSource

        public void setMessageSource​(org.springframework.context.MessageSource messageSource)
        Specified by:
        setMessageSource in interface org.springframework.context.MessageSourceAware
        Since:
        5.5