aboutsummaryrefslogtreecommitdiff
path: root/Libs/VNLib.Plugins.Essentials.Sessions
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-01-12 17:47:41 -0500
committerLibravatar vnugent <public@vaughnnugent.com>2023-01-12 17:47:41 -0500
commit751e1a107195f0c9c98c866e8267a5a760545982 (patch)
tree71a775c91bfd9d455b727c72d2fb628c530f64cc /Libs/VNLib.Plugins.Essentials.Sessions
parent9bb5ddd8f19c0ecabd7af4ee58d80c16826bc183 (diff)
Large project reorder and consolidation
Diffstat (limited to 'Libs/VNLib.Plugins.Essentials.Sessions')
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions/MemorySession.cs130
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionConfig.cs58
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionEntrypoint.cs93
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionStore.cs168
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions/SessionIdFactory.cs84
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions/VNLib.Plugins.Essentials.Sessions.Memory.csproj56
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions/VNLib.Plugins.Essentials.Sessions.Memory.xml78
7 files changed, 0 insertions, 667 deletions
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions/MemorySession.cs b/Libs/VNLib.Plugins.Essentials.Sessions/MemorySession.cs
deleted file mode 100644
index d365cd2..0000000
--- a/Libs/VNLib.Plugins.Essentials.Sessions/MemorySession.cs
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2022 Vaughn Nugent
-*
-* Library: VNLib
-* Package: VNLib.Plugins.Essentials.Sessions.Memory
-* File: MemorySession.cs
-*
-* MemorySession.cs is part of VNLib.Plugins.Essentials.Sessions.Memory which is part of the larger
-* VNLib collection of libraries and utilities.
-*
-* VNLib.Plugins.Essentials.Sessions.Memory is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Affero General Public License as
-* published by the Free Software Foundation, either version 3 of the
-* License, or (at your option) any later version.
-*
-* VNLib.Plugins.Essentials.Sessions.Memory is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Affero General Public License for more details.
-*
-* You should have received a copy of the GNU Affero General Public License
-* along with this program. If not, see https://www.gnu.org/licenses/.
-*/
-
-using System;
-using System.Net;
-using System.Threading.Tasks;
-using System.Collections.Generic;
-using VNLib.Plugins.Essentials.Extensions;
-
-using VNLib.Utils.Async;
-using VNLib.Net.Http;
-using VNLib.Utils.Memory.Caching;
-using static VNLib.Plugins.Essentials.Sessions.ISessionExtensions;
-
-#nullable enable
-
-namespace VNLib.Plugins.Essentials.Sessions.Memory
-{
- internal class MemorySession : SessionBase, ICacheable
- {
- private readonly Dictionary<string, string> DataStorage;
-
- private readonly Func<IHttpEvent, string, string> OnSessionUpdate;
- private readonly AsyncQueue<MemorySession> ExpiredTable;
-
- public MemorySession(string sessionId, IPAddress ipAddress, Func<IHttpEvent, string, string> onSessionUpdate, AsyncQueue<MemorySession> expired)
- {
- //Set the initial is-new flag
- DataStorage = new Dictionary<string, string>(10);
- ExpiredTable = expired;
-
- OnSessionUpdate = onSessionUpdate;
- //Get new session id
- SessionID = sessionId;
- UserIP = ipAddress;
- SessionType = SessionType.Web;
- Created = DateTimeOffset.UtcNow;
- //Init
- IsNew = true;
- }
- //Store in memory directly
- public override IPAddress UserIP { get; protected set; }
-
- //Session type has no backing store, so safe to hard-code it's always web
-
- public override SessionType SessionType => SessionType.Web;
-
- protected override ValueTask<Task?> UpdateResource(bool isAsync, IHttpEvent state)
- {
- //if invalid is set, invalide the current session
- if (Flags.IsSet(INVALID_MSK))
- {
- //Clear storage, and regenerate the sessionid
- DataStorage.Clear();
- //store new sessionid
- SessionID = OnSessionUpdate(state, SessionID);
- //Reset ip-address
- UserIP = state.Server.GetTrustedIp();
- //Update created-time
- Created = DateTimeOffset.UtcNow;
- //Re-initialize the session to the state of the current connection
- this.InitNewSession(state.Server);
- //Modified flag doesnt matter since there is no write-back
-
- }
- else if (Flags.IsSet(REGEN_ID_MSK))
- {
- //Regen id without modifying the data store
- SessionID = OnSessionUpdate(state, SessionID);
- }
- //Clear flags
- Flags.ClearAll();
- //Memory session always completes
- return ValueTask.FromResult<Task?>(null);
- }
-
- protected override string IndexerGet(string key)
- {
- return DataStorage.GetValueOrDefault(key, string.Empty);
- }
-
- protected override void IndexerSet(string key, string value)
- {
- //Check for special keys
- switch (key)
- {
- //For tokens/login hashes, we can set the upgrade flag
- case TOKEN_ENTRY:
- case LOGIN_TOKEN_ENTRY:
- Flags.Set(REGEN_ID_MSK);
- break;
- }
- DataStorage[key] = value;
- }
-
-
- DateTime ICacheable.Expires { get; set; }
-
- void ICacheable.Evicted()
- {
- DataStorage.Clear();
- //Enque cleanup
- _ = ExpiredTable.TryEnque(this);
- }
-
- bool IEquatable<ICacheable>.Equals(ICacheable? other) => other is ISession ses && SessionID.Equals(ses.SessionID, StringComparison.Ordinal);
-
- }
-}
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionConfig.cs b/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionConfig.cs
deleted file mode 100644
index 74199e6..0000000
--- a/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionConfig.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2022 Vaughn Nugent
-*
-* Library: VNLib
-* Package: VNLib.Plugins.Essentials.Sessions.Memory
-* File: MemorySessionConfig.cs
-*
-* MemorySessionConfig.cs is part of VNLib.Plugins.Essentials.Sessions.Memory which is part of the larger
-* VNLib collection of libraries and utilities.
-*
-* VNLib.Plugins.Essentials.Sessions.Memory is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Affero General Public License as
-* published by the Free Software Foundation, either version 3 of the
-* License, or (at your option) any later version.
-*
-* VNLib.Plugins.Essentials.Sessions.Memory is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Affero General Public License for more details.
-*
-* You should have received a copy of the GNU Affero General Public License
-* along with this program. If not, see https://www.gnu.org/licenses/.
-*/
-
-using System;
-
-using VNLib.Utils.Logging;
-
-namespace VNLib.Plugins.Essentials.Sessions.Memory
-{
- /// <summary>
- /// Represents configration variables used to create and operate http sessions.
- /// </summary>
- public readonly struct MemorySessionConfig
- {
- /// <summary>
- /// The name of the cookie to use for matching sessions
- /// </summary>
- public string SessionCookieID { get; init; }
- /// <summary>
- /// The size (in bytes) of the genreated SessionIds
- /// </summary>
- public uint SessionIdSizeBytes { get; init; }
- /// <summary>
- /// The amount of time a session is valid (within the backing store)
- /// </summary>
- public TimeSpan SessionTimeout { get; init; }
- /// <summary>
- /// The log for which all errors within the <see cref="SessionProvider"/> instance will be written to.
- /// </summary>
- public ILogProvider SessionLog { get; init; }
- /// <summary>
- /// The maximum number of sessions allowed to be cached in memory. If this value is exceed requests to this
- /// server will be denied with a 503 error code
- /// </summary>
- public int MaxAllowedSessions { get; init; }
- }
-} \ No newline at end of file
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionEntrypoint.cs b/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionEntrypoint.cs
deleted file mode 100644
index 07ae04b..0000000
--- a/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionEntrypoint.cs
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-* Copyright (c) 2022 Vaughn Nugent
-*
-* Library: VNLib
-* Package: VNLib.Plugins.Essentials.Sessions.Memory
-* File: MemorySessionEntrypoint.cs
-*
-* MemorySessionEntrypoint.cs is part of VNLib.Plugins.Essentials.Sessions.Memory which is part of the larger
-* VNLib collection of libraries and utilities.
-*
-* VNLib.Plugins.Essentials.Sessions.Memory is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Affero General Public License as
-* published by the Free Software Foundation, either version 3 of the
-* License, or (at your option) any later version.
-*
-* VNLib.Plugins.Essentials.Sessions.Memory is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Affero General Public License for more details.
-*
-* You should have received a copy of the GNU Affero General Public License
-* along with this program. If not, see https://www.gnu.org/licenses/.
-*/
-
-using System;
-using System.Text.Json;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Collections.Generic;
-
-using VNLib.Net.Http;
-using VNLib.Utils.Logging;
-using VNLib.Utils.Extensions;
-using VNLib.Plugins.Extensions.Loading.Events;
-using VNLib.Plugins.Extensions.Loading;
-using VNLib.Plugins.Essentials.Sessions.Runtime;
-
-#nullable enable
-
-namespace VNLib.Plugins.Essentials.Sessions.Memory
-{
- public sealed class MemorySessionEntrypoint : IRuntimeSessionProvider, IIntervalScheduleable
- {
- const string WEB_SESSION_CONFIG = "web";
-
- private MemorySessionStore? _sessions;
-
- bool IRuntimeSessionProvider.CanProcess(IHttpEvent entity)
- {
- //Web sessions can always be provided
- return _sessions != null;
- }
-
- public ValueTask<SessionHandle> GetSessionAsync(IHttpEvent entity, CancellationToken cancellationToken)
- {
- return _sessions!.GetSessionAsync(entity, cancellationToken);
- }
-
- void IRuntimeSessionProvider.Load(PluginBase plugin, ILogProvider localized)
- {
- //Get websessions config element
-
- IReadOnlyDictionary<string, JsonElement> webSessionConfig = plugin.GetConfig(WEB_SESSION_CONFIG);
-
- MemorySessionConfig config = new()
- {
- SessionLog = localized,
- MaxAllowedSessions = webSessionConfig["cache_size"].GetInt32(),
- SessionIdSizeBytes = webSessionConfig["cookie_size"].GetUInt32(),
- SessionTimeout = webSessionConfig["valid_for_sec"].GetTimeSpan(TimeParseType.Seconds),
- SessionCookieID = webSessionConfig["cookie_name"].GetString() ?? throw new KeyNotFoundException($"Missing required element 'cookie_name' for config '{WEB_SESSION_CONFIG}'"),
- };
-
- _sessions = new(config);
-
- //Begin listening for expired records
- _ = plugin.DeferTask(() => _sessions.CleanupExiredAsync(localized, plugin.UnloadToken));
-
- //Schedule garbage collector
- plugin.ScheduleInterval(this, TimeSpan.FromMinutes(1));
-
- //Call cleanup on exit
- _ = plugin.RegisterForUnload(_sessions.Cleanup);
- }
-
- Task IIntervalScheduleable.OnIntervalAsync(ILogProvider log, CancellationToken cancellationToken)
- {
- //Cleanup expired sessions on interval
- _sessions?.GC();
- return Task.CompletedTask;
- }
- }
-}
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionStore.cs b/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionStore.cs
deleted file mode 100644
index 1af885e..0000000
--- a/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionStore.cs
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
-* Copyright (c) 2022 Vaughn Nugent
-*
-* Library: VNLib
-* Package: VNLib.Plugins.Essentials.Sessions.Memory
-* File: MemorySessionStore.cs
-*
-* MemorySessionStore.cs is part of VNLib.Plugins.Essentials.Sessions.Memory which is part of the larger
-* VNLib collection of libraries and utilities.
-*
-* VNLib.Plugins.Essentials.Sessions.Memory is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Affero General Public License as
-* published by the Free Software Foundation, either version 3 of the
-* License, or (at your option) any later version.
-*
-* VNLib.Plugins.Essentials.Sessions.Memory is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Affero General Public License for more details.
-*
-* You should have received a copy of the GNU Affero General Public License
-* along with this program. If not, see https://www.gnu.org/licenses/.
-*/
-
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Collections.Generic;
-
-using VNLib.Net.Http;
-using VNLib.Net.Http.Core;
-using VNLib.Utils;
-using VNLib.Utils.Async;
-using VNLib.Utils.Logging;
-using VNLib.Utils.Extensions;
-using VNLib.Plugins.Essentials.Extensions;
-
-#nullable enable
-
-namespace VNLib.Plugins.Essentials.Sessions.Memory
-{
- /// <summary>
- /// An <see cref="ISessionProvider"/> for in-process-memory backed sessions
- /// </summary>
- internal sealed class MemorySessionStore : ISessionProvider
- {
- private readonly Dictionary<string, MemorySession> SessionsStore;
-
- internal readonly MemorySessionConfig Config;
- internal readonly SessionIdFactory IdFactory;
- internal readonly AsyncQueue<MemorySession> ExpiredSessions;
-
- public MemorySessionStore(MemorySessionConfig config)
- {
- Config = config;
- SessionsStore = new(config.MaxAllowedSessions, StringComparer.Ordinal);
- IdFactory = new(config.SessionIdSizeBytes, config.SessionCookieID, config.SessionTimeout);
- ExpiredSessions = new(false, true);
- }
-
- ///<inheritdoc/>
- public async ValueTask<SessionHandle> GetSessionAsync(IHttpEvent entity, CancellationToken cancellationToken)
- {
-
- static ValueTask SessionHandleClosedAsync(ISession session, IHttpEvent ev)
- {
- return (session as MemorySession)!.UpdateAndRelease(true, ev);
- }
-
- //Try to get the id for the session
- if (IdFactory.TryGetSessionId(entity, out string? sessionId))
- {
- //Try to get the old record or evict it
- ERRNO result = SessionsStore.TryGetOrEvictRecord(sessionId, out MemorySession? session);
- if(result > 0)
- {
- //Valid, now wait for exclusive access
- await session.WaitOneAsync(cancellationToken);
- return new (session, SessionHandleClosedAsync);
- }
- else
- {
- //try to cleanup expired records
- GC();
- //Make sure there is enough room to add a new session
- if (SessionsStore.Count >= Config.MaxAllowedSessions)
- {
- entity.Server.SetNoCache();
- //Set 503 when full
- entity.CloseResponse(System.Net.HttpStatusCode.ServiceUnavailable);
- //Cannot service new session
- return new(null, FileProcessArgs.VirtualSkip, null);
- }
- //Initialze a new session
- session = new(sessionId, entity.Server.GetTrustedIp(), UpdateSessionId, ExpiredSessions);
- //Increment the semaphore
- (session as IWaitHandle).WaitOne();
- //store the session in cache while holding semaphore, and set its expiration
- SessionsStore.StoreRecord(session.SessionID, session, Config.SessionTimeout);
- //Init new session handle
- return new (session, SessionHandleClosedAsync);
- }
- }
- else
- {
- return SessionHandle.Empty;
- }
- }
-
- public async Task CleanupExiredAsync(ILogProvider log, CancellationToken token)
- {
- while (true)
- {
- try
- {
- //Wait for expired session and dispose it
- using MemorySession session = await ExpiredSessions.DequeueAsync(token);
-
- //Obtain lock on session
- await session.WaitOneAsync(CancellationToken.None);
-
- log.Verbose("Removed expired session {id}", session.SessionID);
- }
- catch (OperationCanceledException)
- {
- break;
- }
- catch (Exception ex)
- {
- log.Error(ex);
- }
- }
- }
-
- private string UpdateSessionId(IHttpEvent entity, string oldId)
- {
- //Generate and set a new sessionid
- string newid = IdFactory.GenerateSessionId(entity);
- //Aquire lock on cache
- lock (SessionsStore)
- {
- //Change the cache lookup id
- if (SessionsStore.Remove(oldId, out MemorySession? session))
- {
- SessionsStore.Add(newid, session);
- }
- }
- return newid;
- }
-
- /// <summary>
- /// Evicts all sessions from the current store
- /// </summary>
- public void Cleanup()
- {
- //Expire all old records to cleanup all entires
- this.SessionsStore.CollectRecords(DateTime.MaxValue);
- }
- /// <summary>
- /// Collects all expired records from the current store
- /// </summary>
- public void GC()
- {
- //collect expired records
- this.SessionsStore.CollectRecords();
- }
- }
-}
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions/SessionIdFactory.cs b/Libs/VNLib.Plugins.Essentials.Sessions/SessionIdFactory.cs
deleted file mode 100644
index c221617..0000000
--- a/Libs/VNLib.Plugins.Essentials.Sessions/SessionIdFactory.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2022 Vaughn Nugent
-*
-* Library: VNLib
-* Package: VNLib.Plugins.Essentials.Sessions.Memory
-* File: SessionIdFactory.cs
-*
-* SessionIdFactory.cs is part of VNLib.Plugins.Essentials.Sessions.Memory which is part of the larger
-* VNLib collection of libraries and utilities.
-*
-* VNLib.Plugins.Essentials.Sessions.Memory is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Affero General Public License as
-* published by the Free Software Foundation, either version 3 of the
-* License, or (at your option) any later version.
-*
-* VNLib.Plugins.Essentials.Sessions.Memory is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Affero General Public License for more details.
-*
-* You should have received a copy of the GNU Affero General Public License
-* along with this program. If not, see https://www.gnu.org/licenses/.
-*/
-
-using System;
-using System.Diagnostics.CodeAnalysis;
-
-using VNLib.Hashing;
-using VNLib.Net.Http;
-using VNLib.Plugins.Essentials.Extensions;
-using VNLib.Plugins.Essentials.Sessions.Runtime;
-
-#nullable enable
-
-namespace VNLib.Plugins.Essentials.Sessions.Memory
-{
- internal sealed class SessionIdFactory : ISessionIdFactory
- {
- private readonly int IdSize;
- private readonly string cookieName;
- private readonly TimeSpan ValidFor;
-
- public SessionIdFactory(uint idSize, string cookieName, TimeSpan validFor)
- {
- IdSize = (int)idSize;
- this.cookieName = cookieName;
- ValidFor = validFor;
- }
-
- public string GenerateSessionId(IHttpEvent entity)
- {
- //Random hex hash
- string cookie = RandomHash.GetRandomBase32(IdSize);
-
- //Set the session id cookie
- entity.Server.SetCookie(cookieName, cookie, ValidFor, secure: true, httpOnly: true);
-
- //return session-id value from cookie value
- return cookie;
- }
-
- public bool TryGetSessionId(IHttpEvent entity, [NotNullWhen(true)] out string? sessionId)
- {
- //Get authorization token and make sure its not too large to cause a buffer overflow
- if (entity.Server.GetCookie(cookieName, out sessionId))
- {
- return true;
- }
- //Only add sessions for user-agents
- else if (entity.Server.IsBrowser())
- {
- //Get a new session id
- sessionId = GenerateSessionId(entity);
-
- return true;
- }
- else
- {
- sessionId = null;
- return false;
- }
- }
- }
-}
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions/VNLib.Plugins.Essentials.Sessions.Memory.csproj b/Libs/VNLib.Plugins.Essentials.Sessions/VNLib.Plugins.Essentials.Sessions.Memory.csproj
deleted file mode 100644
index 78fe298..0000000
--- a/Libs/VNLib.Plugins.Essentials.Sessions/VNLib.Plugins.Essentials.Sessions.Memory.csproj
+++ /dev/null
@@ -1,56 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
- <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
- <AssemblyName>VNLib.Plugins.Essentials.Sessions.Memory</AssemblyName>
- <RootNamespace>VNLib.Plugins.Essentials.Sessions.Memory</RootNamespace>
- <Authors>Vaughn Nugent</Authors>
- <Copyright>Copyright © 2022 Vaughn Nugent</Copyright>
- <PackageProjectUrl>https://www.vaughnnugent.com/resources</PackageProjectUrl>
- <SignAssembly>True</SignAssembly>
- <AssemblyOriginatorKeyFile>\\vaughnnugent.com\Internal\Folder Redirection\vman\Documents\Programming\Software\StrongNameingKey.snk</AssemblyOriginatorKeyFile>
- </PropertyGroup>
-
- <!-- Resolve nuget dll files and store them in the output dir -->
- <PropertyGroup>
- <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
- <EnableDynamicLoading>true</EnableDynamicLoading>
- <GenerateDocumentationFile>True</GenerateDocumentationFile>
- <AnalysisLevel>latest-all</AnalysisLevel>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
- <Deterministic>False</Deterministic>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
- <Deterministic>False</Deterministic>
- </PropertyGroup>
-
- <ProjectExtensions><VisualStudio><UserProperties /></VisualStudio></ProjectExtensions>
- <ItemGroup>
- <PackageReference Include="ErrorProne.NET.CoreAnalyzers" Version="0.1.2">
- <PrivateAssets>all</PrivateAssets>
- <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
- </PackageReference>
- <PackageReference Include="ErrorProne.NET.Structs" Version="0.1.2">
- <PrivateAssets>all</PrivateAssets>
- <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
- </PackageReference>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\..\VNLib\Essentials\src\VNLib.Plugins.Essentials.csproj" />
- <ProjectReference Include="..\..\..\..\VNLib\Http\src\VNLib.Net.Http.csproj" />
- <ProjectReference Include="..\..\..\Extensions\VNLib.Plugins.Extensions.Loading\VNLib.Plugins.Extensions.Loading.csproj" />
- <ProjectReference Include="..\..\..\PluginBase\VNLib.Plugins.PluginBase.csproj" />
- <ProjectReference Include="..\VNLib.Plugins.Essentials.Sessions.Runtime\VNLib.Plugins.Essentials.Sessions.Runtime.csproj" />
- </ItemGroup>
-
- <Target Name="PostBuild" AfterTargets="PostBuildEvent">
- <Exec Command="start xcopy &quot;$(TargetDir)&quot; &quot;F:\Programming\Web Plugins\DevPlugins\RuntimeAssets\$(TargetName)&quot; /E /Y /R" />
- </Target>
- <Target Name="PreBuild" BeforeTargets="PreBuildEvent">
- <Exec Command="erase &quot;F:\Programming\Web Plugins\DevPlugins\RuntimeAssets\$(TargetName)&quot; /q &gt; nul" />
- </Target>
-
-
-</Project>
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions/VNLib.Plugins.Essentials.Sessions.Memory.xml b/Libs/VNLib.Plugins.Essentials.Sessions/VNLib.Plugins.Essentials.Sessions.Memory.xml
deleted file mode 100644
index 0821935..0000000
--- a/Libs/VNLib.Plugins.Essentials.Sessions/VNLib.Plugins.Essentials.Sessions.Memory.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0"?>
-<!--
-Copyright (c) 2022 Vaughn Nugent
--->
-<doc>
- <assembly>
- <name>VNLib.Plugins.Essentials.Sessions.Memory</name>
- </assembly>
- <members>
- <member name="T:VNLib.Plugins.Essentials.Sessions.Memory.MemorySessionStore">
- <summary>
- An <see cref="T:VNLib.Plugins.Essentials.Sessions.ISessionProvider"/> for in-process-memory backed sessions
- </summary>
- </member>
- <member name="M:VNLib.Plugins.Essentials.Sessions.Memory.MemorySessionStore.GetSessionAsync(VNLib.Net.Http.HttpEvent,System.Threading.CancellationToken)">
- <inheritdoc/>
- </member>
- <member name="P:VNLib.Plugins.Essentials.Sessions.Memory.MemorySessionStore.NewSessionID">
- <summary>
- Gets a new unique sessionid for sessions
- </summary>
- </member>
- <member name="M:VNLib.Plugins.Essentials.Sessions.Memory.MemorySessionStore.SetSessionCookie(VNLib.Net.Http.HttpEvent,VNLib.Plugins.Essentials.Sessions.Memory.MemorySession)">
- <summary>
- Sets a standard session cookie for an entity/connection
- </summary>
- <param name="entity">The entity to set the cookie on</param>
- <param name="session">The session attached to the </param>
- </member>
- <member name="M:VNLib.Plugins.Essentials.Sessions.Memory.MemorySessionStore.Cleanup">
- <summary>
- Evicts all sessions from the current store
- </summary>
- </member>
- <member name="M:VNLib.Plugins.Essentials.Sessions.Memory.MemorySessionStore.GC">
- <summary>
- Collects all expired records from the current store
- </summary>
- </member>
- <member name="T:VNLib.Plugins.Essentials.Sessions.Memory.MemSessionHandle">
- <summary>
- Provides a one-time-use handle (similar to asyncReleaser, or openHandle)
- that holds exclusive access to a session until it is released
- </summary>
- </member>
- <member name="T:VNLib.Net.Sessions.MemorySessionConfig">
- <summary>
- Represents configration variables used to create and operate http sessions.
- </summary>
- </member>
- <member name="P:VNLib.Net.Sessions.MemorySessionConfig.SessionCookieID">
- <summary>
- The name of the cookie to use for matching sessions
- </summary>
- </member>
- <member name="P:VNLib.Net.Sessions.MemorySessionConfig.SessionIdSizeBytes">
- <summary>
- The size (in bytes) of the genreated SessionIds
- </summary>
- </member>
- <member name="P:VNLib.Net.Sessions.MemorySessionConfig.SessionTimeout">
- <summary>
- The amount of time a session is valid (within the backing store)
- </summary>
- </member>
- <member name="P:VNLib.Net.Sessions.MemorySessionConfig.SessionLog">
- <summary>
- The log for which all errors within the <see cref="!:SessionProvider"/> instance will be written to.
- </summary>
- </member>
- <member name="P:VNLib.Net.Sessions.MemorySessionConfig.MaxAllowedSessions">
- <summary>
- The maximum number of sessions allowed to be cached in memory. If this value is exceed requests to this
- server will be denied with a 503 error code
- </summary>
- </member>
- </members>
-</doc>