public class PolicyEvaluator extends Object
Constructor and Description |
---|
PolicyEvaluator(String serviceName)
Creates an instance of client policy evaluator
|
Modifier and Type | Method and Description |
---|---|
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,
Map envParameters)
Evaluates simple privileges of boolean type.
|
public PolicyEvaluator(String serviceName) throws PolicyException, SSOException
serviceName
- name of the service for which to create
policy evaluatorPolicyException
- if required properties cannot be retrieved.SSOException
- if application single sign on token is invalid.public 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, 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.Copyright © 2010-2014, ForgeRock All Rights Reserved.