aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Libs/VNLib.Plugins.Essentials.Oauth/src/Tokens/TokenStore.cs10
-rw-r--r--Plugins/OAuth2ClientApplications/src/OAuth2ClientApplications.csproj2
2 files changed, 7 insertions, 5 deletions
diff --git a/Libs/VNLib.Plugins.Essentials.Oauth/src/Tokens/TokenStore.cs b/Libs/VNLib.Plugins.Essentials.Oauth/src/Tokens/TokenStore.cs
index 10beefc..f160a79 100644
--- a/Libs/VNLib.Plugins.Essentials.Oauth/src/Tokens/TokenStore.cs
+++ b/Libs/VNLib.Plugins.Essentials.Oauth/src/Tokens/TokenStore.cs
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2022 Vaughn Nugent
+* Copyright (c) 2023 Vaughn Nugent
*
* Library: VNLib
* Package: VNLib.Plugins.Essentials.Oauth
@@ -23,10 +23,10 @@
*/
using System;
-using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
+using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
@@ -81,14 +81,16 @@ namespace VNLib.Plugins.Essentials.Oauth.Tokens
return count;
}
+ DateTime now = DateTime.UtcNow;
+
//Try to add the new token
ActiveToken newToken = new()
{
ApplicationId = appId,
Id = token,
RefreshToken = refreshToken,
- Created = DateTime.UtcNow,
- LastModified = DateTime.UtcNow
+ Created = now,
+ LastModified = now,
};
//Add token to store
ctx.OAuthTokens.Add(newToken);
diff --git a/Plugins/OAuth2ClientApplications/src/OAuth2ClientApplications.csproj b/Plugins/OAuth2ClientApplications/src/OAuth2ClientApplications.csproj
index c7fd89a..cf7d461 100644
--- a/Plugins/OAuth2ClientApplications/src/OAuth2ClientApplications.csproj
+++ b/Plugins/OAuth2ClientApplications/src/OAuth2ClientApplications.csproj
@@ -42,7 +42,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
- <PackageReference Include="FluentValidation" Version="11.5.1" />
+ <PackageReference Include="FluentValidation" Version="11.5.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\Extensions\lib\VNLib.Plugins.Extensions.Loading.Sql\src\VNLib.Plugins.Extensions.Loading.Sql.csproj" />