授权接口改为 anonymous 权限

This commit is contained in:
sky
2025-09-07 17:10:44 +08:00
parent 00bac77395
commit 53c602237b
5 changed files with 11 additions and 11 deletions

View File

@@ -5,5 +5,6 @@ option go_package = "git.shenxianhe.cn/shenxianhe/sdk/anonymous/v1;anonymousv1";
import "anonymous/v1/user.proto"; import "anonymous/v1/user.proto";
service AnonymousService { service AnonymousService {
rpc Auth(AuthRequest) returns (AuthResponse);
rpc SendCredential(SendCredentialRequest) returns (SendCredentialResponse); rpc SendCredential(SendCredentialRequest) returns (SendCredentialResponse);
} }

View File

@@ -4,6 +4,15 @@ option go_package = "git.shenxianhe.cn/shenxianhe/sdk/anonymous/v1;anonymousv1";
import "enums/v1/user.proto"; import "enums/v1/user.proto";
message AuthRequest {
enums.v1.AuthenticationType auth_type = 1; // 认证类型
string auth_id = 2; // 认证ID根据auth_type存储不同的账号信息
string credential = 3; // 凭证,可以是验证码或密码
string invitation_code = 4; // 邀请码
}
message AuthResponse { string token = 1; }
message SendCredentialRequest { message SendCredentialRequest {
enums.v1.AuthenticationType auth_type = 1; // 认证类型 enums.v1.AuthenticationType auth_type = 1; // 认证类型
string auth_id = 2; // 认证ID根据auth_type存储不同的账号信息 string auth_id = 2; // 认证ID根据auth_type存储不同的账号信息

View File

@@ -5,7 +5,6 @@ option go_package = "git.shenxianhe.cn/shenxianhe/sdk/user/v1;userv1";
import "user/v1/user.proto"; import "user/v1/user.proto";
service UserService { service UserService {
rpc Auth(AuthRequest) returns (AuthResponse);
rpc SetPassword(SetPasswordRequest) returns (SetPasswordResponse); rpc SetPassword(SetPasswordRequest) returns (SetPasswordResponse);
rpc SetName(SetNameRequest) returns (SetNameResponse); rpc SetName(SetNameRequest) returns (SetNameResponse);
rpc GetAvatarUploadURL(GetAvatarUploadURLRequest) rpc GetAvatarUploadURL(GetAvatarUploadURLRequest)

View File

@@ -4,15 +4,6 @@ option go_package = "git.shenxianhe.cn/shenxianhe/sdk/user/v1;userv1";
import "enums/v1/user.proto"; import "enums/v1/user.proto";
message AuthRequest {
enums.v1.AuthenticationType auth_type = 1; // 认证类型
string auth_id = 2; // 认证ID根据auth_type存储不同的账号信息
string credential = 3; // 凭证,可以是验证码或密码
string invitation_code = 4; // 邀请码
}
message AuthResponse { string token = 1; }
message SetPasswordRequest { message SetPasswordRequest {
enums.v1.AuthenticationType auth_type = 1; // 认证类型 enums.v1.AuthenticationType auth_type = 1; // 认证类型
string auth_id = 2; // 认证ID根据auth_type存储不同的账号信息 string auth_id = 2; // 认证ID根据auth_type存储不同的账号信息

View File

@@ -1 +1 @@
1.7.0 1.8.0