Class ConsulAslTokenFilter
java.lang.Object
io.micronaut.discovery.consul.client.v1.ConsulAslTokenFilter
- All Implemented Interfaces:
io.micronaut.core.order.Ordered
,io.micronaut.core.util.Toggleable
,io.micronaut.http.filter.HttpClientFilter
,io.micronaut.http.filter.HttpFilter
@Filter(patterns="/v1/**",
serviceId="consul")
@Requires(beans=ConsulConfiguration.class)
public class ConsulAslTokenFilter
extends Object
implements io.micronaut.http.filter.HttpClientFilter, io.micronaut.core.util.Toggleable
A
HttpClientFilter
that adds the HEADER_CONSUL_TOKEN
header.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.http.filter.HttpClientFilter
doFilter
Methods inherited from interface io.micronaut.core.order.Ordered
getOrder
-
Field Details
-
HEADER_CONSUL_TOKEN
Consult header token.- See Also:
-
-
Constructor Details
-
ConsulAslTokenFilter
- Parameters:
configuration
- The Consul configuration
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
-
doFilter
public org.reactivestreams.Publisher<? extends io.micronaut.http.HttpResponse<?>> doFilter(io.micronaut.http.MutableHttpRequest<?> request, io.micronaut.http.filter.ClientFilterChain chain) - Specified by:
doFilter
in interfaceio.micronaut.http.filter.HttpClientFilter
-