The SiteMinder Policy Server calls SmDirChangeUserPassword() so that you can change the value in the password field for an entry in your custom directory.
To implement SmDirChangeUserPassword(), you must specify the name of the password field in your custom directory. In the SiteMinder Administrative UI, enter that attribute name in the Password Attribute field on the User Attributes tab of the User Directory Dialog box.
The user’s distinguished name is passed in with the following information:
Syntax
int SM_EXTERN SmDirChangeUserPassword ( const Sm_Api_Context_t* lpApiContext, void* pHandle, void* pInstanceHandle, const char* lpszUserDN, const char* lpszOldPassword, const char* lpszNewPassword, const char* lpszPasswordAttr, const int bDoNotRequireOldPassword );
Parameter |
I/O |
Description |
---|---|---|
lpApiContext |
I |
Pointer to the API context structure. |
pHandle |
I |
The address of the pointer returned by SmDirInit(). |
pInstanceHandle |
I |
The address of a pointer to the user instance handle. |
lpszUserDN |
I |
Buffer containing the user DN whose password has to be changed. |
lpszOldPassword |
I |
Buffer containing the old password of the user DN. |
lpszNewPassword |
I |
Buffer containing the new password of the user DN. |
lpszPasswordAttr |
I |
Directory attribute where the user’s password is stored. Use this attribute to change the user password. The default value for this attribute name in a Netscape LDAP directory is userpassword. |
bDoNotRequireOldPassword |
I |
A value indicating whether the user needs to specify the old password to perform the password change. The value 1 indicates that the old password is not required; 0 indicates that the old password is required. An administrator may not need to specify the old password, but an end user would need to specify. |
Returns
Returns 0 if successful or -1 if not successful.
Sample Code Information
If you are changing a user password, SiteMinder passes the name of the password attribute through lpszPasswordAttr. To indicate the name of the directory attribute that holds this information:
Copyright © 2014 CA.
All rights reserved.
|
|