diff options
author | 杨宇千 <crupest@outlook.com> | 2019-10-19 21:37:15 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-10-19 21:37:15 +0800 |
commit | 7bcf891d9d68ac0f12570b94938347ab8eec3247 (patch) | |
tree | e6168234660307247111ee369a0b2123823614eb /Timeline/Services/JwtService.cs | |
parent | a268999b8c975588c01b345829edfc0099af6f93 (diff) | |
download | timeline-7bcf891d9d68ac0f12570b94938347ab8eec3247.tar.gz timeline-7bcf891d9d68ac0f12570b94938347ab8eec3247.tar.bz2 timeline-7bcf891d9d68ac0f12570b94938347ab8eec3247.zip |
...
Diffstat (limited to 'Timeline/Services/JwtService.cs')
-rw-r--r-- | Timeline/Services/JwtService.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Timeline/Services/JwtService.cs b/Timeline/Services/JwtService.cs index 350c5e80..90d0c217 100644 --- a/Timeline/Services/JwtService.cs +++ b/Timeline/Services/JwtService.cs @@ -33,6 +33,12 @@ namespace Timeline.Services public const int Expired = -2001;
}
+ private const string message = "Jwt token is bad.";
+
+ public JwtTokenVerifyException() : base(message) { }
+ public JwtTokenVerifyException(string message) : base(message) { }
+ public JwtTokenVerifyException(string message, Exception inner) : base(message, inner) { }
+
public JwtTokenVerifyException(int code) : base(GetErrorMessage(code)) { ErrorCode = code; }
public JwtTokenVerifyException(string message, int code) : base(message) { ErrorCode = code; }
public JwtTokenVerifyException(Exception inner, int code) : base(GetErrorMessage(code), inner) { ErrorCode = code; }
@@ -41,7 +47,7 @@ namespace Timeline.Services System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
- public int ErrorCode { get; private set; }
+ public int ErrorCode { get; set; }
private static string GetErrorMessage(int errorCode)
{
|