Programming Guides › Programming Guide for C › Policy Management API Guidance › Structure of a Policy Application
Structure of a Policy Application
Policy applications must perform the following operations:
- Initialization: Sm_PolicyApi_Init() or Sm_PolicyApi_InitEx() must be the first function called by the API client session. The function initializes the connection to the SiteMinder policy store and establishes the init handle. (The init handle is passed in calls to Sm_PolicyApi_Login() and Sm_PolicyApi_Release().)
- Login: Sm_PolicyApi_Login() must be called after initialization and before making calls to the other functions in the API. This function can check the administrator's login credentials (username and password) or the administrator's validity.
If the administrator is authenticated, the function initializes internal data structures and resources. Once the administrator is logged in, the Policy Server initializes a handle that is used as an input parameter to subsequent Policy Management API functions. Sm_PolicyApi_Login() can be called more than once during the client session.
- Logout: Sm_PolicyApi_Logout() logs out the administrator.
- Release: Sm_PolicyApi_Release() must be the last function called by the API client session. It disconnects from the policy store and releases memory and resources held by the API. This function must be called once per client session. Failure to call this function will result in a memory leak.
Copyright © 2014 CA.
All rights reserved.
|
|