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 | 476a6141b71d3def4a777ce934fec0d0bca8cd28 (patch) | |
tree | 12eda3d48fefb733b11e675724481d75dc65d319 /docker/crupest-api/CrupestApi/CrupestApi.Secrets/ISecretsService.cs | |
parent | cdfb5781c8028a08051e0dbe6b7a2e39013e0f72 (diff) | |
download | crupest-476a6141b71d3def4a777ce934fec0d0bca8cd28.tar.gz crupest-476a6141b71d3def4a777ce934fec0d0bca8cd28.tar.bz2 crupest-476a6141b71d3def4a777ce934fec0d0bca8cd28.zip |
Develop secret api. v4
Diffstat (limited to 'docker/crupest-api/CrupestApi/CrupestApi.Secrets/ISecretsService.cs')
-rw-r--r-- | docker/crupest-api/CrupestApi/CrupestApi.Secrets/ISecretsService.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docker/crupest-api/CrupestApi/CrupestApi.Secrets/ISecretsService.cs b/docker/crupest-api/CrupestApi/CrupestApi.Secrets/ISecretsService.cs index c42fbdc..b5de436 100644 --- a/docker/crupest-api/CrupestApi/CrupestApi.Secrets/ISecretsService.cs +++ b/docker/crupest-api/CrupestApi/CrupestApi.Secrets/ISecretsService.cs @@ -2,15 +2,17 @@ namespace CrupestApi.Secrets; public interface ISecretsService { + Task<SecretInfo?> GetSecretAsync(string secret); + Task<List<SecretInfo>> GetSecretListAsync(bool includeExpired = false, bool includeRevoked = false); Task<List<SecretInfo>> GetSecretListByKeyAsync(string key, bool includeExpired = false, bool includeRevoked = false); - Task<bool> VerifySecretAsync(string key, string secret); + Task VerifySecretAsync(string? key, string? secret); // Check if "secret" query param exists and is only one. Then check the secret is valid for given key. // If check fails, will throw a VerifySecretException with proper message that can be send to client. - Task VerifySecretForHttpRequestAsync(HttpRequest request, string key, string queryKey = "secret"); + Task VerifySecretForHttpRequestAsync(HttpRequest request, string? key = null, string queryKey = "secret"); Task<SecretInfo> CreateSecretAsync(string key, string description, DateTime? expireTime = null); |