Interface SecurityRule

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DENY_ALL
      The token to represent no security roles are allowed.
      static java.lang.String IS_ANONYMOUS
      The token to represent allowing anonymous access.
      static java.lang.String IS_AUTHENTICATED
      The token to represent allowing any authenticated access.
      • Fields inherited from interface io.micronaut.core.order.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.reactivestreams.Publisher<SecurityRuleResult> check​(io.micronaut.http.HttpRequest<?> request, io.micronaut.web.router.RouteMatch<?> routeMatch, Authentication authentication)
      Returns a publisher that is required to emit a single security result based on any conditions.
      • Methods inherited from interface io.micronaut.core.order.Ordered

        getOrder
    • Field Detail

      • IS_ANONYMOUS

        static final java.lang.String IS_ANONYMOUS
        The token to represent allowing anonymous access.
        See Also:
        Constant Field Values
      • IS_AUTHENTICATED

        static final java.lang.String IS_AUTHENTICATED
        The token to represent allowing any authenticated access.
        See Also:
        Constant Field Values
      • DENY_ALL

        static final java.lang.String DENY_ALL
        The token to represent no security roles are allowed.
        See Also:
        Constant Field Values
    • Method Detail

      • check

        org.reactivestreams.Publisher<SecurityRuleResult> check​(io.micronaut.http.HttpRequest<?> request,
                                                                @Nullable
                                                                io.micronaut.web.router.RouteMatch<?> routeMatch,
                                                                @Nullable
                                                                Authentication authentication)
        Returns a publisher that is required to emit a single security result based on any conditions.
        Parameters:
        request - The current request
        routeMatch - The matched route or empty if no route was matched. e.g. static resource.
        authentication - The user authentication. Null if not authenticated
        Returns:
        The result
        See Also:
        SecurityRuleResult