Class TokenPropagationHttpClientFilter

java.lang.Object
io.micronaut.security.token.propagation.TokenPropagationHttpClientFilter

@ClientFilter("${micronaut.security.token.propagation.path:/**}") @Requires(classes=io.micronaut.http.annotation.ClientFilter.class) @Requires(beans={TokenPropagator.class,TokenPropagationConfiguration.class}) @Requires(property="micronaut.security.token.propagation.enabled",value="true") public class TokenPropagationHttpClientFilter extends Object
HttpClientFilter to enable Token propagation.
Since:
1.0
Author:
Sergio del Amo
  • Field Details

    • tokenPropagationConfiguration

      protected final TokenPropagationConfiguration tokenPropagationConfiguration
    • outgoingHttpRequestProcessor

      protected final io.micronaut.http.util.OutgoingHttpRequestProcessor outgoingHttpRequestProcessor
    • tokenPropagator

      protected final TokenPropagator tokenPropagator
  • Constructor Details

    • TokenPropagationHttpClientFilter

      public TokenPropagationHttpClientFilter(TokenPropagationConfiguration tokenPropagationConfiguration, io.micronaut.http.util.OutgoingHttpRequestProcessor outgoingHttpRequestProcessor, TokenPropagator tokenPropagator)
      Parameters:
      tokenPropagationConfiguration - JWT Propagation configuration
      outgoingHttpRequestProcessor - Utility to decide whether to process the request
      tokenPropagator - The token propagator
  • Method Details

    • doFilter

      @RequestFilter public void doFilter(io.micronaut.http.MutableHttpRequest<?> targetRequest)
      Parameters:
      targetRequest - The HTTP request