@Retention(value=RUNTIME) @Target(value={METHOD,TYPE}) public @interface Authorization
AuthorizationRule
on
REST resource Java methods.
By default, a resource method only require user to be authenticated.
With this annotation, it is possible to restrict access to a
REST resource by applying the specified AuthorizationRule
.
This annotation is ignored when declared on a REST resource where
AnonymousAccessEnabled
is applied.
If this annotation is declared at the class level, then the rule will be applied to each of its resource methods. Moreover, when this annotation is present at the class and method levels, then both rules must be satisfied to get access to the REST resource.
Modifier and Type | Required Element and Description |
---|---|
Class<? extends AuthorizationRule> |
value |
public abstract Class<? extends AuthorizationRule> value