aboutsummaryrefslogtreecommitdiff
path: root/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/IWebSessionIdFactory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Libs/VNLib.Plugins.Essentials.Sessions.VNCache/IWebSessionIdFactory.cs')
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.VNCache/IWebSessionIdFactory.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/IWebSessionIdFactory.cs b/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/IWebSessionIdFactory.cs
new file mode 100644
index 0000000..81f44b8
--- /dev/null
+++ b/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/IWebSessionIdFactory.cs
@@ -0,0 +1,26 @@
+
+using VNLib.Net.Http;
+
+namespace VNLib.Plugins.Essentials.Sessions.VNCache
+{
+ /// <summary>
+ /// Id factory for <see cref="WebSessionProvider"/>
+ /// </summary>
+ internal interface IWebSessionIdFactory: ISessionIdFactory
+ {
+ /// <summary>
+ /// The maxium amount of time a session is valid for. Sessions will be invalidated
+ /// after this time
+ /// </summary>
+ TimeSpan ValidFor { get; }
+
+ /// <summary>
+ /// Gets a new session-id for the connection and manipulates the entity as necessary
+ /// </summary>
+ /// <param name="entity">The connection to generate the new session for</param>
+ /// <returns>The new session-id</returns>
+ string GenerateSessionId(IHttpEvent entity);
+ }
+
+
+}