aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Controllers/TokenController.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-01-21 01:11:17 +0800
committercrupest <crupest@outlook.com>2020-01-21 01:11:17 +0800
commit4aadb05cd5718c7d16bf432c96e23ae4e7db4783 (patch)
treea45506852659b9d8e2bfe0b9e58a496060f7cd9b /Timeline/Controllers/TokenController.cs
parente6069a6980ec6d2505e19026d4c84a9588f153dc (diff)
downloadtimeline-4aadb05cd5718c7d16bf432c96e23ae4e7db4783.tar.gz
timeline-4aadb05cd5718c7d16bf432c96e23ae4e7db4783.tar.bz2
timeline-4aadb05cd5718c7d16bf432c96e23ae4e7db4783.zip
...
Diffstat (limited to 'Timeline/Controllers/TokenController.cs')
-rw-r--r--Timeline/Controllers/TokenController.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Timeline/Controllers/TokenController.cs b/Timeline/Controllers/TokenController.cs
index 67001e87..851c7606 100644
--- a/Timeline/Controllers/TokenController.cs
+++ b/Timeline/Controllers/TokenController.cs
@@ -94,16 +94,16 @@ namespace Timeline.Controllers
User = result
});
}
- catch (JwtVerifyException e)
+ catch (JwtUserTokenBadFormatException e)
{
- if (e.ErrorCode == JwtVerifyException.ErrorCodes.Expired)
+ if (e.ErrorCode == JwtUserTokenBadFormatException.ErrorCodes.Expired)
{
var innerException = e.InnerException as SecurityTokenExpiredException;
LogFailure(LogVerifyExpire, e, ("Expires", innerException?.Expires),
("Current Time", _clock.GetCurrentTime()));
return BadRequest(ErrorResponse.TokenController.Verify_TimeExpired());
}
- else if (e.ErrorCode == JwtVerifyException.ErrorCodes.OldVersion)
+ else if (e.ErrorCode == JwtUserTokenBadFormatException.ErrorCodes.OldVersion)
{
var innerException = e.InnerException as JwtBadVersionException;
LogFailure(LogVerifyOldVersion, e,