diff options
Diffstat (limited to 'Libs/VNLib.Plugins.Essentials.Oauth/src')
-rw-r--r-- | Libs/VNLib.Plugins.Essentials.Oauth/src/Tokens/TokenStore.cs | 10 |
1 files changed, 6 insertions, 4 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); |