final class SecurityHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.util.Set<java.lang.String> |
roles |
Modifier | Constructor and Description |
---|---|
private |
SecurityHelper()
Prevent instantiation.
|
Modifier and Type | Method and Description |
---|---|
(package private) static java.util.Set<java.lang.String> |
getFilteringScopes(java.lang.annotation.Annotation[] annotations)
Get entity-filtering scopes of security annotations present among given annotations.
|
(package private) static java.util.Set<java.lang.String> |
getFilteringScopes(javax.ws.rs.core.SecurityContext securityContext,
java.lang.annotation.Annotation[] annotations)
Get entity-filtering scopes of security annotations present among given annotations with respect to given
SecurityContext . |
(package private) static java.util.Set<java.lang.String> |
getProcessedRoles()
Get authorization roles that has been derived from examining entity classes.
|
(package private) static java.lang.String |
getRolesAllowedScope(java.lang.String role)
Get entity-filtering scope for
RolesAllowed s role. |
static java.util.Set<java.lang.String> getFilteringScopes(java.lang.annotation.Annotation[] annotations)
A scope look like:
annotations
- a list of annotations (doesn't need to contain only security annotations)static java.util.Set<java.lang.String> getFilteringScopes(javax.ws.rs.core.SecurityContext securityContext, java.lang.annotation.Annotation[] annotations)
SecurityContext
. Resulting set contains only scopes that pass the security context check.
A scope look like:
securityContext
- security context to check whether a user is in specified logical role.annotations
- a list of annotations (doesn't need to contain only security annotations)static java.lang.String getRolesAllowedScope(java.lang.String role)
RolesAllowed
s role.role
- role to retrieve entity-filtering scope for.static java.util.Set<java.lang.String> getProcessedRoles()