public class IDRepoResponseProvider extends Object implements ResponseProvider
ResponseProvider
interface. It defines 2 types of user
attributes which it can fetch the values of: STATIC
and DYNAMIC
.
It relies on underlying Identity repository service to
fetch the attribute values for the Subject(s) defined in the policy.
It computes a Map
of response attributes
based on the sso token, resource name and env
map passed
in the method call getResponseDecision()
.
Policy framework would make a call to the ResponseProvider to fetch
response attributes in a policy only if the policy is applicable to a
request as determined by sso token, resource name, Subjects and Conditions.Modifier and Type | Field and Description |
---|---|
static String |
ATTR_DELIMITER |
static String |
DYNAMIC_ATTRIBUTE |
static String |
STATIC_ATTRIBUTE |
static String |
VAL_DELIMITER |
Constructor and Description |
---|
IDRepoResponseProvider()
No argument constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns a copy of this object.
|
String |
getDisplayName(String property,
Locale locale)
Gets the display name for the property name.
|
Map |
getProperties()
Gets the properties of the responseprovider
|
List |
getPropertyNames()
Returns a list of property names for the responseprovider.
|
Syntax |
getPropertySyntax(String property)
Returns the syntax for a property name
|
Map |
getResponseDecision(SSOToken token,
Map env)
Gets the response attributes computed by this ResponseProvider object,
based on the sso token and map of environment parameters
|
Set |
getValidValues(String property)
Returns a set of valid values given the property name.
|
void |
initialize(Map configParams)
Initialize the IDRepoResponseProvider object by using the configuration
information passed by the Policy Framework.
|
void |
setProperties(Map properties)
Sets the properties of the responseProvider plugin.
|
public static final String STATIC_ATTRIBUTE
public static final String DYNAMIC_ATTRIBUTE
public static final String ATTR_DELIMITER
public static final String VAL_DELIMITER
public void initialize(Map configParams) throws PolicyException
initialize
in interface ResponseProvider
configParams
- the configuration informationPolicyException
- if an error occured during
initialization of the instancepublic List getPropertyNames()
getPropertyNames
in interface ResponseProvider
List
of property namespublic Syntax getPropertySyntax(String property)
getPropertySyntax
in interface ResponseProvider
property
- property nameSyntax for the property name
Syntax
public String getDisplayName(String property, Locale locale) throws PolicyException
locale
variable could be used by the plugin to
customize the display name for the given locale.
The locale
variable could be null
, in which
case the plugin must use the default locale.getDisplayName
in interface ResponseProvider
property
- property namelocale
- locale for which the property name must be customizedPolicyException
public Set getValidValues(String property) throws PolicyException
getValidValues
in interface ResponseProvider
property
- property name
from the PolicyConfig Service configured for the specified realm.PolicyException
- if unable to get the Syntax.public void setProperties(Map properties) throws PolicyException
getResponseDecision(Map)
These attribute-value pairs are encapsulated in
ResponseAttribute
element tag which is a child of the
PolicyDecision
element in the PolicyResponse xml
if the policy is applicable to the user for the resource, subject and
conditions defined.setProperties
in interface ResponseProvider
properties
- the properties of the responseProvider
Keys of the properties have to be String.
Value corresponding to each key have to be a Set of String
elements. Each implementation of ResponseProvider could add
further restrictions on the keys and values of this map.PolicyException
- for any abnormal conditionpublic Map getProperties()
getProperties
in interface ResponseProvider
setProperties(java.util.Map)
public Map getResponseDecision(SSOToken token, Map env) throws PolicyException, SSOException
getResponseDecision
in interface ResponseProvider
token
- single-sign-on token of the userenv
- specific environment map of key/value pairsPolicyException
- if the decision could not be computedSSOException
- if SSO token is not validpublic Object clone()
clone
in interface ResponseProvider
clone
in class Object
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.