aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Services/UserTokenManager.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-01-07 16:23:20 +0800
committercrupest <crupest@outlook.com>2021-01-07 16:23:20 +0800
commit7594a16e38304739487b053405153379faee6e58 (patch)
treebb99d1a24fffc9c4142219b9c25dc66e3d2b60d2 /BackEnd/Timeline/Services/UserTokenManager.cs
parent97e094c97dc9ed79cf7daa0a93568e1933015bdd (diff)
downloadtimeline-7594a16e38304739487b053405153379faee6e58.tar.gz
timeline-7594a16e38304739487b053405153379faee6e58.tar.bz2
timeline-7594a16e38304739487b053405153379faee6e58.zip
史诗级重构!
Diffstat (limited to 'BackEnd/Timeline/Services/UserTokenManager.cs')
-rw-r--r--BackEnd/Timeline/Services/UserTokenManager.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/BackEnd/Timeline/Services/UserTokenManager.cs b/BackEnd/Timeline/Services/UserTokenManager.cs
index b887b987..4e24c922 100644
--- a/BackEnd/Timeline/Services/UserTokenManager.cs
+++ b/BackEnd/Timeline/Services/UserTokenManager.cs
@@ -1,6 +1,7 @@
using Microsoft.Extensions.Logging;
using System;
using System.Threading.Tasks;
+using Timeline.Entities;
using Timeline.Helpers;
using Timeline.Models;
using Timeline.Services.Exceptions;
@@ -10,7 +11,7 @@ namespace Timeline.Services
public class UserTokenCreateResult
{
public string Token { get; set; } = default!;
- public UserInfo User { get; set; } = default!;
+ public UserEntity User { get; set; } = default!;
}
public interface IUserTokenManager
@@ -38,7 +39,7 @@ namespace Timeline.Services
/// <exception cref="UserTokenBadVersionException">Thrown when the token is of bad version.</exception>
/// <exception cref="UserTokenBadFormatException">Thrown when the token is of bad format.</exception>
/// <exception cref="UserNotExistException">Thrown when the user specified by the token does not exist. Usually the user had been deleted after the token was issued.</exception>
- public Task<UserInfo> VerifyToken(string token);
+ public Task<UserEntity> VerifyToken(string token);
}
public class UserTokenManager : IUserTokenManager
@@ -75,7 +76,7 @@ namespace Timeline.Services
}
- public async Task<UserInfo> VerifyToken(string token)
+ public async Task<UserEntity> VerifyToken(string token)
{
if (token == null)
throw new ArgumentNullException(nameof(token));