Package com.priint.pubserver.auth
Annotation Interface RequiresRoles
The RequiresRoles annotation requires the current Subject to have all of the specified roles.
If they do not have the role(s), the method will not be executed and an AuthorizationException is thrown.
The logical operation for the permission check in case multiple roles are specified. AND is the default.
For example:
@RequiresRoles({"Administrator"})
public void createAccount(Account account) {
//this method will only be invoked by an admin
}
-
Required Element Summary
Required Elements
-
Element Details
-
value
String[] valueA single String role name or multiple comma-delimited role names required in order for the method invocation to be allowed.- Returns:
- the string [ ]
-