@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) |
SecuredAnnotationRule(TokenConfiguration tokenConfiguration)
Deprecated.
use
SecuredAnnotationRule(RolesFinder) instead. |
| Modifier and Type | Method and 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
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@Deprecated public SecuredAnnotationRule(TokenConfiguration tokenConfiguration)
SecuredAnnotationRule(RolesFinder) instead.tokenConfiguration - Token Configuration.@Inject public SecuredAnnotationRule(RolesFinder rolesFinder)
rolesFinder - Roles Parserpublic 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)
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 routeclaims - The claims from the token. Null if not authenticatedSecurityRuleResultpublic int getOrder()