Class SecurityHelper
java.lang.Object
org.glassfish.jersey.message.filtering.SecurityHelper
Utility methods for security Entity Data Filtering.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFilteringScopes(Annotation[] annotations) Get entity-filtering scopes of security annotations present among given annotations.getFilteringScopes(javax.ws.rs.core.SecurityContext securityContext, Annotation[] annotations) Get entity-filtering scopes of security annotations present among given annotations with respect to givenSecurityContext.Get authorization roles that has been derived from examining entity classes.(package private) static StringgetRolesAllowedScope(String role) Get entity-filtering scope forRolesAlloweds role.
-
Field Details
-
roles
-
-
Constructor Details
-
SecurityHelper
private SecurityHelper()Prevent instantiation.
-
-
Method Details
-
getFilteringScopes
Get entity-filtering scopes of security annotations present among given annotations.A scope look like:
- <fully qualified annotation class name>, or
- <fully qualified annotation class name>_<role>
- Parameters:
annotations- a list of annotations (doesn't need to contain only security annotations)- Returns:
- a set of entity-filtering scopes.
-
getFilteringScopes
static Set<String> getFilteringScopes(javax.ws.rs.core.SecurityContext securityContext, Annotation[] annotations) Get entity-filtering scopes of security annotations present among given annotations with respect to givenSecurityContext. Resulting set contains only scopes that pass the security context check.A scope look like:
- <fully qualified annotation class name>, or
- <fully qualified annotation class name>_<role>
- Parameters:
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)- Returns:
- a set of entity-filtering scopes.
-
getRolesAllowedScope
-
getProcessedRoles
-