Allows callers of the Policy Management API to access user context information.
Type
User directory function, global scope.
Syntax
int SM_EXTERN Sm_PolicyApi_GetUserContext ( void *pSessionHandle, const char *lpszUserDirOid, const char *lpszUserPath, const char *lpszSessionID, Sm_PolicyApi_UserContext_t **ppPolicyApiUserContext); );
Parameter |
I/O |
Description |
---|---|---|
pSessionHandle |
I |
A pointer to an internal Policy Management API data structure. The structure holds information about the administrator session and the client session. |
lpszUserDirOid |
I |
A null-terminated string containing the object identifier of the user directory for the user specified in lpszUserPath. |
lpszUserPath |
I |
The distinguished name of the user. |
lpszSessionID |
I |
A unique identifier of the session. After a successful login, the session ID is returned in the lpszSessionId field of the structure Sm_AgentApi_Session_t. If the session ID is not known, assign an empty string ("") to this parameter. |
ppPolicyApi |
O |
The user context information that SiteMinder passes to the function. |
Remarks
This function allows an application to access information about a user without having to connect to the underlying user directory. To retrieve the user information, the application calls the functions in the Sm_Api_UserContext_t structure, which is returned in ppPolicyApiUserContext.For example:
Important! After calling Sm_GetUserContext(), release the allocated memory by calling Sm_PolicyApi_FreeMemoryEx(). Otherwise, you can possibly see some Policy Server performance degradation.
Returns
Copyright © 2014 CA.
All rights reserved.
|
|