From 76ea7c9f7295f1507bc87154b36cc0f2ea22036e Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 28 Apr 2021 17:16:45 +0800 Subject: ... --- BackEnd/Timeline/Services/Token/IUserTokenManager.cs | 4 ++-- BackEnd/Timeline/Services/Token/UserTokenManager.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'BackEnd/Timeline/Services/Token') diff --git a/BackEnd/Timeline/Services/Token/IUserTokenManager.cs b/BackEnd/Timeline/Services/Token/IUserTokenManager.cs index c6eaa5b7..bdc1add3 100644 --- a/BackEnd/Timeline/Services/Token/IUserTokenManager.cs +++ b/BackEnd/Timeline/Services/Token/IUserTokenManager.cs @@ -18,7 +18,7 @@ namespace Timeline.Services.Token /// Thrown when is of bad format. /// Thrown when the user with does not exist. /// Thrown when is wrong. - public Task CreateToken(string username, string password, DateTime? expireAt = null); + public Task CreateTokenAsync(string username, string password, DateTime? expireAt = null); /// /// Verify a token and get the saved user info. This also check the database for existence of the user. @@ -30,6 +30,6 @@ namespace Timeline.Services.Token /// Thrown when the token is of bad version. /// Thrown when the token is of bad format. /// Thrown when the user specified by the token does not exist. Usually the user had been deleted after the token was issued. - public Task VerifyToken(string token); + public Task VerifyTokenAsync(string token); } } diff --git a/BackEnd/Timeline/Services/Token/UserTokenManager.cs b/BackEnd/Timeline/Services/Token/UserTokenManager.cs index 1d5348a5..5aa85a5e 100644 --- a/BackEnd/Timeline/Services/Token/UserTokenManager.cs +++ b/BackEnd/Timeline/Services/Token/UserTokenManager.cs @@ -26,7 +26,7 @@ namespace Timeline.Services.Token _clock = clock; } - public async Task CreateToken(string username, string password, DateTime? expireAt = null) + public async Task CreateTokenAsync(string username, string password, DateTime? expireAt = null) { expireAt = expireAt?.MyToUtc(); @@ -51,7 +51,7 @@ namespace Timeline.Services.Token } - public async Task VerifyToken(string token) + public async Task VerifyTokenAsync(string token) { if (token == null) throw new ArgumentNullException(nameof(token)); -- cgit v1.2.3