com.sun.identity.policy.client
Class PolicyEvaluator
java.lang.Object
|
+--com.sun.identity.policy.client.PolicyEvaluator
- public class PolicyEvaluator
- extends java.lang.Object
This is a remote policy evaluator
Constructor Summary |
PolicyEvaluator(java.lang.String serviceName)
creates an instance of remote policy evaluator object |
Method Summary |
PolicyDecision |
getPolicyDecision(SSOToken token,
java.lang.String resourceName,
java.util.Set actionNames,
java.util.Map envParameters)
Evaluates privileges of the user to perform the specified actions
the the specified resource. |
boolean |
isAllowed(SSOToken token,
java.lang.String resourceName,
java.lang.String actionName,
java.util.Map envParameters)
Evaluates simple privileges of boolean type. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PolicyEvaluator
public PolicyEvaluator(java.lang.String serviceName)
throws PolicyException
- creates an instance of remote policy evaluator object
- Parameters:
serviceName
- - policy service name- Throws:
PolicyException
- if required properties cannot be retrieved.
isAllowed
public boolean isAllowed(SSOToken token,
java.lang.String resourceName,
java.lang.String actionName,
java.util.Map envParameters)
throws SSOException
- Evaluates simple privileges of boolean type. The privilege indicates
if the user can perform specified action on the specified resource.
The evaluation depends on user's application environment parameters.
- Parameters:
token
- SSO 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 resourceenvParameters
- run-time environment parameters- Returns:
- the result of the evaluation as a boolean value
- Throws:
SSOException
- single-sign-on token invalid or expired
getPolicyDecision
public PolicyDecision getPolicyDecision(SSOToken token,
java.lang.String resourceName,
java.util.Set actionNames,
java.util.Map envParameters)
throws SSOException
- Evaluates privileges of the user to perform the specified actions
the the specified resource. The evaluation depends on user's
application environment parameters.
- Parameters:
token
- SSO 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 resourceenvParameters
- run-time environment parameters- Returns:
- policy decision
- Throws:
SSOException
- single-sign-on token invalid or expired