public interface AuthenticatedSelfService
AuthenticatedSelfService
API exposes the methods to a logged-in user
to manage his profile. It provides functionality to manage profile attributes, change password
and manage challenge questions and answers. Apart from basic profile operations,
there are proxy related operations to get proxy details and submit requests to assign, remove
and update the proxy.
Below is the code snippet that shows how to get an instance of this service:
//returns an AuthenticatedSelfService service instance
Hashtable<String, String> env = new Hashtable<String, String>();
env.put(OIMClient.JAVA_NAMING_PROVIDER_URL, "t3://oimhost:oimport";
env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL, "weblogic.jndi.WLInitialContextFactory");
env.put("APPSERVER_TYPE", "wls");
OIMClient client = new OIMClient(env);
client.login("xelsysadm", "password".toCharArray());
AuthenticatedSelfService authSelfSvc = client.getService(AuthenticatedSelfService.class);
// Gets the list of system challenge questions
String[] sysChallengeQuestions = authSelfSvc.getSystemChallengeQuestions();
....
Modifier and Type | Method and Description |
---|---|
long |
addProxyForUser(long proxyUserKey,
java.util.Date startDate,
java.util.Date endDate)
Deprecated.
The preferred way to do is via
AuthenticatedSelfService.addProxyForUser(String, Date, Date, boolean) |
java.lang.String |
addProxyForUser(java.lang.String proxyUserID,
java.util.Date startDate,
java.util.Date endDate,
boolean isUserLogin)
Adds/Sets proxy for user after checking the user privilege.
|
void |
changePassword(char[] password)
Deprecated.
This API is no more supported. Please use
AuthenticatedSelfService.changePassword(char[], char[], char[])
Accepts the new password (since old password is expired) and sets it as the current
password for the user |
void |
changePassword(char[] oldPwd,
char[] newPwd,
char[] confirmPwd)
Accepts the old and new password for the logged-in user and changes
his password if validations pass.
|
java.util.List |
getAllProxies()
Gets a list of the all the proxy for the given user
|
java.util.HashMap |
getChallengeValuesForSelf()
Returns the challenge values for self.
|
java.util.HashMap |
getChallengeValuesForSelf(java.util.Locale locale)
Returns a HashMap for the challenge values from the pcq table using the Local information
|
java.util.List |
getCurrentProxies()
Returns the current proxy details of the specified user
|
java.util.List |
getMyDirects(java.util.Set returnAttributes,
java.util.HashMap searchParameters)
Gets all direct reports of the user i.e.
|
java.util.List |
getPastProxies()
Returns the past proxy details of the specified user
|
User |
getProfileDetails(java.util.Set retAttrs)
Returns the details of the logged-in user.
|
java.lang.String[] |
getSystemChallengeQuestions()
Deprecated.
This method is not longer supported. The preferred way to do
this is via
PasswordMgmtService.getApplicableDefaultChallengeQuestions(String,Boolean,Locale) |
java.lang.String[] |
getUserDefinedChallengeQuestions(java.lang.String userName)
Gets the
String array of user's challenge questions |
oracle.idm.common.ipf.api.vo.UserInfoInterface |
getUserInfo()
Returns User Info of logged-in user.
|
java.util.HashMap |
modifyProfileDetails(java.util.HashMap attributeMap)
This method modifies the logged-in user's profile attributes.
|
void |
removeAllProxiesForUser()
Removes all proxies for user.
|
void |
removeProxy(long proxyKey)
Deprecated.
The preferred way to do is via
AuthenticatedSelfService.removeProxy(String) |
void |
removeProxy(java.lang.String proxyID)
Removes proxy for the user after checking the user privilege.
|
void |
removeProxy(java.lang.String userID,
long proxyKey,
java.util.Map attrMap,
boolean isUserLogin)
Deprecated.
The preferred way to do is via
AuthenticatedSelfService.removeProxy(String) |
void |
setChallengeValues(java.util.Map quesAnsMap)
Sets challenge questions and answers for logged-in user.
|
void |
updateProxyForUser(long pxdKey,
java.util.Map updateMap)
Deprecated.
The preferred way to do is via
AuthenticatedSelfService.updateProxyForUser(String, Map) |
void |
updateProxyForUser(java.lang.String proxyID,
java.util.Map updateMap)
Modifies proxy for the user after checking the user privilege.
|
void changePassword(char[] oldPwd, char[] newPwd, char[] confirmPwd) throws ValidationFailedException, ChangePasswordException
oldPwd
- the old password of the logged-in usernewPwd
- the new passwordconfirmPwd
- the new password again for confirmationValidationFailedException
- thrown when the old password is not
valid or if the new password and confirm password do not match.ChangePasswordException
- thrown when there is an exception
while changing the user's password@Deprecated java.lang.String[] getSystemChallengeQuestions() throws AuthSelfServiceException
PasswordMgmtService.getApplicableDefaultChallengeQuestions(String,Boolean,Locale)
AuthSelfServiceException
- thrown when there's an error while
getting the system challenge questions.void setChallengeValues(java.util.Map quesAnsMap) throws ValidationFailedException, SetChallengeValueException
quesAnsMap
- A Map
of challenge questions and answers
to be set for logged-in userSetChallengeValueException
- thrown when there is a failure while
setting the challenge questionsValidationFailedException
- is throw if validation fails
for the challenge operation@Deprecated void changePassword(char[] password) throws ValidationFailedException, ResetPasswordException
AuthenticatedSelfService.changePassword(char[], char[], char[])
Accepts the new password (since old password is expired) and sets it as the current
password for the userpassword
- The password to set as new password for the user.ResetPasswordException
- thrown when there's a failure while
resetting the user passwordValidationFailedException
- is thrown if the validation fails while
setting the new password.java.lang.String[] getUserDefinedChallengeQuestions(java.lang.String userName) throws UserAccountDisabledException, UserAccountInvalidException, AuthSelfServiceException
String
array of user's challenge questionsuserName
- The user login whose challenge questions are to be retrievedUserAccountDisabledException
- thrown if user account is disabledUserAccountInvalidException
- thrown if user account is invalidAuthSelfServiceException
- thrown if there's an error getting the
user's challenge questionsjava.util.HashMap modifyProfileDetails(java.util.HashMap attributeMap) throws ValidationFailedException, AccessDeniedException, AuthSelfServiceException
attributeMap
- The Map
of attribute value pair that are to be modifiedMap
contains authorized modified attribute list,
the list of attributes that are sent via request and request id, if so: ValidationFailedException
- thrown if validation for modify operation fails.AccessDeniedException
- thrown if the user doesn't have
authorization to update his profileAuthSelfServiceException
- thrown if there is an exception while modifying the
profileUser getProfileDetails(java.util.Set retAttrs) throws UserLookupException
retAttrs
- the set of profile attributes whose values are desired.
If this is null, then all profile attributes (as per policy) are
returned.User
class is a value object class to hold the GUID, attribute
name-value pair and direct reports of user.UserLookupException
- thrown when there was an exception
while fetching the user attributesjava.util.HashMap getChallengeValuesForSelf(java.util.Locale locale) throws AuthSelfServiceException
AuthSelfServiceException
java.util.HashMap getChallengeValuesForSelf() throws AuthSelfServiceException
AuthSelfServiceException
@Deprecated long addProxyForUser(long proxyUserKey, java.util.Date startDate, java.util.Date endDate) throws NoSuchUserException, RecursiveProxyException, UserManagerException, AccessDeniedException
AuthenticatedSelfService.addProxyForUser(String, Date, Date, boolean)
proxyUserKey
- key of the user to be proxied.startDate
- start date for proxy.endDate
- end date of the proxy.NoSuchUserException
RecursiveProxyException
UserManagerException
AccessDeniedException
@Deprecated void updateProxyForUser(long pxdKey, java.util.Map updateMap) throws NoSuchUserException, RecursiveProxyException, UserManagerException, AccessDeniedException
AuthenticatedSelfService.updateProxyForUser(String, Map)
pxdKey
- key of the proxy whose details is to be updated.updateMap
- an attribute map of the fields to update:NoSuchUserException
RecursiveProxyException
UserManagerException
AccessDeniedException
@Deprecated void removeProxy(java.lang.String userID, long proxyKey, java.util.Map attrMap, boolean isUserLogin) throws NoSuchUserException, UserManagerException, AccessDeniedException
AuthenticatedSelfService.removeProxy(String)
userID
- The id of the user whose proxy is to be removed.
The isUserLogin flag will decide what does userID contains.proxyKey
- The key of the proxy to be removed.attrMap
- [Optional] The Map of attributes containing proxy details.isUserLogin
- Set to true if the userID contains user login and false if the userID contains user key.NoSuchUserException
UserManagerException
AccessDeniedException
@Deprecated void removeProxy(long proxyKey) throws UserManagerException, AccessDeniedException
AuthenticatedSelfService.removeProxy(String)
proxyKey
- The key of the proxy to be removed.UserManagerException
AccessDeniedException
java.lang.String addProxyForUser(java.lang.String proxyUserID, java.util.Date startDate, java.util.Date endDate, boolean isUserLogin) throws NoSuchUserException, RecursiveProxyException, UserManagerException, AccessDeniedException
proxyUserID
- ID of the user to be proxied.startDate
- start date for proxy.endDate
- end date of the proxy.NoSuchUserException
RecursiveProxyException
UserManagerException
AccessDeniedException
void updateProxyForUser(java.lang.String proxyID, java.util.Map updateMap) throws NoSuchUserException, RecursiveProxyException, UserManagerException, AccessDeniedException
proxyID
- ID of the proxy whose details is to be updated.updateMap
- an attribute map of the fields to update:NoSuchUserException
RecursiveProxyException
UserManagerException
AccessDeniedException
void removeProxy(java.lang.String proxyID) throws UserManagerException, AccessDeniedException
proxyID
- The ID of the proxy to be removed.UserManagerException
AccessDeniedException
void removeAllProxiesForUser() throws NoSuchUserException, UserManagerException, AccessDeniedException
NoSuchUserException
- If user with given userID does not exist.AccessDeniedException
- If the logged-in user does not have the required
authorization to perform this operationUserManagerException
- If update proxy operation fails due some other reason.java.util.List getAllProxies() throws AccessDeniedException
AccessDeniedException
- If the logged-in user does not have the required authorization to perform this operation.java.util.List getCurrentProxies() throws AccessDeniedException, NoSuchUserException
AccessDeniedException
- If the logged-in user does not have the required authorization to perform this operation.NoSuchUserException
- If the user with given userID is not found.java.util.List getPastProxies() throws AccessDeniedException
AccessDeniedException
- If the loggedUser does not have the required authorization to perform this operation.java.util.List getMyDirects(java.util.Set returnAttributes, java.util.HashMap searchParameters) throws UserManagerException, AccessDeniedException
returnAttributes
- The list of attributes which are to be returned for each user.searchParameters
- Parameters to further configure the search operation. There are
four configuration parameters. STARTROW, ENDROW, SORTEDBY and
SORTORDER.
The STARTROW and ENDROW search configuration parameters indicates which subset of the complete search result is to be fetched. These parameters are mandatory.
The SORTEDBY search configuration parameter indicates the attribute on which search result is to be sorted. This parameter is optional and is set to 'User Login' by default.
The SORTORDER search configuration parameter indicates the order of sorting. There are two possible values for this parameter. To sort the result in ascending order use SortOrder.ASCENDING and to sort the result in descending order use SortOrder.DESCENDING. This parameter is optional and is set to SortOrder.ASCENDING by default.
AccessDeniedException
- if the logged-in user does not have the required authorization.UserManagerException
- if there is an error finding direct reports.oracle.idm.common.ipf.api.vo.UserInfoInterface getUserInfo() throws AuthSelfServiceException
AuthSelfServiceException