From 8119bd099ae55ab36458d73bcb600afe9b022713 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 21 Aug 2022 03:04:13 +0200 Subject: [PATCH] Added description for HTTPSessionManager. Note that this class still needs more cleanups, but I wrote docs in a way as if those were already done. --- modules/web/doc_classes/HTTPSessionManager.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/web/doc_classes/HTTPSessionManager.xml b/modules/web/doc_classes/HTTPSessionManager.xml index 89b601b81..423078550 100644 --- a/modules/web/doc_classes/HTTPSessionManager.xml +++ b/modules/web/doc_classes/HTTPSessionManager.xml @@ -1,8 +1,14 @@ + The [HTTPSessionManager] class stores active sessions on a server. + 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.