aboutsummaryrefslogtreecommitdiff
path: root/libs/VNLib.Plugins.Sessions.OAuth/src
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-01-14 16:32:38 -0500
committerLibravatar vnugent <public@vaughnnugent.com>2023-01-14 16:32:38 -0500
commit3b662cfdbf361d044a3e5d8ff82c62a87cede46a (patch)
treef1a1dc075e5f030bf76d0aecb80c884442d7f8bd /libs/VNLib.Plugins.Sessions.OAuth/src
parent4e6bdfd5a0464e3de222d2c4744aa6efceb39ef0 (diff)
Remove 'upgrade' flag from token/login hash
Diffstat (limited to 'libs/VNLib.Plugins.Sessions.OAuth/src')
-rw-r--r--libs/VNLib.Plugins.Sessions.OAuth/src/OAuth2SessionIdProvider.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/VNLib.Plugins.Sessions.OAuth/src/OAuth2SessionIdProvider.cs b/libs/VNLib.Plugins.Sessions.OAuth/src/OAuth2SessionIdProvider.cs
index 5a30ec4..5e8ad6b 100644
--- a/libs/VNLib.Plugins.Sessions.OAuth/src/OAuth2SessionIdProvider.cs
+++ b/libs/VNLib.Plugins.Sessions.OAuth/src/OAuth2SessionIdProvider.cs
@@ -83,7 +83,7 @@ namespace VNLib.Plugins.Sessions.OAuth
private string ComputeSessionIdFromToken(string token)
{
//Buffer to copy data to
- using UnsafeMemoryHandle<char> buffer = Memory.UnsafeAlloc<char>(_bufferSize, true);
+ using UnsafeMemoryHandle<char> buffer = MemoryUtil.UnsafeAlloc<char>(_bufferSize, true);
//Writer to accumulate data
ForwardOnlyWriter<char> writer = new(buffer.Span);
@@ -100,7 +100,7 @@ namespace VNLib.Plugins.Sessions.OAuth
TokenAndSessionIdResult IOauthSessionIdFactory.GenerateTokensAndId()
{
//Alloc buffer for random data
- using UnsafeMemoryHandle<byte> mem = Memory.UnsafeAlloc<byte>(_tokenSize, true);
+ using UnsafeMemoryHandle<byte> mem = MemoryUtil.UnsafeAlloc<byte>(_tokenSize, true);
//Generate token from random cng bytes
RandomHash.GetRandomBytes(mem);
@@ -112,7 +112,7 @@ namespace VNLib.Plugins.Sessions.OAuth
string sessionId = ComputeSessionIdFromToken(token);
//Clear buffer
- Memory.InitializeBlock(mem.Span);
+ MemoryUtil.InitializeBlock(mem.Span);
//Return sessid result
return new(sessionId, token, null);