public class PolicyEvaluator extends Object
Modifier and Type | Method and Description |
---|---|
Set |
getAdvicesHandleableByAM(boolean refetchFromServer)
Gets names of policy advices that could be handled by OpenAM
if PEP redirects user agent to OpenAM.
|
String |
getCompositeAdvice(ActionDecision actionDecision)
Returns XML string representation of advice map contained in the
actionDecision.
|
PolicyDecision |
getPolicyDecision(SSOToken token,
String resourceName,
Set actionNames)
Evaluates privileges of the user to perform the specified actions
on the specified resource.
|
PolicyDecision |
getPolicyDecision(SSOToken token,
String resourceName,
Set actionNames,
Map envParameters)
Evaluates privileges of the user to perform the specified actions
on the specified resource.
|
boolean |
isAllowed(SSOToken token,
String resourceName,
String actionName)
Evaluates a simple privilege of boolean type.
|
boolean |
isAllowed(SSOToken token,
String resourceName,
String actionName,
Map envParameters)
Evaluates simple privileges of boolean type.
|
public boolean isAllowed(SSOToken token, String resourceName, String actionName) throws PolicyException, SSOException
token
- single sign on token of the user evaluating policiesresourceName
- name of the resource the user is trying to accessactionName
- name of the action the user is trying to perform on
the resourcePolicyException
- if result could not be computed for any
reason other than single sign on token problem.SSOException
- if single sign on token is not validpublic boolean isAllowed(SSOToken token, String resourceName, String actionName, Map envParameters) throws PolicyException, SSOException
token
- single sign on token of the user evaluating policies.resourceName
- name of the resource the user is trying to accessactionName
- name of the action the user is trying to perform on
the resourceenvParameters
- run time environment parametersPolicyException
- if result could not be computed for
reason other than single sign on token problem.SSOException
- if single sign on token is not validpublic PolicyDecision getPolicyDecision(SSOToken token, String resourceName, Set actionNames) throws PolicyException, SSOException
token
- single sign on token of the user evaluating policies.resourceName
- name of the resource the user is trying to access.actionNames
- Set of action names the user is trying to perform on
the resource.PolicyException
- if result could not be computed for any
reason other than single sign on token problem.SSOException
- if single sign on token is not validpublic PolicyDecision getPolicyDecision(SSOToken token, String resourceName, Set actionNames, Map envParameters) throws PolicyException, SSOException
token
- single sign on token of the user evaluating policies.resourceName
- name of the resource the user is trying to accessactionNames
- Set of action names the user is trying to perform on
the resource.envParameters
- run-time environment parametersPolicyException
- if result could not be computed for any
reason other than single sign on token problem.SSOException
- if single sign on token is invalid or expired.public Set getAdvicesHandleableByAM(boolean refetchFromServer) throws InvalidAppSSOTokenException, PolicyEvaluationException, PolicyException, SSOException
refetchFromServer
- indicates whether to get the values fresh
from OpenAM or return the values from local cacheInvalidAppSSOTokenException
- if the server reported that the
app sso token provided was invalidPolicyEvaluationException
- if the server reported any other errorPolicyException
- if there are problems in policy module
while getting the resultSSOException
- if there are problems with sso token
while getting the resultpublic String getCompositeAdvice(ActionDecision actionDecision) throws PolicyException, SSOException
actionDecision
- actionDecision that contains the
advicesPolicyException
- for any abnormal condition encountered in
policy moduleSSOException
- for any abnormal condition encountered in
session moduleCopyright © 2010–2025 Open Identity Platform Community. All rights reserved.