diff options
author | crupest <crupest@outlook.com> | 2020-08-11 18:22:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-11 18:22:43 +0800 |
commit | 2de24db92e892c6e3f18d9f5f05e8f3b7aba5c9e (patch) | |
tree | 56115decfb5e7e7e96c1d84161d7e7c920ce8cff /Timeline/Services/UserTokenManager.cs | |
parent | 06e79c99bbc810f16058b35f1c88c23148bf8e57 (diff) | |
parent | 12b5ecddb47e50c9f4597553a795c68b09acaddb (diff) | |
download | timeline-2de24db92e892c6e3f18d9f5f05e8f3b7aba5c9e.tar.gz timeline-2de24db92e892c6e3f18d9f5f05e8f3b7aba5c9e.tar.bz2 timeline-2de24db92e892c6e3f18d9f5f05e8f3b7aba5c9e.zip |
Merge pull request #146 from crupest/fix-141
Fix #141 .
Diffstat (limited to 'Timeline/Services/UserTokenManager.cs')
-rw-r--r-- | Timeline/Services/UserTokenManager.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Timeline/Services/UserTokenManager.cs b/Timeline/Services/UserTokenManager.cs index a016ff96..813dae67 100644 --- a/Timeline/Services/UserTokenManager.cs +++ b/Timeline/Services/UserTokenManager.cs @@ -1,6 +1,7 @@ using Microsoft.Extensions.Logging;
using System;
using System.Threading.Tasks;
+using Timeline.Helpers;
using Timeline.Models;
using Timeline.Services.Exceptions;
@@ -57,6 +58,8 @@ namespace Timeline.Services public async Task<UserTokenCreateResult> CreateToken(string username, string password, DateTime? expireAt = null)
{
+ expireAt = expireAt?.MyToUtc();
+
if (username == null)
throw new ArgumentNullException(nameof(username));
if (password == null)
|