Web.HTTPApp.TCustomWebSessionManager

Delphi
TCustomWebSessionManager = class(TComponent, IWebSessionManager)
C++
class PASCALIMPLEMENTATION TCustomWebSessionManager : public System::Classes::TComponent
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | Web.HTTPApp.pas Web.HTTPApp.hpp |
Web.HTTPApp | Web.HTTPApp |
Description
TCustomWebSessionManager is a WebBroker session manager component implementing the IWebSessionManager interface.
Each session is represented by a TWebSession object and stored in the internal session list. An application can store custom objects in TWebSession.DataVars property. Use the TWebRequest.Session property to get the current request session. Use RegisterSessionClass to register a custom session class.
Sessions are identified by a request parameter, whose name is specified by IdName
and location by IdLocation
. By default, this is the sessionId
cookie.
The manager can be used together with an authenticator (IWebAuthenticator) to enable user authentication. In this case, TWebSession.User will not be nil. An authenticator is required when Scope is set to ssUser or ssUserAndIP.
If the request contains no session ID parameter, a new session is created. Use the OnCreated event to customize new sessions. If a session id parameter is found, it is validated. Use OnValidate to apply custom validation logic.
Once validated, the session is acquired for handling the request and then released afterwards. Use the OnAcquire and OnRelease events to customize the handling process.