Annotation Interface Authorization


@Retention(RUNTIME) @Target({METHOD,TYPE}) public @interface Authorization
Annotation used to apply a specified 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.

Since:
5.9.0
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description