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
    Modifier and Type
    Field
    Description
    static final String
    Consult header token.

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.reactivestreams.Publisher<? extends io.micronaut.http.HttpResponse<?>>
    doFilter(io.micronaut.http.MutableHttpRequest<?> request, io.micronaut.http.filter.ClientFilterChain chain)
     
    boolean
     

    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

  • Constructor Details

    • ConsulAslTokenFilter

      public ConsulAslTokenFilter(ConsulConfiguration configuration)
      Parameters:
      configuration - The Consul configuration
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface io.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 interface io.micronaut.http.filter.HttpClientFilter