public interface SecurityRule
extends io.micronaut.core.order.Ordered
Modifier and Type | Field and 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.
|
Modifier and Type | Method and 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.
|
static final java.lang.String IS_ANONYMOUS
static final java.lang.String IS_AUTHENTICATED
static final java.lang.String DENY_ALL
org.reactivestreams.Publisher<SecurityRuleResult> check(io.micronaut.http.HttpRequest<?> request, @Nullable io.micronaut.web.router.RouteMatch<?> routeMatch, @Nullable Authentication authentication)
request
- The current requestrouteMatch
- The matched route or empty if no route was matched. e.g. static resource.authentication
- The user authentication. Null if not authenticatedSecurityRuleResult