Class AccessFilter

  • All Implemented Interfaces:
    io.micronaut.core.order.Ordered, io.micronaut.http.filter.HttpFilter, io.micronaut.http.filter.HttpServerFilter

    @Filter("/**")
    public class AccessFilter
    extends java.lang.Object
    implements io.micronaut.http.filter.HttpServerFilter
    A filter used to restrict access to the server: the server should only be available from a loopback connection, and if an access token is specified, then the request should include the access token header. This is to avoid services abusing the server to spawn containers: when the server is started, a random access key should be generated, and passed to the allowed clients.
    • Field Summary

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

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>> doFilter​(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.filter.ServerFilterChain chain)  
      • 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.HttpServerFilter

        doFilter
      • Methods inherited from interface io.micronaut.core.order.Ordered

        getOrder
    • Method Detail

      • doFilter

        public org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>> doFilter​(io.micronaut.http.HttpRequest<?> request,
                                                                                                io.micronaut.http.filter.ServerFilterChain chain)
        Specified by:
        doFilter in interface io.micronaut.http.filter.HttpServerFilter