From 5583877eac9150b0768ca00f8978bf2a13c1b074 Mon Sep 17 00:00:00 2001 From: Vilsol Date: Tue, 21 Jan 2025 22:51:44 +0200 Subject: [PATCH] fix: add mfa status endpoint for users --- packages/protos/io/restorecommerce/user.proto | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/protos/io/restorecommerce/user.proto b/packages/protos/io/restorecommerce/user.proto index bae13cf7..028d958e 100644 --- a/packages/protos/io/restorecommerce/user.proto +++ b/packages/protos/io/restorecommerce/user.proto @@ -56,6 +56,7 @@ service UserService { rpc ExchangeTOTP (ExchangeTOTPRequest) returns (UserResponse); rpc CreateBackupTOTPCodes (CreateBackupTOTPCodesRequest) returns (CreateBackupTOTPCodesResponse); rpc ResetTOTP (ResetTOTPRequest) returns (io.restorecommerce.status.OperationStatusObj); + rpc MfaStatus (MfaStatusRequest) returns (MfaStatusResponse); rpc GetUnauthenticatedSubjectTokenForTenant(TenantRequest) returns (TenantResponse); } @@ -111,6 +112,17 @@ message ResetTOTPRequest { optional io.restorecommerce.auth.Subject subject = 2; } +message MfaStatusRequest { + optional string identifier = 1; + optional io.restorecommerce.auth.Subject subject = 2; +} + +message MfaStatusResponse { + optional bool has_totp = 1; + optional bool has_backup_codes = 2; + optional io.restorecommerce.status.OperationStatus operation_status = 3; +} + message TenantRequest { optional string domain = 1; }