Package io.micronaut.security.rules
Interface SecurityRule
-
- All Superinterfaces:
io.micronaut.core.order.Ordered
- All Known Implementing Classes:
AbstractSecurityRule
,ConfigurationInterceptUrlMapRule
,IpPatternsRule
,SecuredAnnotationRule
,SensitiveEndpointRule
public interface SecurityRule extends io.micronaut.core.order.Ordered
Informs the JWT filter what to do with the given request.- Since:
- 1.0
- Author:
- James Kleeh
-
-
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.
-
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.
-
-
-
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 requestrouteMatch
- 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
-
-