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
      SecurityRuleResult check​(io.micronaut.http.HttpRequest request, io.micronaut.web.router.RouteMatch routeMatch, java.util.Map<java.lang.String,​java.lang.Object> claims)
      Returns a 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

        SecurityRuleResult check​(io.micronaut.http.HttpRequest request,
                                 @Nullable
                                 io.micronaut.web.router.RouteMatch routeMatch,
                                 @Nullable
                                 java.util.Map<java.lang.String,​java.lang.Object> claims)
        Returns a 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.
        claims - The claims from the token. Null if not authenticated
        Returns:
        The result
        See Also:
        SecurityRuleResult