diff options
author | crupest <crupest@outlook.com> | 2022-12-04 18:11:06 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-12-20 20:32:52 +0800 |
commit | 5da5ebbad1d84390009038a9231977d7ed7e2d60 (patch) | |
tree | 12eda3d48fefb733b11e675724481d75dc65d319 /docker/crupest-api/CrupestApi/CrupestApi.Secrets/VerifySecretException.cs | |
parent | 92b93d875c3f61312d2221e3b4d15f5a2e8d7a11 (diff) | |
download | crupest-5da5ebbad1d84390009038a9231977d7ed7e2d60.tar.gz crupest-5da5ebbad1d84390009038a9231977d7ed7e2d60.tar.bz2 crupest-5da5ebbad1d84390009038a9231977d7ed7e2d60.zip |
Develop secret api. v4
Diffstat (limited to 'docker/crupest-api/CrupestApi/CrupestApi.Secrets/VerifySecretException.cs')
-rw-r--r-- | docker/crupest-api/CrupestApi/CrupestApi.Secrets/VerifySecretException.cs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/docker/crupest-api/CrupestApi/CrupestApi.Secrets/VerifySecretException.cs b/docker/crupest-api/CrupestApi/CrupestApi.Secrets/VerifySecretException.cs index c9f60a1..795fa3e 100644 --- a/docker/crupest-api/CrupestApi/CrupestApi.Secrets/VerifySecretException.cs +++ b/docker/crupest-api/CrupestApi/CrupestApi.Secrets/VerifySecretException.cs @@ -2,10 +2,19 @@ namespace CrupestApi.Secrets; public class VerifySecretException : Exception { - public VerifySecretException(string requestKey, string message) : base(message) + public VerifySecretException(string? requestKey, string message, ErrorKind kind = ErrorKind.Unauthorized) : base(message) { RequestKey = requestKey; + Kind = kind; } - public string RequestKey { get; set; } -}
\ No newline at end of file + public enum ErrorKind + { + Unauthorized, + Forbidden + } + + public ErrorKind Kind { get; set; } + + public string? RequestKey { get; set; } +} |