Package io.micronaut.security.rules
Interface SecurityRule<T>
- Type Parameters:
T
- Request
- All Superinterfaces:
io.micronaut.core.order.Ordered
- All Known Implementing Classes:
AbstractSecurityRule
,ConfigurationInterceptUrlMapRule
,IpPatternsRule
,SecuredAnnotationRule
,SensitiveEndpointRule
public interface SecurityRule<T>
extends io.micronaut.core.order.Ordered
Informs the
SecurityFilter
filter what to do with the given request.- Since:
- 1.0
- Author:
- James Kleeh
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The token to represent no security roles are allowed.static final String
The token to represent allowing anonymous access.static final String
The token to represent allowing any authenticated access.Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<SecurityRuleResult>
check
(T request, @Nullable 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 Details
-
IS_ANONYMOUS
The token to represent allowing anonymous access.- See Also:
-
IS_AUTHENTICATED
The token to represent allowing any authenticated access.- See Also:
-
DENY_ALL
The token to represent no security roles are allowed.- See Also:
-
-
Method Details
-
check
org.reactivestreams.Publisher<SecurityRuleResult> check(@Nullable T request, @Nullable @Nullable Authentication authentication) Returns a publisher that is required to emit a single security result based on any conditions.- Parameters:
request
- The current requestauthentication
- The user authentication. Null if not authenticated- Returns:
- The result
- See Also:
-