diff options
author | crupest <crupest@outlook.com> | 2022-03-23 21:30:14 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-03-23 21:30:31 +0800 |
commit | da9139b7bab95f6e5ba5f4bb2d99011c2d6db03a (patch) | |
tree | 051fd4ca4bc511db7e04b019a33fddaab2d0cc6b /BackEnd/Timeline/Services/Token/IUserTokenHandler.cs | |
parent | 3d6c9fd916e18c99b3a5497b8313672680571b5e (diff) | |
download | timeline-da9139b7bab95f6e5ba5f4bb2d99011c2d6db03a.tar.gz timeline-da9139b7bab95f6e5ba5f4bb2d99011c2d6db03a.tar.bz2 timeline-da9139b7bab95f6e5ba5f4bb2d99011c2d6db03a.zip |
…
Diffstat (limited to 'BackEnd/Timeline/Services/Token/IUserTokenHandler.cs')
-rw-r--r-- | BackEnd/Timeline/Services/Token/IUserTokenHandler.cs | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/BackEnd/Timeline/Services/Token/IUserTokenHandler.cs b/BackEnd/Timeline/Services/Token/IUserTokenHandler.cs deleted file mode 100644 index 62e01de5..00000000 --- a/BackEnd/Timeline/Services/Token/IUserTokenHandler.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System;
-using System.Threading.Tasks;
-
-namespace Timeline.Services.Token
-{
- public interface IUserTokenHandler
- {
- /// <summary>
- /// Create a token for a given token info.
- /// </summary>
- /// <param name="tokenInfo">The info to generate token.</param>
- /// <returns>Return the generated token.</returns>
- /// <exception cref="ArgumentNullException">Thrown when <paramref name="tokenInfo"/> is null.</exception>
- Task<string> GenerateTokenAsync(UserTokenInfo tokenInfo);
-
- /// <summary>
- /// Verify a token and get the saved info. Do not validate lifetime!!!
- /// </summary>
- /// <param name="token">The token to verify.</param>
- /// <returns>The saved info in token.</returns>
- /// <exception cref="ArgumentNullException">Thrown when <paramref name="token"/> is null.</exception>
- /// <exception cref="UserTokenBadFormatException">Thrown when the token is of bad format.</exception>
- /// <remarks>
- /// If this method throw <see cref="UserTokenBadFormatException"/>, it usually means the token is not created by this service.
- /// Do not check expire time in this method, only check whether it is present.
- /// </remarks>
- Task<UserTokenInfo> ValidateTokenAsync(string token);
- }
-}
|