aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar vman <public@vaughnnugent.com>2022-11-18 17:45:18 -0500
committerLibravatar vman <public@vaughnnugent.com>2022-11-18 17:45:18 -0500
commit75a7d674d24cdd50c5267fae8a484ae7361bc377 (patch)
tree8b4aaa8ea07750aa64398676a23fa5e83f5109b9
parentfdb055f4687c59c5bd0859388dace05766f7ce06 (diff)
Namepace + msc updates
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.OAuth/Endpoints/AccessTokenEndpoint.cs1
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.OAuth/Endpoints/RevocationEndpoint.cs2
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.OAuth/IOauthSessionIdFactory.cs1
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.OAuth/O2SessionProviderEntry.cs6
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2Session.cs1
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2SessionIdProvider.cs4
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2SessionProvider.cs3
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2TokenResult.cs2
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.OAuth/VNLib.Plugins.Essentials.Sessions.OAuth.csproj15
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.Runtime/IRuntimeSessionProvider.cs5
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.Runtime/ISessionIdFactory.cs2
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.Runtime/VnCacheClient.cs6
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.VNCache/IWebSessionIdFactory.cs4
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.VNCache/VNLib.Plugins.Essentials.Sessions.VNCache.csproj11
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSession.cs4
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionIdFactoryImpl.cs4
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs2
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions/MemorySession.cs3
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionConfig.cs5
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionEntrypoint.cs5
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionStore.cs2
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions/SessionIdFactory.cs3
-rw-r--r--Libs/VNLib.Plugins.Essentials.Sessions/VNLib.Plugins.Essentials.Sessions.Memory.csproj4
-rw-r--r--Libs/VNLib.Plugins.Sessions.Cache.Client/Exceptions/MessageTooLargeException.cs10
-rw-r--r--Libs/VNLib.Plugins.Sessions.Cache.Client/Exceptions/SessionStatusException.cs10
-rw-r--r--Libs/VNLib.Plugins.Sessions.Cache.Client/Exceptions/SessionUpdateFailedException.cs10
-rw-r--r--Libs/VNLib.Plugins.Sessions.Cache.Client/SessionCacheClient.cs4
-rw-r--r--Libs/VNLib.Plugins.Sessions.Cache.Client/VNLib.Plugins.Sessions.Cache.Client.csproj2
-rw-r--r--Plugins/CacheBroker/Endpoints/BrokerRegistrationEndpoint.cs15
-rw-r--r--Plugins/SessionCacheServer/Endpoints/ConnectEndpoint.cs10
-rw-r--r--Plugins/SessionCacheServer/SessionCacheServer.csproj1
-rw-r--r--Plugins/SessionCacheServer/SessionServerEntrypoint.cs2
-rw-r--r--Plugins/SessionProvider/SessionClientEntryPoint.cs1
33 files changed, 84 insertions, 76 deletions
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/Endpoints/AccessTokenEndpoint.cs b/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/Endpoints/AccessTokenEndpoint.cs
index c87c761..82fbc87 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/Endpoints/AccessTokenEndpoint.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/Endpoints/AccessTokenEndpoint.cs
@@ -11,6 +11,7 @@ using VNLib.Plugins.Essentials.Extensions;
using VNLib.Plugins.Extensions.Loading;
using VNLib.Plugins.Extensions.Loading.Sql;
using VNLib.Plugins.Extensions.Validation;
+using VNLib.Plugins.Essentials.Oauth.Tokens;
namespace VNLib.Plugins.Essentials.Sessions.OAuth.Endpoints
{
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/Endpoints/RevocationEndpoint.cs b/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/Endpoints/RevocationEndpoint.cs
index 095e07e..1d307a6 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/Endpoints/RevocationEndpoint.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/Endpoints/RevocationEndpoint.cs
@@ -2,7 +2,7 @@
using System.Text.Json;
using VNLib.Plugins.Essentials.Oauth;
-using VNLib.Plugins.Extensions.Loading.Configuration;
+using VNLib.Plugins.Extensions.Loading;
namespace VNLib.Plugins.Essentials.Sessions.OAuth.Endpoints
{
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/IOauthSessionIdFactory.cs b/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/IOauthSessionIdFactory.cs
index 9eb9928..39e060a 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/IOauthSessionIdFactory.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/IOauthSessionIdFactory.cs
@@ -2,6 +2,7 @@
using VNLib.Net.Http;
using VNLib.Plugins.Essentials.Oauth.Applications;
+using VNLib.Plugins.Essentials.Sessions.Runtime;
using VNLib.Plugins.Sessions.Cache.Client;
namespace VNLib.Plugins.Essentials.Sessions.OAuth
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/O2SessionProviderEntry.cs b/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/O2SessionProviderEntry.cs
index 89b36ad..095c2b2 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/O2SessionProviderEntry.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/O2SessionProviderEntry.cs
@@ -4,15 +4,15 @@ using System.Text.Json;
using VNLib.Net.Http;
using VNLib.Utils.Logging;
using VNLib.Utils.Extensions;
-using VNLib.Plugins.Essentials.Oauth;
using VNLib.Plugins.Essentials.Oauth.Applications;
using VNLib.Plugins.Essentials.Sessions.OAuth;
using VNLib.Plugins.Essentials.Sessions.OAuth.Endpoints;
using VNLib.Plugins.Extensions.Loading;
+using VNLib.Plugins.Extensions.Loading.Routing;
using VNLib.Plugins.Extensions.Loading.Sql;
using VNLib.Plugins.Extensions.Loading.Events;
-using VNLib.Plugins.Extensions.Loading.Routing;
-using VNLib.Plugins.Extensions.Loading.Configuration;
+using VNLib.Plugins.Essentials.Sessions.Runtime;
+using VNLib.Plugins.Essentials.Oauth.Tokens;
namespace VNLib.Plugins.Essentials.Sessions.Oauth
{
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2Session.cs b/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2Session.cs
index 5987c81..b78bc97 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2Session.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2Session.cs
@@ -3,6 +3,7 @@
using VNLib.Net.Http;
using VNLib.Net.Messaging.FBM.Client;
using VNLib.Plugins.Sessions.Cache.Client;
+using VNLib.Plugins.Sessions.Cache.Client.Exceptions;
using static VNLib.Plugins.Essentials.Sessions.ISessionExtensions;
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2SessionIdProvider.cs b/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2SessionIdProvider.cs
index 1058653..597749d 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2SessionIdProvider.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2SessionIdProvider.cs
@@ -5,12 +5,12 @@ using VNLib.Utils.Memory;
using VNLib.Utils.Extensions;
using VNLib.Hashing;
using VNLib.Net.Http;
-using VNLib.Plugins.Essentials.Oauth.Applications;
using VNLib.Plugins.Essentials.Extensions;
+using VNLib.Plugins.Essentials.Sessions.Runtime;
+using VNLib.Plugins.Essentials.Oauth.Applications;
using VNLib.Plugins.Sessions.Cache.Client;
using static VNLib.Plugins.Essentials.Oauth.OauthSessionExtensions;
-
namespace VNLib.Plugins.Essentials.Sessions.OAuth
{
/// <summary>
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2SessionProvider.cs b/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2SessionProvider.cs
index 79d3789..954a31d 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2SessionProvider.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2SessionProvider.cs
@@ -5,7 +5,6 @@ using Microsoft.EntityFrameworkCore;
using VNLib.Utils;
using VNLib.Utils.Logging;
-using VNLib.Net.Http;
using VNLib.Data.Caching;
using VNLib.Data.Caching.Exceptions;
using VNLib.Net.Messaging.FBM.Client;
@@ -14,6 +13,8 @@ using VNLib.Plugins.Essentials.Oauth;
using VNLib.Plugins.Essentials.Oauth.Tokens;
using VNLib.Plugins.Essentials.Oauth.Applications;
using VNLib.Plugins.Extensions.Loading.Events;
+using VNLib.Net.Http.Core;
+using VNLib.Net.Http;
namespace VNLib.Plugins.Essentials.Sessions.OAuth
{
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2TokenResult.cs b/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2TokenResult.cs
index 1bff743..4d8a2f4 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2TokenResult.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/OAuth2TokenResult.cs
@@ -1,4 +1,4 @@
-using VNLib.Plugins.Essentials.Oauth;
+using VNLib.Plugins.Essentials.Oauth.Tokens;
namespace VNLib.Plugins.Essentials.Sessions.OAuth
{
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/VNLib.Plugins.Essentials.Sessions.OAuth.csproj b/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/VNLib.Plugins.Essentials.Sessions.OAuth.csproj
index cba7822..95bb981 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/VNLib.Plugins.Essentials.Sessions.OAuth.csproj
+++ b/Libs/VNLib.Plugins.Essentials.Sessions.OAuth/VNLib.Plugins.Essentials.Sessions.OAuth.csproj
@@ -13,16 +13,19 @@
</PropertyGroup>
+ <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>
+
<ItemGroup>
+ <ProjectReference Include="..\..\..\..\VNLib\Essentials\VNLib.Plugins.Essentials.csproj" />
+ <ProjectReference Include="..\..\..\..\VNLib\Http\VNLib.Net.Http.csproj" />
<ProjectReference Include="..\..\..\Extensions\VNLib.Plugins.Extensions.Loading.Sql\VNLib.Plugins.Extensions.Loading.Sql.csproj" />
+ <ProjectReference Include="..\..\..\Extensions\VNLib.Plugins.Extensions.Loading\VNLib.Plugins.Extensions.Loading.csproj" />
<ProjectReference Include="..\..\..\Extensions\VNLib.Plugins.Extensions.Validation\VNLib.Plugins.Extensions.Validation.csproj" />
- <ProjectReference Include="..\..\..\Oauth Plugins\VNLib.Plugins.Essentials.Oauth\VNLib.Plugins.Essentials.Oauth.csproj" />
- <ProjectReference Include="..\..\Libs\VNLib.Plugins.Sessions.Cache.Client\VNLib.Plugins.Sessions.Cache.Client.csproj" />
+ <ProjectReference Include="..\..\..\PluginBase\VNLib.Plugins.PluginBase.csproj" />
<ProjectReference Include="..\VNLib.Plugins.Essentials.Sessions.Runtime\VNLib.Plugins.Essentials.Sessions.Runtime.csproj" />
+ <ProjectReference Include="..\VNLib.Plugins.Sessions.Cache.Client\VNLib.Plugins.Sessions.Cache.Client.csproj" />
</ItemGroup>
- <Target Name="PostBuild" AfterTargets="PostBuildEvent">
- <Exec Command="start xcopy &quot;$(TargetDir)&quot; &quot;F:\Programming\Web Plugins\DevPlugins\SessionProviders\$(TargetName)&quot; /E /Y /R" />
- </Target>
-
</Project>
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.Runtime/IRuntimeSessionProvider.cs b/Libs/VNLib.Plugins.Essentials.Sessions.Runtime/IRuntimeSessionProvider.cs
index 9941e6a..72c8a25 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions.Runtime/IRuntimeSessionProvider.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions.Runtime/IRuntimeSessionProvider.cs
@@ -1,8 +1,7 @@
-
-using VNLib.Net.Http;
+using VNLib.Net.Http;
using VNLib.Utils.Logging;
-namespace VNLib.Plugins.Essentials.Sessions
+namespace VNLib.Plugins.Essentials.Sessions.Runtime
{
/// <summary>
/// Represents a dynamically loadable type that an provide sessions to http connections
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.Runtime/ISessionIdFactory.cs b/Libs/VNLib.Plugins.Essentials.Sessions.Runtime/ISessionIdFactory.cs
index 1e88e5c..aca36cc 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions.Runtime/ISessionIdFactory.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions.Runtime/ISessionIdFactory.cs
@@ -2,7 +2,7 @@
using VNLib.Net.Http;
-namespace VNLib.Plugins.Essentials.Sessions
+namespace VNLib.Plugins.Essentials.Sessions.Runtime
{
public interface ISessionIdFactory
{
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.Runtime/VnCacheClient.cs b/Libs/VNLib.Plugins.Essentials.Sessions.Runtime/VnCacheClient.cs
index a6979ef..ea12705 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions.Runtime/VnCacheClient.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions.Runtime/VnCacheClient.cs
@@ -12,7 +12,7 @@ using VNLib.Data.Caching.Extensions;
using VNLib.Net.Messaging.FBM.Client;
using VNLib.Plugins.Extensions.Loading;
-namespace VNLib.Plugins.Essentials.Sessions
+namespace VNLib.Plugins.Essentials.Sessions.Runtime
{
/// <summary>
/// A wrapper to simplify a cache client object
@@ -28,7 +28,7 @@ namespace VNLib.Plugins.Essentials.Sessions
private TimeSpan RetryInterval;
-
+
private readonly ILogProvider? DebugLog;
private readonly IUnmangedHeap? ClientHeap;
@@ -73,7 +73,7 @@ namespace VNLib.Plugins.Essentials.Sessions
byte[] privKey = Convert.FromBase64String(keys[0] ?? throw new KeyNotFoundException("Missing required secret client_private_key"));
byte[] brokerPub = Convert.FromBase64String(keys[1] ?? throw new KeyNotFoundException("Missing required secret broker_public_key"));
-
+
RetryInterval = config["retry_interval_sec"].GetTimeSpan(TimeParseType.Seconds);
Uri brokerUri = new(brokerAddress);
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/IWebSessionIdFactory.cs b/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/IWebSessionIdFactory.cs
index 81f44b8..8199a9e 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/IWebSessionIdFactory.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/IWebSessionIdFactory.cs
@@ -1,5 +1,5 @@
-
-using VNLib.Net.Http;
+using VNLib.Net.Http;
+using VNLib.Plugins.Essentials.Sessions.Runtime;
namespace VNLib.Plugins.Essentials.Sessions.VNCache
{
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/VNLib.Plugins.Essentials.Sessions.VNCache.csproj b/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/VNLib.Plugins.Essentials.Sessions.VNCache.csproj
index ecb80b1..25b5223 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/VNLib.Plugins.Essentials.Sessions.VNCache.csproj
+++ b/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/VNLib.Plugins.Essentials.Sessions.VNCache.csproj
@@ -32,16 +32,19 @@
</PropertyGroup>
<ItemGroup>
- <ProjectReference Include="..\VNLib.Plugins.Essentials.Sessions.Runtime\VNLib.Plugins.Essentials.Sessions.Runtime.csproj" />
- <ProjectReference Include="..\VNLib.Plugins.Sessions.Cache.Client\VNLib.Plugins.Sessions.Cache.Client.csproj" />
+ <Folder Include="Endpoints\" />
</ItemGroup>
<ItemGroup>
- <Folder Include="Endpoints\" />
+ <ProjectReference Include="..\..\..\..\VNLib\Http\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" />
+ <ProjectReference Include="..\VNLib.Plugins.Sessions.Cache.Client\VNLib.Plugins.Sessions.Cache.Client.csproj" />
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
- <Exec Command="start xcopy &quot;$(TargetDir)&quot; &quot;F:\Programming\Web Plugins\DevPlugins\SessionProviders\$(TargetName)&quot; /E /Y /R" />
+ <Exec Command="start xcopy &quot;$(TargetDir)&quot; &quot;F:\Programming\Web Plugins\DevPlugins\RuntimeAssets\$(TargetName)&quot; /E /Y /R" />
</Target>
</Project>
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSession.cs b/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSession.cs
index a7a6f5e..aa4fbe9 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSession.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSession.cs
@@ -1,11 +1,11 @@
-using VNLib.Net.Http;
+
+using VNLib.Net.Http;
using VNLib.Data.Caching;
using VNLib.Net.Messaging.FBM.Client;
using VNLib.Plugins.Essentials.Extensions;
using VNLib.Plugins.Sessions.Cache.Client;
using static VNLib.Plugins.Essentials.Sessions.ISessionExtensions;
-
namespace VNLib.Plugins.Essentials.Sessions.VNCache
{
internal class WebSession : RemoteSession
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionIdFactoryImpl.cs b/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionIdFactoryImpl.cs
index 001723a..bc6542c 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionIdFactoryImpl.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionIdFactoryImpl.cs
@@ -1,11 +1,11 @@
using System.Diagnostics.CodeAnalysis;
using VNLib.Hashing;
-using VNLib.Net.Http;
using VNLib.Utils.Memory;
using VNLib.Utils.Extensions;
using VNLib.Plugins.Essentials.Extensions;
-
+using VNLib.Net.Http;
+using VNLib.Plugins.Essentials.Sessions.Runtime;
namespace VNLib.Plugins.Essentials.Sessions.VNCache
{
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs b/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs
index f72d1c5..ca90ea0 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions.VNCache/WebSessionProviderEntry.cs
@@ -5,7 +5,7 @@ using VNLib.Utils.Memory;
using VNLib.Utils.Logging;
using VNLib.Utils.Extensions;
using VNLib.Plugins.Extensions.Loading;
-using VNLib.Plugins.Extensions.Loading.Configuration;
+using VNLib.Plugins.Essentials.Sessions.Runtime;
namespace VNLib.Plugins.Essentials.Sessions.VNCache
{
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions/MemorySession.cs b/Libs/VNLib.Plugins.Essentials.Sessions/MemorySession.cs
index 4e09b04..c3786be 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions/MemorySession.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions/MemorySession.cs
@@ -2,10 +2,9 @@
using System.Net;
using System.Threading.Tasks;
using System.Collections.Generic;
-
-using VNLib.Net.Http;
using VNLib.Plugins.Essentials.Extensions;
+using VNLib.Net.Http;
using static VNLib.Plugins.Essentials.Sessions.ISessionExtensions;
#nullable enable
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionConfig.cs b/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionConfig.cs
index cbbaf53..3b657da 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionConfig.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionConfig.cs
@@ -1,7 +1,8 @@
using System;
+
using VNLib.Utils.Logging;
-namespace VNLib.Net.Sessions
+namespace VNLib.Plugins.Essentials.Sessions.Memory
{
/// <summary>
/// Represents configration variables used to create and operate http sessions.
@@ -15,7 +16,7 @@ namespace VNLib.Net.Sessions
/// <summary>
/// The size (in bytes) of the genreated SessionIds
/// </summary>
- public uint SessionIdSizeBytes { get; init; }
+ public uint SessionIdSizeBytes { get; init; }
/// <summary>
/// The amount of time a session is valid (within the backing store)
/// </summary>
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionEntrypoint.cs b/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionEntrypoint.cs
index df5dd59..9954206 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionEntrypoint.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionEntrypoint.cs
@@ -4,13 +4,12 @@ using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
-
using VNLib.Net.Http;
-using VNLib.Net.Sessions;
using VNLib.Utils.Logging;
using VNLib.Utils.Extensions;
-using VNLib.Plugins.Extensions.Loading.Configuration;
using VNLib.Plugins.Extensions.Loading.Events;
+using VNLib.Plugins.Extensions.Loading;
+using VNLib.Plugins.Essentials.Sessions.Runtime;
#nullable enable
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionStore.cs b/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionStore.cs
index 388f998..3e728b9 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionStore.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions/MemorySessionStore.cs
@@ -4,11 +4,11 @@ using System.Threading.Tasks;
using System.Collections.Generic;
using VNLib.Net.Http;
-using VNLib.Net.Sessions;
using VNLib.Utils;
using VNLib.Utils.Async;
using VNLib.Utils.Extensions;
using VNLib.Plugins.Essentials.Extensions;
+using VNLib.Net.Http.Core;
#nullable enable
diff --git a/Libs/VNLib.Plugins.Essentials.Sessions/SessionIdFactory.cs b/Libs/VNLib.Plugins.Essentials.Sessions/SessionIdFactory.cs
index ff0608e..c3ac5bd 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions/SessionIdFactory.cs
+++ b/Libs/VNLib.Plugins.Essentials.Sessions/SessionIdFactory.cs
@@ -4,6 +4,7 @@ using System.Diagnostics.CodeAnalysis;
using VNLib.Hashing;
using VNLib.Net.Http;
using VNLib.Plugins.Essentials.Extensions;
+using VNLib.Plugins.Essentials.Sessions.Runtime;
#nullable enable
@@ -33,7 +34,7 @@ namespace VNLib.Plugins.Essentials.Sessions.Memory
//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
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
index 0d21b31..ca90155 100644
--- a/Libs/VNLib.Plugins.Essentials.Sessions/VNLib.Plugins.Essentials.Sessions.Memory.csproj
+++ b/Libs/VNLib.Plugins.Essentials.Sessions/VNLib.Plugins.Essentials.Sessions.Memory.csproj
@@ -33,10 +33,12 @@
<ItemGroup>
<ProjectReference Include="..\..\..\..\VNLib\Essentials\VNLib.Plugins.Essentials.csproj" />
<ProjectReference Include="..\..\..\..\VNLib\Http\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\SessionProviders\$(TargetName)&quot; /E /Y /R" />
+ <Exec Command="start xcopy &quot;$(TargetDir)&quot; &quot;F:\Programming\Web Plugins\DevPlugins\RuntimeAssets\$(TargetName)&quot; /E /Y /R" />
</Target>
diff --git a/Libs/VNLib.Plugins.Sessions.Cache.Client/Exceptions/MessageTooLargeException.cs b/Libs/VNLib.Plugins.Sessions.Cache.Client/Exceptions/MessageTooLargeException.cs
index 15164ca..550ca81 100644
--- a/Libs/VNLib.Plugins.Sessions.Cache.Client/Exceptions/MessageTooLargeException.cs
+++ b/Libs/VNLib.Plugins.Sessions.Cache.Client/Exceptions/MessageTooLargeException.cs
@@ -3,7 +3,7 @@ using System.Runtime.Serialization;
using VNLib.Net.Messaging.FBM;
-namespace VNLib.Plugins.Sessions.Cache.Client
+namespace VNLib.Plugins.Sessions.Cache.Client.Exceptions
{
/// <summary>
/// Raised when a request message is too large to send to
@@ -13,15 +13,15 @@ namespace VNLib.Plugins.Sessions.Cache.Client
{
///<inheritdoc/>
public MessageTooLargeException()
- {}
+ { }
///<inheritdoc/>
public MessageTooLargeException(string message) : base(message)
- {}
+ { }
///<inheritdoc/>
public MessageTooLargeException(string message, Exception innerException) : base(message, innerException)
- {}
+ { }
///<inheritdoc/>
protected MessageTooLargeException(SerializationInfo info, StreamingContext context) : base(info, context)
- {}
+ { }
}
}
diff --git a/Libs/VNLib.Plugins.Sessions.Cache.Client/Exceptions/SessionStatusException.cs b/Libs/VNLib.Plugins.Sessions.Cache.Client/Exceptions/SessionStatusException.cs
index 5bb6f42..f752806 100644
--- a/Libs/VNLib.Plugins.Sessions.Cache.Client/Exceptions/SessionStatusException.cs
+++ b/Libs/VNLib.Plugins.Sessions.Cache.Client/Exceptions/SessionStatusException.cs
@@ -3,17 +3,17 @@ using System.Runtime.Serialization;
using VNLib.Plugins.Essentials.Sessions;
-namespace VNLib.Plugins.Sessions.Cache.Client
+namespace VNLib.Plugins.Sessions.Cache.Client.Exceptions
{
public class SessionStatusException : SessionException
{
public SessionStatusException()
- {}
+ { }
public SessionStatusException(string message) : base(message)
- {}
+ { }
public SessionStatusException(string message, Exception innerException) : base(message, innerException)
- {}
+ { }
protected SessionStatusException(SerializationInfo info, StreamingContext context) : base(info, context)
- {}
+ { }
}
}
diff --git a/Libs/VNLib.Plugins.Sessions.Cache.Client/Exceptions/SessionUpdateFailedException.cs b/Libs/VNLib.Plugins.Sessions.Cache.Client/Exceptions/SessionUpdateFailedException.cs
index 1b842b7..f424013 100644
--- a/Libs/VNLib.Plugins.Sessions.Cache.Client/Exceptions/SessionUpdateFailedException.cs
+++ b/Libs/VNLib.Plugins.Sessions.Cache.Client/Exceptions/SessionUpdateFailedException.cs
@@ -1,17 +1,17 @@
using System;
using System.Runtime.Serialization;
-namespace VNLib.Plugins.Sessions.Cache.Client
+namespace VNLib.Plugins.Sessions.Cache.Client.Exceptions
{
public class SessionUpdateFailedException : SessionStatusException
{
public SessionUpdateFailedException()
- {}
+ { }
public SessionUpdateFailedException(string message) : base(message)
- {}
+ { }
public SessionUpdateFailedException(string message, Exception innerException) : base(message, innerException)
- {}
+ { }
protected SessionUpdateFailedException(SerializationInfo info, StreamingContext context) : base(info, context)
- {}
+ { }
}
}
diff --git a/Libs/VNLib.Plugins.Sessions.Cache.Client/SessionCacheClient.cs b/Libs/VNLib.Plugins.Sessions.Cache.Client/SessionCacheClient.cs
index de0e370..198de53 100644
--- a/Libs/VNLib.Plugins.Sessions.Cache.Client/SessionCacheClient.cs
+++ b/Libs/VNLib.Plugins.Sessions.Cache.Client/SessionCacheClient.cs
@@ -4,9 +4,9 @@ using System.Threading.Tasks;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
+using VNLib.Net.Http;
using VNLib.Utils;
using VNLib.Utils.Memory.Caching;
-using VNLib.Net.Http;
using VNLib.Net.Messaging.FBM.Client;
using VNLib.Plugins.Essentials.Sessions;
@@ -14,7 +14,7 @@ using VNLib.Plugins.Essentials.Sessions;
namespace VNLib.Plugins.Sessions.Cache.Client
{
-
+
/// <summary>
/// A client that allows access to sessions located on external servers
/// </summary>
diff --git a/Libs/VNLib.Plugins.Sessions.Cache.Client/VNLib.Plugins.Sessions.Cache.Client.csproj b/Libs/VNLib.Plugins.Sessions.Cache.Client/VNLib.Plugins.Sessions.Cache.Client.csproj
index 52404be..4b4cd89 100644
--- a/Libs/VNLib.Plugins.Sessions.Cache.Client/VNLib.Plugins.Sessions.Cache.Client.csproj
+++ b/Libs/VNLib.Plugins.Sessions.Cache.Client/VNLib.Plugins.Sessions.Cache.Client.csproj
@@ -21,7 +21,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
- <PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.3.48" />
+ <PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.4.27" />
<PackageReference Include="RestSharp" Version="108.0.2" />
</ItemGroup>
diff --git a/Plugins/CacheBroker/Endpoints/BrokerRegistrationEndpoint.cs b/Plugins/CacheBroker/Endpoints/BrokerRegistrationEndpoint.cs
index 06ebfc3..14e2ba6 100644
--- a/Plugins/CacheBroker/Endpoints/BrokerRegistrationEndpoint.cs
+++ b/Plugins/CacheBroker/Endpoints/BrokerRegistrationEndpoint.cs
@@ -14,7 +14,7 @@ using System.Text.Json.Serialization;
using RestSharp;
-using VNLib.Net;
+using VNLib.Net.Http;
using VNLib.Utils;
using VNLib.Utils.IO;
using VNLib.Utils.Memory;
@@ -26,7 +26,6 @@ using VNLib.Plugins.Essentials.Endpoints;
using VNLib.Plugins.Essentials.Extensions;
using VNLib.Plugins.Extensions.Loading;
using VNLib.Plugins.Extensions.Loading.Events;
-using VNLib.Plugins.Extensions.Loading.Configuration;
using VNLib.Net.Rest.Client;
#nullable enable
@@ -122,13 +121,13 @@ namespace VNLib.Plugins.Cache.Broker.Endpoints
protected override async ValueTask<VfReturnType> PostAsync(HttpEntity entity)
{
//Parse jwt
- using JsonWebToken? jwt = await entity.ParseFileAsAsync(ParseJwtAsync);
+ using JsonWebToken jwt = await entity.ParseFileAsAsync(ParseJwtAsync) ?? throw new Exception("Invalid JWT");
//Verify with the client's pub key
using (ECDsa alg = ECDsa.Create(DefaultCurve))
{
alg.ImportSubjectPublicKeyInfo(ClientPubKey.Result, out _);
//Verify with client public key
- if (!jwt.Verify(alg, SignatureHashAlg))
+ if (!jwt.Verify(alg, in SignatureHashAlg))
{
entity.CloseResponse(HttpStatusCode.Unauthorized);
return VfReturnType.VirtualSkip;
@@ -304,7 +303,7 @@ namespace VNLib.Plugins.Cache.Broker.Endpoints
* Schedule heartbeat interval
*/
[ConfigurableAsyncInterval("heartbeat_sec", IntervalResultionType.Seconds)]
- public async Task OnIntervalAsync(BrokerRegistrationEndpoint bep, CancellationToken pluginExit)
+ public async Task OnIntervalAsync(ILogProvider log, CancellationToken pluginExit)
{
ActiveServer[] servers;
//Get the current list of active servers
@@ -312,11 +311,11 @@ namespace VNLib.Plugins.Cache.Broker.Endpoints
{
servers = ActiveServers.Values.ToArray();
}
- List<Task> all = new();
+ LinkedList<Task> all = new();
//Run keeplaive request for all active servers
foreach (ActiveServer server in servers)
{
- all.Add(RunHeartbeatAsync(server));
+ all.AddLast(RunHeartbeatAsync(server));
}
//Wait for all to complete
await Task.WhenAll(all);
@@ -356,7 +355,7 @@ namespace VNLib.Plugins.Cache.Broker.Endpoints
keepaliveRequest.AddHeader("Authorization", authMessage);
//Rent client from pool
- using ClientContract client = await ClientPool.GetClientAsync();
+ using ClientContract client = ClientPool.Lease();
//Exec
RestResponse response = await client.Resource.ExecuteAsync(keepaliveRequest);
//If the response was successful, then keep it in the list, if the response fails,
diff --git a/Plugins/SessionCacheServer/Endpoints/ConnectEndpoint.cs b/Plugins/SessionCacheServer/Endpoints/ConnectEndpoint.cs
index 0385601..bb5fcac 100644
--- a/Plugins/SessionCacheServer/Endpoints/ConnectEndpoint.cs
+++ b/Plugins/SessionCacheServer/Endpoints/ConnectEndpoint.cs
@@ -22,7 +22,7 @@ using VNLib.Plugins.Essentials.Endpoints;
using VNLib.Plugins.Essentials.Extensions;
-namespace VNLib.Plugins.Essentials.Sessions.Server
+namespace VNLib.Plugins.Essentials.Sessions.Server.Endpoints
{
class ConnectEndpoint : ResourceEndpointBase
{
@@ -95,8 +95,8 @@ namespace VNLib.Plugins.Essentials.Sessions.Server
}
}
catch (OperationCanceledException)
- {}
- catch(Exception ex)
+ { }
+ catch (Exception ex)
{
Log.Error(ex);
}
@@ -107,7 +107,7 @@ namespace VNLib.Plugins.Essentials.Sessions.Server
public int RecvBufferSize { get; init; }
public int MaxHeaderBufferSize { get; init; }
public int MaxMessageSize { get; init; }
- public int MaxResponseBufferSize { get; init; }
+ public int MaxResponseBufferSize { get; init; }
public AsyncQueue<ChangeEvent>? SyncQueue { get; init; }
}
@@ -207,7 +207,7 @@ namespace VNLib.Plugins.Essentials.Sessions.Server
try
{
WsUserState state = (wss.UserState as WsUserState)!;
-
+
//Init listener args from request
FBMListenerSessionParams args = new()
{
diff --git a/Plugins/SessionCacheServer/SessionCacheServer.csproj b/Plugins/SessionCacheServer/SessionCacheServer.csproj
index 8c45a24..580bac3 100644
--- a/Plugins/SessionCacheServer/SessionCacheServer.csproj
+++ b/Plugins/SessionCacheServer/SessionCacheServer.csproj
@@ -36,7 +36,6 @@
<ProjectReference Include="..\..\..\..\VNLib\Essentials\VNLib.Plugins.Essentials.csproj" />
<ProjectReference Include="..\..\..\DataCaching\VNLib.Data.Caching.Extensions\VNLib.Data.Caching.Extensions.csproj" />
<ProjectReference Include="..\..\..\DataCaching\VNLib.Data.Caching.ObjectCache\VNLib.Data.Caching.ObjectCache.csproj" />
- <ProjectReference Include="..\..\..\Extensions\VNLib.Plugins.Extensions.Loading\VNLib.Plugins.Extensions.Loading.csproj" />
<ProjectReference Include="..\..\..\PluginBase\VNLib.Plugins.PluginBase.csproj" />
<ProjectReference Include="..\CacheBroker\CacheBroker.csproj" />
</ItemGroup>
diff --git a/Plugins/SessionCacheServer/SessionServerEntrypoint.cs b/Plugins/SessionCacheServer/SessionServerEntrypoint.cs
index 45c5da2..4d00c8d 100644
--- a/Plugins/SessionCacheServer/SessionServerEntrypoint.cs
+++ b/Plugins/SessionCacheServer/SessionServerEntrypoint.cs
@@ -25,10 +25,8 @@ using VNLib.Net.Messaging.FBM.Client;
using VNLib.Plugins.Cache.Broker.Endpoints;
using VNLib.Plugins.Extensions.Loading;
using VNLib.Plugins.Extensions.Loading.Routing;
-using VNLib.Plugins.Extensions.Loading.Configuration;
using VNLib.Plugins.Essentials.Sessions.Server.Endpoints;
-
namespace VNLib.Plugins.Essentials.Sessions.Server
{
public sealed class SessionServerEntrypoint : PluginBase
diff --git a/Plugins/SessionProvider/SessionClientEntryPoint.cs b/Plugins/SessionProvider/SessionClientEntryPoint.cs
index 07be1ef..ed62d4c 100644
--- a/Plugins/SessionProvider/SessionClientEntryPoint.cs
+++ b/Plugins/SessionProvider/SessionClientEntryPoint.cs
@@ -8,6 +8,7 @@ using System.Collections.Generic;
using VNLib.Net.Http;
using VNLib.Utils.Logging;
using VNLib.Plugins.Extensions.Loading;
+using VNLib.Plugins.Essentials.Sessions.Runtime;
namespace VNLib.Plugins.Essentials.Sessions
{