Files
EdgeCommon/pkg/rpc/protos/service_user_verify_code.proto
2022-12-10 15:54:39 +08:00

41 lines
1.1 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
option go_package = "./pb";
package pb;
// 用户验证码服务
service UserVerifyCodeService {
// 发送重置密码验证码
rpc sendUserVerifyCode(SendUserVerifyCodeRequest) returns (SendUserVerifyCodeResponse);
// 校验验证码
rpc validateUserVerifyCode(ValidateUserVerifyCodeRequest) returns (ValidateUserVerifyCodeResponse);
}
// 发送重置密码验证码
message SendUserVerifyCodeRequest {
string type = 1; // 类型重置密码resetPassword
string email = 2; // 已验证邮箱地址
string mobile = 3; // 已验证手机号
}
message SendUserVerifyCodeResponse {
int32 codeLength = 1; // 验证码长度
}
// 校验验证码
message ValidateUserVerifyCodeRequest {
string type = 1; // 类型重置密码resetPassword
string email = 2; // 已验证邮箱地址
string mobile = 3; // 已验证手机号
string code = 4; // 验证码
// 找回密码
string newPassword = 10; // 新密码
}
message ValidateUserVerifyCodeResponse {
bool isOk = 1; // 是否成功
string errorCode = 2; // 错误代号
string errorMessage = 3; // 错误消息
}