Package com.sun.identity.liberty.ws.idpp
Class PersonalProfile
- java.lang.Object
-
- com.sun.identity.liberty.ws.idpp.PersonalProfile
-
public class PersonalProfile extends Object
This classPersonalProfileis an implementation ofLibertyDataService. The default implementation of Personal Profile leverages the XPATH technology for the queries. Inorder to make sense for the XPath expressions, the user profile needs to be in XML blob. The current approach is to parse the select expression, build a container level XML blob instead of the entire user profile. A WSC credential may not have enough priveleges to write or read the user profile data since the policy evaluation is driven through Webservices POLICY component rather than through ACI driven. So, currently, we use admin token for both queries and updates, but the authorization check will be done for a WSC credential.
-
-
Constructor Summary
Constructors Constructor Description PersonalProfile()Default constructor for personal profile.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAuthZAction(Object credential, String action, String select, Map env)Gets Authorization map for the list of select expressions.StringgetUserDN(String resourceID)Gets the user dn for a specified resource id.booleanisResourceIDValid(String resourceID)Checks if the resource id is valid.booleanisSelectDataSupported(String select)Checks if the select data is supported by the PP service.booleanmodifyData(Object credential, String resourceID, List dstModifications, Map interactedData, Document request)Processes modify request and update new data.MapqueryData(Object credential, String resourceID, List dstQueryItems, Map interactedData, Document request)Queries for the data for a specific resourceID.
-
-
-
Method Detail
-
queryData
public Map queryData(Object credential, String resourceID, List dstQueryItems, Map interactedData, Document request) throws IDPPException
Queries for the data for a specific resourceID.- Parameters:
credential- credentials of the requesting WSC.dstQueryItems- list of DSTQueryItems.request- query DOM request.interactedData- map for interacted data. This map will have the key as the PP DS attribute, and the value as it's value.- Returns:
- Map map of processed query items and the correspoding list of results.
- Throws:
IDPPException
-
modifyData
public boolean modifyData(Object credential, String resourceID, List dstModifications, Map interactedData, Document request) throws IDPPException
Processes modify request and update new data.- Parameters:
credential- credential of a WSC.resourceID- resource id stringdstModifications- list of DSTModification objects.interactedData- map for interacted data. This map will have the key as the PP DS attribute, and the value as it's value.request- a Document object- Returns:
- true if successful in modifying the data.
- Throws:
IDPPException
-
isSelectDataSupported
public boolean isSelectDataSupported(String select)
Checks if the select data is supported by the PP service.- Parameters:
select- Select expression.- Returns:
- true if supported.
-
isResourceIDValid
public boolean isResourceIDValid(String resourceID)
Checks if the resource id is valid.- Parameters:
resourceID- resource id.- Returns:
- true if the resource id is valid.
-
getAuthZAction
public String getAuthZAction(Object credential, String action, String select, Map env) throws IDPPException
Gets Authorization map for the list of select expressions.- Parameters:
credential- credential object.action- request action query or modifyselect- resource being accessedenv- Environment map that the policy could use- Returns:
- Authorization decision action.
- Throws:
IDPPException
-
-