aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Services/Token/IUserTokenHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'BackEnd/Timeline/Services/Token/IUserTokenHandler.cs')
-rw-r--r--BackEnd/Timeline/Services/Token/IUserTokenHandler.cs29
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);
- }
-}