pandemonium_engine/modules/web/doc_classes/HTTPSessionManager.xml

71 lines
2.5 KiB
XML
Raw Normal View History

2022-08-21 00:40:49 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2022-11-20 23:27:04 +01:00
<class name="HTTPSessionManager" inherits="Node" version="3.10">
2022-08-21 00:40:49 +02:00
<brief_description>
The [HTTPSessionManager] class stores active sessions on a server.
2022-08-21 00:40:49 +02:00
</brief_description>
<description>
The [HTTPSessionManager] class stores active sessions on a server, and also has helper methods to create, save and delete sessions.
It should be placed as a child of a [WebServer], which will automatically pick it up. [WebNode]s should access it using the helper methods in [WebServerRequest].
The [SessionSetupWebServerMiddleware] is meant to be used alongside this class, which will automatically take session id from a request's cookie (if exists), and if it exists it will set the HTTPSession belonging to that id to the Request's session variable. Note that this will not create sessions automatically.
Although sessions can be created and set up manually, the [WebServerRequest] class also offers helper methods to do this.
Note that this class won't save the created sessions. Use one of it's inheritors, or inherit from it to implement your own serialization.
2022-08-21 00:40:49 +02:00
</description>
<tutorials>
</tutorials>
<methods>
<method name="add_session">
<return type="void" />
<argument index="0" name="session" type="HTTPSession" />
<description>
</description>
</method>
<method name="clear">
<return type="void" />
<description>
</description>
</method>
<method name="create_session">
<return type="HTTPSession" />
<description>
</description>
</method>
<method name="delete_session">
2022-12-22 19:28:17 +01:00
<return type="HTTPSession" />
2022-08-21 00:40:49 +02:00
<argument index="0" name="session_id" type="String" />
<description>
</description>
</method>
<method name="generate_session_id">
<return type="String" />
<argument index="0" name="base" type="String" default="&quot;&quot;" />
<description>
</description>
</method>
<method name="get_session">
<return type="HTTPSession" />
<argument index="0" name="session_id" type="String" />
<description>
</description>
</method>
<method name="load_sessions">
<return type="void" />
<description>
</description>
</method>
<method name="remove_session">
<return type="void" />
<argument index="0" name="session" type="HTTPSession" />
<description>
</description>
</method>
<method name="save_session">
<return type="void" />
<argument index="0" name="session" type="HTTPSession" />
<description>
</description>
</method>
</methods>
<constants>
</constants>
</class>