aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Services/Token/UserTokenManager.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-03-09 21:21:15 +0800
committercrupest <crupest@outlook.com>2022-03-09 21:21:15 +0800
commit3d6c9fd916e18c99b3a5497b8313672680571b5e (patch)
treee67ae49937dcdb7f5c874a2ebfdca4fde72a059f /BackEnd/Timeline/Services/Token/UserTokenManager.cs
parent3cd0140ff4425b37b6e8dd8e8f16a54b1338c352 (diff)
downloadtimeline-3d6c9fd916e18c99b3a5497b8313672680571b5e.tar.gz
timeline-3d6c9fd916e18c99b3a5497b8313672680571b5e.tar.bz2
timeline-3d6c9fd916e18c99b3a5497b8313672680571b5e.zip
Add user token entity in preparation for refactor of tokens.
Diffstat (limited to 'BackEnd/Timeline/Services/Token/UserTokenManager.cs')
-rw-r--r--BackEnd/Timeline/Services/Token/UserTokenManager.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/BackEnd/Timeline/Services/Token/UserTokenManager.cs b/BackEnd/Timeline/Services/Token/UserTokenManager.cs
index 7ccdfe0a..bdb229f0 100644
--- a/BackEnd/Timeline/Services/Token/UserTokenManager.cs
+++ b/BackEnd/Timeline/Services/Token/UserTokenManager.cs
@@ -38,7 +38,7 @@ namespace Timeline.Services.Token
var userId = await _userService.VerifyCredential(username, password);
var user = await _userService.GetUserAsync(userId);
- var token = _userTokenService.GenerateToken(new UserTokenInfo
+ var token = await _userTokenService.GenerateTokenAsync(new UserTokenInfo
{
Id = user.Id,
Version = user.Version,
@@ -60,7 +60,7 @@ namespace Timeline.Services.Token
try
{
- tokenInfo = _userTokenService.VerifyToken(token);
+ tokenInfo = await _userTokenService.ValidateTokenAsync(token);
}
catch (UserTokenBadFormatException e)
{