Sm_AgentApi_IsProtected()

Checks if the defined resource is protected by stmndr.
casso10
Checks if the defined resource is protected by
CA Single Sign-On
.
Syntax
int SM_EXTERN Sm_AgentApi_IsProtected (
   const void                             pHandle,
   const char*                            lpszClientIpAddr,
   const Sm_AgentApi_ResourceContext_t*   pResourceContext,
   Sm_AgentApi_Realm_t*                   pRealm
);
Parameter
I/O
Description
pHandle
I
Agent API session handle returned in parameter
ppHandle
of Sm_AgentApi_Init().
lpszClientIpAddr
I
The IP address of the client asking for the resource. This is an optional parameter.
pResourceContext
I
A resource definition structure.
pRealm
O
A realm definition structure. The resource is protected by the returned realm.
Return Values
  • SM_AGENTAPI_YES. The resource is protected.
  • SM_AGENTAPI_NO. The resource is not protected.
  • SM_AGENTAPI_NOCONNECTION. The initialization was not done.
  • SM_AGENTAPI_FAILURE. The server could not be reached.
  • SM_AGENTAPI_TIMEOUT. The function timed out.
Example
See the function SmAgentExample::Sm_IsProtected() in the example application smagentexample.cpp.