@Singleton public class SecuredAnnotationRule extends AbstractSecurityRule
Secured
annotation.Modifier and Type | Field and Description |
---|---|
static java.lang.Integer |
ORDER
The order of the rule.
|
DENY_ALL, IS_ANONYMOUS, IS_AUTHENTICATED
Constructor and Description |
---|
SecuredAnnotationRule(RolesFinder rolesFinder) |
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
SecurityRuleResult.UNKNOWN if the Secured annotation is not
found on the method or class, or if the route match is not method based. |
int |
getOrder() |
compareRoles, getRoles
@Inject public SecuredAnnotationRule(RolesFinder rolesFinder)
rolesFinder
- Roles Parserpublic org.reactivestreams.Publisher<SecurityRuleResult> check(io.micronaut.http.HttpRequest<?> request, @Nullable io.micronaut.web.router.RouteMatch<?> routeMatch, @Nullable Authentication authentication)
SecurityRuleResult.UNKNOWN
if the Secured
annotation is not
found on the method or class, or if the route match is not method based.request
- The current requestrouteMatch
- The matched routeauthentication
- The authentication, or null if none foundSecurityRuleResult
public int getOrder()