The AddParameter method adds a session variable name-value pair to a parameters list. Session variables contain data about the client application, such as business logic, certificate information, and SAML assertions for Affiliate applications. This data is bound to a user session.
Syntax
The AddParameter method has the following format:
Netegrity::AgentSession‑>AddParameter(varName [,varValue][, varFlag])
Parameters
The AddParameter method accepts the following parameters:
varName (string)
Specifies the name of the variable to add to the parameter list.
Limit: Maximum length is 255 characters.
varValue (string)
(Optional) Specifies the value of the variable to be added to the parameter list.
Limit: Maximum length is determined by the target data store.
varFlag (int)
(Optional) Specifies whether the GetVariables method deletes the variable name-value pair from the session store:
Specifies that GetVariables retrieves the variable name-value pair from the session store, but does not delete it.
Specifies that GetVariables retrieves the variable name-value pair from the session store and then deletes it.
Return Value
The AddParameter method does not return a value.
Remarks
You can manage the name-value pairs in the parameters list by calling these session variable methods:
To manage multiple variables, call AddParameter once for each variable before calling the AgentSession‑>DelVariables, AgentSession‑>GetVariables, and AgentSession‑>SetVariables methods. While AddParameter adds variables to the parameters list, AgentSession‑>DelVariables, AgentSession‑>GetVariables, and AgentSession‑>SetVariables clear the parameters list.
Before you can use the session variable methods, the following conditions must be met:
Note: For more information, see the Policy Server Administration Guide and the Policy Server Configuration Guide.
The DelVariables method deletes the session variables in the parameters list from the session store. Call AgentSession‑>AddParameter first to specify the variables in the parameters list.
Syntax
The DelVariables method has the following format:
Netegrity::AgentSession‑>DelVariables()
Parameters
The DelVariables method accepts no parameters.
Return Value
The DelVariables method does not return a value.
Remarks
The DelVariables method clears the parameters list.
The GetID method retrieves the session ID.
Syntax
The GetID method has the following format:
Netegrity::AgentSession‑>GetID()
Parameters
The GetID method accepts no parameters.
Return Value
The GetID method returns the following value:
The GetReason method retrieves the session's reason ID. The reason ID specifies a reason for a failed authentication or authorization.
Syntax
The GetReason method has the following format:
Netegrity::AgentSession‑>GetReason()
Parameters
The GetReason method accepts no parameters.
Return Value
The GetReason method returns one of the following values (long):
The GetSpec method retrieves the encrypted session specification. The session specification includes information about the user session, such as the session start time, timeout parameters, and the user's distinguished name. You can use the session specification to identify a session across multiple Web sites, as you would for single sign-on applications.
Syntax
The GetSpec method has the following format:
Netegrity::AgentSession‑>GetSpec()
Parameters
The GetSpec method accepts no parameters.
Return Value
The GetSpec method returns the following value:
Remarks
Where the session specification is stored depends on the type of session:
The session specification is stored in a cookie.
The session specification is stored in a session store database and optionally in a cookie on the client.
Note: The session ticket is used as an index to the actual user session data stored in the Web agent's cache.
The GetVariables method retrieves the session variables in the parameters list from the session store. Call AgentSession‑>AddParameter first to specify the variables in the parameters list. To delete a variable from the session store after it is retrieved, call AgentSession‑>AddParameter with varFlag set to 1 (one).
Syntax
The GetVariables method has the following format:
Netegrity::AgentSession‑>GetVariables()
Parameters
The GetVariables method accepts no parameters.
Return Value
The GetVariables method returns the following value:
Note: Some session variables cannot be retrieved. To check for these, call AgentResponseAttr‑>GetFlags for the associated AgentResponseAttr object and test for the following return value:
SM_AGENTAPI_RESPATTR_FLAGS_UNRESOLVED (value = 2)
Remarks
The GetVariables method clears the parameters list.
The IdleTimeout method retrieves the session's idle timeout value in seconds. The idle timeout value is the maximum length of time a user session can be inactive. When this time is exceeded, the session is no longer valid and the user must re-authenticate.
Syntax
The IdleTimeout method has the following format:
Netegrity::AgentSession‑>IdleTimeout()
Parameters
The IdleTimeout method accepts no parameters.
Return Value
The IdleTimeout method returns the following value:
The MaxTimeout method retrieves the session's maximum timeout value in seconds. The maximum timeout value is the length of time a user session can be active. When this time is exceeded, the user must re-authenticate.
Syntax
The MaxTimeout method has the following format:
Netegrity::AgentSession‑>MaxTimeout()
Parameters
The MaxTimeout method accepts no parameters.
Return Value
The MaxTimeout method returns the following value:
The SetVariables method writes the session variables in the parameters list to the session store. Call AgentSession‑>AddParameter first to specify the variables in the list. If a variable exists in the session store, its value is updated to the new value. If the variable does not exist, a new variable is created.
Syntax
The SetVariables method has the following format:
Netegrity::AgentSession‑>SetVariables()
Parameters
The SetVariables method accepts no parameters.
Return Value
The SetVariables method does not return a value.
Remarks
The SetVariables method clears the parameters list.
Copyright © 2014 CA.
All rights reserved.
|
|