From da5db46d01b13ec3ada92fc132bd8d7630f3cf1c Mon Sep 17 00:00:00 2001 From: Shane Melton Date: Tue, 7 Mar 2023 17:07:22 -0800 Subject: [PATCH] [AC-1070] Introduce VerifyMasterPasswordResponse --- src/Core/Abstractions/IApiService.cs | 2 +- src/Core/Models/Response/VerifyMasterPasswordResponse.cs | 9 +++++++++ src/Core/Services/ApiService.cs | 6 +++--- 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 src/Core/Models/Response/VerifyMasterPasswordResponse.cs diff --git a/src/Core/Abstractions/IApiService.cs b/src/Core/Abstractions/IApiService.cs index d85739884..19930ce55 100644 --- a/src/Core/Abstractions/IApiService.cs +++ b/src/Core/Abstractions/IApiService.cs @@ -27,7 +27,7 @@ namespace Bit.Core.Abstractions Task GetProfileAsync(); Task GetSyncAsync(); Task PostAccountKeysAsync(KeysRequest request); - Task PostAccountVerifyPasswordAsync(PasswordVerificationRequest request); + Task PostAccountVerifyPasswordAsync(PasswordVerificationRequest request); Task PostAccountRequestOTP(); Task PostAccountVerifyOTPAsync(VerifyOTPRequest request); Task PostCipherAsync(CipherRequest request); diff --git a/src/Core/Models/Response/VerifyMasterPasswordResponse.cs b/src/Core/Models/Response/VerifyMasterPasswordResponse.cs new file mode 100644 index 000000000..1a02bc940 --- /dev/null +++ b/src/Core/Models/Response/VerifyMasterPasswordResponse.cs @@ -0,0 +1,9 @@ +using Bit.Core.Models.Domain; + +namespace Bit.Core.Models.Response +{ + public class VerifyMasterPasswordResponse + { + public MasterPasswordPolicyOptions MasterPasswordPolicy { get; set; } + } +} diff --git a/src/Core/Services/ApiService.cs b/src/Core/Services/ApiService.cs index 4f46ed649..b0a7bbcca 100644 --- a/src/Core/Services/ApiService.cs +++ b/src/Core/Services/ApiService.cs @@ -176,10 +176,10 @@ namespace Bit.Core.Services return SendAsync(HttpMethod.Post, "/accounts/keys", request, true, false); } - public Task PostAccountVerifyPasswordAsync(PasswordVerificationRequest request) + public Task PostAccountVerifyPasswordAsync(PasswordVerificationRequest request) { - return SendAsync(HttpMethod.Post, "/accounts/verify-password", request, - true, false); + return SendAsync(HttpMethod.Post, "/accounts/verify-password", request, + true, true); } public Task PostAccountRequestOTP()