diff --git a/proto/auth/v1/auth_service.proto b/proto/auth/v1/auth_service.proto index b3a5af5..365ee28 100644 --- a/proto/auth/v1/auth_service.proto +++ b/proto/auth/v1/auth_service.proto @@ -57,34 +57,6 @@ service AuthService { body: "*" }; } - - // SMS - // 启用SMS - rpc EnableSMS(EnableSMSRequest) returns (EnableSMSResponse) { - option (google.api.http) = { - post: "/gapi/auth/v1/mfa/sms/enable - body: "*" - }; - } - // 激活SMS - rpc ActivateSMS(ActivateSMSRequest) returns (ActivateSMSResponse) { - option (google.api.http) = { - post: "/gapi/auth/v1/mfa/sms/activate", - body: "*" - }; - } - rpc DisableSMS(DisableSMSRequest) returns (DisableSMSResponse) { - option (google.api.http) = { - post: "/gapi/auth/v1/mfa/sms/disable", - body: "*" - }; - } - rpc CheckSMS(CheckSMSRequest) returns (CheckSMSResponse) { - option (google.api.http) = { - post: "/gapi/auth/v1/mfa/sms/check", - body: "*" - }; - } } message RegisterRequest { @@ -120,19 +92,20 @@ message RefreshTokenResponse { message GetMFAStatusRequest {} +// 为后期拓展可能做保留 message GetMFAStatusResponse { TOTPStatus totp_status = 1; - SMSStatus sms_status = 2; +// SMSStatus sms_status = 2; } message TOTPStatus { bool is_active = 1; } -message SMSStatus { // SMS状态 - bool is_active = 1; - string phone_number = 2; -} +//message SMSStatus { // SMS状态 +// bool is_active = 1; +// string phone_number = 2; +//} // TOTP message EnableTOTPRequest { @@ -141,7 +114,7 @@ message EnableTOTPRequest { } message EnableTOTPResponse { string qr_code_url = 1; - string manual_entry_key = 2; + string secret_key = 2; repeated string recovery_code = 3; } @@ -153,29 +126,4 @@ message DisableTOTPResponse {} message CheckTOTPRequest { string totp_code = 1; } -message CheckTOTPResponse {} - -// SMS -message EnableSMSRequest { - string email = 1; - string verify_code = 2; - string phone = 3; -} -message EnableSMSResponse {} - -message ActivateSMSRequest { - string phone = 1; - string sms_code = 2; -} -message ActivateSMSResponse {} - -message DisableSMSRequest { - string phone = 1; - string sms_code = 2; -} -message DisableSMSResponse {} - -message CheckSMSRequest { - string sms_code = 1; -} -message CheckSMSResponse {} \ No newline at end of file +message CheckTOTPResponse {} \ No newline at end of file