Class PolicyEnforcementPoint.EndpointPolicySpec
java.lang.Object
org.gcube.informationsystem.resourceregistry.pep.PolicyEnforcementPoint.EndpointPolicySpec
- Enclosing class:
- PolicyEnforcementPoint
Specification for an entire HTTP endpoint's policy.
-
Constructor Summary
ConstructorsConstructorDescriptionEndpointPolicySpec(String operationName, Set<String> allowedRoles, PolicyEnforcementPoint.TokenScopeRule tokenScopeRule, boolean requiresActiveContext, Map<String, PolicyEnforcementPoint.QueryParamSpec> queryParams) Creates a new endpoint policy specification. -
Method Summary
Modifier and TypeMethodDescriptionReturns the set of roles authorized to access the endpoint.Returns the descriptive operation name.Returns the map of query parameter policy specifications.Returns the token binding/scoping rule.booleanReturns whether the endpoint requires the context to be active.
-
Constructor Details
-
EndpointPolicySpec
public EndpointPolicySpec(String operationName, Set<String> allowedRoles, PolicyEnforcementPoint.TokenScopeRule tokenScopeRule, boolean requiresActiveContext, Map<String, PolicyEnforcementPoint.QueryParamSpec> queryParams) Creates a new endpoint policy specification.- Parameters:
operationName- the descriptive name of the operationallowedRoles- the set of allowed rolestokenScopeRule- the token binding rulerequiresActiveContext- whether the context must be activequeryParams- the map of query parameter policies
-
-
Method Details
-
getOperationName
Returns the descriptive operation name.- Returns:
- the operation name
-
getAllowedRoles
Returns the set of roles authorized to access the endpoint.- Returns:
- the authorized roles
-
getTokenScopeRule
Returns the token binding/scoping rule.- Returns:
- the scope rule
-
isRequiresActiveContext
public boolean isRequiresActiveContext()Returns whether the endpoint requires the context to be active.- Returns:
- true if active context is required, false otherwise
-
getQueryParams
Returns the map of query parameter policy specifications.- Returns:
- the query parameter policies
-