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 Summary
Modifier and TypeFieldDescriptionprotected final io.micronaut.http.util.OutgoingHttpRequestProcessor
protected final TokenPropagationConfiguration
protected final TokenPropagator
-
Constructor Summary
ConstructorDescriptionTokenPropagationHttpClientFilter
(TokenPropagationConfiguration tokenPropagationConfiguration, io.micronaut.http.util.OutgoingHttpRequestProcessor outgoingHttpRequestProcessor, TokenPropagator tokenPropagator) -
Method Summary
Modifier and TypeMethodDescriptionvoid
doFilter
(io.micronaut.http.MutableHttpRequest<?> targetRequest)
-
Field Details
-
tokenPropagationConfiguration
-
outgoingHttpRequestProcessor
protected final io.micronaut.http.util.OutgoingHttpRequestProcessor outgoingHttpRequestProcessor -
tokenPropagator
-
-
Constructor Details
-
TokenPropagationHttpClientFilter
public TokenPropagationHttpClientFilter(TokenPropagationConfiguration tokenPropagationConfiguration, io.micronaut.http.util.OutgoingHttpRequestProcessor outgoingHttpRequestProcessor, TokenPropagator tokenPropagator) - Parameters:
tokenPropagationConfiguration
- JWT Propagation configurationoutgoingHttpRequestProcessor
- Utility to decide whether to process the requesttokenPropagator
- The token propagator
-
-
Method Details
-
doFilter
@RequestFilter public void doFilter(io.micronaut.http.MutableHttpRequest<?> targetRequest) - Parameters:
targetRequest
- The HTTP request
-