feat 网关鉴权
This commit is contained in:
@@ -5,9 +5,10 @@ import "ss_common.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
service User {
|
||||
rpc Login(LoginReq) returns (LoginResp) {
|
||||
rpc Login(LoginReq) returns (LoginResp) {}
|
||||
rpc GetUserInfo(GetUserInfoReq) returns (GetUserInfoResp) {
|
||||
option (google.api.http) = {
|
||||
post: "/user/login"
|
||||
post: "/user/info"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
@@ -19,5 +20,15 @@ message LoginReq {
|
||||
}
|
||||
|
||||
message LoginResp {
|
||||
int32 UID = 1 [json_name = "uid"]; // 用户ID
|
||||
int64 USN = 1 [json_name = "usn"]; // 用户ID
|
||||
string Name = 2 [json_name = "name"]; // 用户名
|
||||
}
|
||||
|
||||
message GetUserInfoReq {
|
||||
int64 USN = 1 [json_name = "usn"];
|
||||
}
|
||||
|
||||
message GetUserInfoResp {
|
||||
int64 USN = 1 [json_name = "usn"];
|
||||
string Name = 2 [json_name = "name"];
|
||||
}
|
||||
Reference in New Issue
Block a user