Previous Topic: SmDirGetUserAttrMulti()

Next Topic: SmDirGetUserDisabledState()

SmDirGetUserClasses()

The SiteMinder Policy Server calls SmDirGetUserClasses() so that you can get the object classes of the specified distinguished name (DN). This function is designed to support Delegated Management Services.

Your custom directory may be hierarchical or flat. If your directory is hierarchical, as with an LDAP directory, the DN may belong to multiple object classes. If the directory is flat, as with a SQL database, the user DN belongs to a single class, such as User or Group.

Your code must determine the type of DN passed and handle it appropriately. For example, if a the name of a group is passed in, you need to be able to determine that it is a group and return Group.

SiteMinder calls SmDirFreeStringArray() to free the lpszAttrData buffer.

Syntax

int SM_EXTERN SmDirGetUserClasses (
   const Sm_Api_Context_t*  lpApiContext,
   void*                    pHandle,
   void*                    pInstanceHandle,
   const char*              lpszUserDN,
   char***                  lpszClasses
);

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 distinguished name for which you must retrieve the classes.

lpszClasses

O

Buffer containing the classes for the specified distinguished name.

Returns

Returns 0 if successful or -1 if not successful.

If you decide not to implement this function, return -1.


Copyright © 2010 CA. All rights reserved. Email CA about this topic