Class AuthenticationPayloadInterceptor

  • All Implemented Interfaces:
    org.springframework.core.Ordered, PayloadInterceptor

    public class AuthenticationPayloadInterceptor
    extends java.lang.Object
    implements PayloadInterceptor, org.springframework.core.Ordered
    Uses the provided ReactiveAuthenticationManager to authenticate a Payload. If authentication is successful, then the result is added to ReactiveSecurityContextHolder.
    • Constructor Detail

      • AuthenticationPayloadInterceptor

        public AuthenticationPayloadInterceptor​(ReactiveAuthenticationManager authenticationManager)
        Creates a new instance
        authenticationManager - the manager to use. Cannot be null
    • Method Detail

      • getOrder

        public int getOrder()
        Specified by:
        getOrder in interface org.springframework.core.Ordered
      • setOrder

        public void setOrder​(int order)
      • setAuthenticationConverter

        public void setAuthenticationConverter​(PayloadExchangeAuthenticationConverter authenticationConverter)
        Sets the convert to be used
        authenticationConverter -
      • intercept

        public reactor.core.publisher.Mono<java.lang.Void> intercept​(PayloadExchange exchange,
                                                                     PayloadInterceptorChain chain)
        Description copied from interface: PayloadInterceptor
        Process the Web request and (optionally) delegate to the next PayloadInterceptor through the given PayloadInterceptorChain.
        Specified by:
        intercept in interface PayloadInterceptor
        exchange - the current payload exchange
        chain - provides a way to delegate to the next interceptor
        Mono<Void> to indicate when payload processing is complete