diff options
Diffstat (limited to 'BackEnd/Timeline/Services/Token/UserTokenHandler.cs')
-rw-r--r-- | BackEnd/Timeline/Services/Token/UserTokenHandler.cs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/BackEnd/Timeline/Services/Token/UserTokenHandler.cs b/BackEnd/Timeline/Services/Token/UserTokenHandler.cs index 2eaea57e..7b57a06c 100644 --- a/BackEnd/Timeline/Services/Token/UserTokenHandler.cs +++ b/BackEnd/Timeline/Services/Token/UserTokenHandler.cs @@ -10,36 +10,6 @@ using Timeline.Entities; namespace Timeline.Services.Token
{
- public class UserTokenInfo
- {
- public long Id { get; set; }
- public long Version { get; set; }
- public DateTime ExpireAt { get; set; }
- }
-
- 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>
- string GenerateToken(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.
- /// </remarks>
- UserTokenInfo VerifyToken(string token);
- }
-
public class JwtUserTokenHandler : IUserTokenHandler
{
private const string VersionClaimType = "timeline_version";
|