SmDirValidateUsername()
stmndr calls this function to validate the user name passed in through lpszUsername.
casso1283
SiteMinder
calls this function to validate the user name passed in through lpszUsername.You can use this function to resolve the user name and copy the user ID into the lpszNewUsername buffer. If you choose not to implement SmDirValidateUsername(), set lpszNewUsername to NULL, as shown in the sample.
SiteMinder
calls SmDirFreeString() to free the lpszNewUsername buffer.Syntax
int SM_EXTERN SmDirValidateUsername (const Sm_Api_Context_t* lpApiContext,void* pHandle,void* pInstanceHandle,const char* lpszUsername,char** lpszNewUsername);
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 directory instance handle. |
lpszUsername | I | Buffer containing the user name that has to be validated. |
lpszNewUsername | O | Buffer containing the validated user name. |
Returns
Returns 0 if successful or -1 if not successful.
Remarks
This function is called when you use the
SiteMinder
Test Tool to run IsAuthenticated for a user in the custom directory.