@Singleton public class SecuredAnnotationRule extends AbstractSecurityRule
Secured annotation.| Modifier and Type | Field and Description |
|---|---|
static Integer |
ORDER
The order of the rule.
|
DENY_ALL, IS_ANONYMOUS, IS_AUTHENTICATEDHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
SecuredAnnotationRule(RolesFinder rolesFinder) |
SecuredAnnotationRule(TokenConfiguration tokenConfiguration)
Deprecated.
use
SecuredAnnotationRule( RolesFinder ) instead. |
| Modifier and Type | Method and Description |
|---|---|
SecurityRuleResult |
check(HttpRequest request,
RouteMatch routeMatch,
Map<String,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, getRolespublic static final Integer ORDER
@Deprecated public SecuredAnnotationRule(TokenConfiguration tokenConfiguration)
SecuredAnnotationRule( RolesFinder ) instead.tokenConfiguration - Token Configuration.@Inject public SecuredAnnotationRule(RolesFinder rolesFinder)
rolesFinder - Roles Parserpublic SecurityRuleResult check(HttpRequest request, @Nullable RouteMatch routeMatch, @Nullable Map<String,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()