用户实现OTP登录

This commit is contained in:
刘祥超
2022-07-24 16:45:07 +08:00
parent a4b68cd21c
commit 41ea2d0dda
7 changed files with 3406 additions and 3172 deletions

View File

@@ -5,6 +5,7 @@ package pb;
import "models/model_node_cluster.proto";
import "models/model_user_feature.proto";
import "models/model_login.proto";
message User {
int64 id = 1;
@@ -24,6 +25,8 @@ message User {
bool isIndividualIdentified = 17;
bool isEnterpriseIdentified = 18;
Login otpLogin = 19; // OTP认证
NodeCluster nodeCluster = 10;
repeated UserFeature features = 11;
}

View File

@@ -18,6 +18,7 @@ service LoginService {
// 查找认证
message FindEnabledLoginRequest {
int64 adminId = 1;
int64 userId = 3;
string type = 2;
}

View File

@@ -63,6 +63,9 @@ service UserService {
// 组合全局的看板数据
rpc composeUserGlobalBoard (ComposeUserGlobalBoardRequest) returns (ComposeUserGlobalBoardResponse);
// 根据用户名检查是否需要输入OTP
rpc checkUserOTPWithUsername (CheckUserOTPWithUsernameRequest) returns (CheckUserOTPWithUsernameResponse);
}
// 创建用户
@@ -271,4 +274,14 @@ message ComposeUserGlobalBoardResponse {
int64 countRequests = 3;
int64 bytes = 4;
}
}
// 根据用户名检查是否需要输入OTP
message CheckUserOTPWithUsernameRequest {
string username = 1;
}
message CheckUserOTPWithUsernameResponse {
bool requireOTP = 1;
}