@Retention(value=RUNTIME) @Target(value=PACKAGE) @Documented @PackageQualified public @interface Privilege
Privilege, that a caller must have in
order to access a resource.
A caller is deemed to have a Privilege IFF they have at least one of
the roles enumerated by the roles() property.
Determining if a caller has one of the required roles is the responsibility
of the security realm identified by the realm() property.
Privilege
A Privilege must be defined at the package level in
package-info.java. If more than one Privilege is to be
defined per package then wrapper it in a Security annotation.
If a Privilege must be defined dynamically (i.e. at run-time), rather
than statically via a package annotation, then implement a
HasPrivileges provider that can map privilege names to
Privilege instances.public abstract String name
public abstract String[] roles
public abstract String realm
Oracle REST Data Services Plugin API version: 3.0.0.65.09.35 Copyright © 2015 Oracle Corp. All Rights Reserved.