wfz 3 anni fa
parent
commit
500e148475

+ 44 - 42
api/user/user.pb.go

@@ -329,7 +329,7 @@ func (x *DebugLoginRequest) GetCode() string {
 	return ""
 }
 
-type LoginRequest struct {
+type AuthorizationRequest struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
@@ -337,8 +337,8 @@ type LoginRequest struct {
 	JsCode string `protobuf:"bytes,1,opt,name=jsCode,proto3" json:"jsCode"`
 }
 
-func (x *LoginRequest) Reset() {
-	*x = LoginRequest{}
+func (x *AuthorizationRequest) Reset() {
+	*x = AuthorizationRequest{}
 	if protoimpl.UnsafeEnabled {
 		mi := &file_user_proto_msgTypes[5]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -346,13 +346,13 @@ func (x *LoginRequest) Reset() {
 	}
 }
 
-func (x *LoginRequest) String() string {
+func (x *AuthorizationRequest) String() string {
 	return protoimpl.X.MessageStringOf(x)
 }
 
-func (*LoginRequest) ProtoMessage() {}
+func (*AuthorizationRequest) ProtoMessage() {}
 
-func (x *LoginRequest) ProtoReflect() protoreflect.Message {
+func (x *AuthorizationRequest) ProtoReflect() protoreflect.Message {
 	mi := &file_user_proto_msgTypes[5]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -364,19 +364,19 @@ func (x *LoginRequest) ProtoReflect() protoreflect.Message {
 	return mi.MessageOf(x)
 }
 
-// Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
-func (*LoginRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use AuthorizationRequest.ProtoReflect.Descriptor instead.
+func (*AuthorizationRequest) Descriptor() ([]byte, []int) {
 	return file_user_proto_rawDescGZIP(), []int{5}
 }
 
-func (x *LoginRequest) GetJsCode() string {
+func (x *AuthorizationRequest) GetJsCode() string {
 	if x != nil {
 		return x.JsCode
 	}
 	return ""
 }
 
-type LoginReply struct {
+type TokenReply struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
@@ -384,8 +384,8 @@ type LoginReply struct {
 	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token"`
 }
 
-func (x *LoginReply) Reset() {
-	*x = LoginReply{}
+func (x *TokenReply) Reset() {
+	*x = TokenReply{}
 	if protoimpl.UnsafeEnabled {
 		mi := &file_user_proto_msgTypes[6]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -393,13 +393,13 @@ func (x *LoginReply) Reset() {
 	}
 }
 
-func (x *LoginReply) String() string {
+func (x *TokenReply) String() string {
 	return protoimpl.X.MessageStringOf(x)
 }
 
-func (*LoginReply) ProtoMessage() {}
+func (*TokenReply) ProtoMessage() {}
 
-func (x *LoginReply) ProtoReflect() protoreflect.Message {
+func (x *TokenReply) ProtoReflect() protoreflect.Message {
 	mi := &file_user_proto_msgTypes[6]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -411,12 +411,12 @@ func (x *LoginReply) ProtoReflect() protoreflect.Message {
 	return mi.MessageOf(x)
 }
 
-// Deprecated: Use LoginReply.ProtoReflect.Descriptor instead.
-func (*LoginReply) Descriptor() ([]byte, []int) {
+// Deprecated: Use TokenReply.ProtoReflect.Descriptor instead.
+func (*TokenReply) Descriptor() ([]byte, []int) {
 	return file_user_proto_rawDescGZIP(), []int{6}
 }
 
-func (x *LoginReply) GetToken() string {
+func (x *TokenReply) GetToken() string {
 	if x != nil {
 		return x.Token
 	}
@@ -458,23 +458,25 @@ var file_user_proto_rawDesc = []byte{
 	0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73,
 	0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72,
 	0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x26, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52,
-	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6a, 0x73, 0x43, 0x6f, 0x64, 0x65,
-	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6a, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x22,
-	0x0a, 0x0a, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05,
-	0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b,
-	0x65, 0x6e, 0x32, 0xe0, 0x04, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x5c, 0x0a, 0x0a, 0x44,
-	0x65, 0x62, 0x75, 0x67, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e,
-	0x75, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52,
-	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65,
-	0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1b, 0x82, 0xd3,
-	0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e,
-	0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x3a, 0x01, 0x2a, 0x12, 0x4c, 0x0a, 0x05, 0x4c, 0x6f, 0x67,
-	0x69, 0x6e, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x4c, 0x6f,
-	0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x61, 0x70, 0x69,
-	0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79,
-	0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x22, 0x0a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c,
-	0x6f, 0x67, 0x69, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0x80, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61,
+	0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x2e, 0x0a, 0x14, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72,
+	0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16,
+	0x0a, 0x06, 0x6a, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
+	0x6a, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x22, 0x0a, 0x0a, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52,
+	0x65, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xf8, 0x04, 0x0a, 0x04, 0x55,
+	0x73, 0x65, 0x72, 0x12, 0x5c, 0x0a, 0x0a, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x6f, 0x67, 0x69,
+	0x6e, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x62,
+	0x75, 0x67, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14,
+	0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52,
+	0x65, 0x70, 0x6c, 0x79, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x61,
+	0x70, 0x69, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x3a, 0x01,
+	0x2a, 0x12, 0x64, 0x0a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69,
+	0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x75,
+	0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
+	0x73, 0x74, 0x1a, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x54, 0x6f,
+	0x6b, 0x65, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17,
+	0x22, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61,
+	0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0x80, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61,
 	0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f,
 	0x6e, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x64,
 	0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69,
@@ -527,19 +529,19 @@ var file_user_proto_goTypes = []interface{}{
 	(*SendPhoneCodeRequest)(nil),         // 2: api.user.SendPhoneCodeRequest
 	(*CheckPhoneCodeRequest)(nil),        // 3: api.user.CheckPhoneCodeRequest
 	(*DebugLoginRequest)(nil),            // 4: api.user.DebugLoginRequest
-	(*LoginRequest)(nil),                 // 5: api.user.LoginRequest
-	(*LoginReply)(nil),                   // 6: api.user.LoginReply
+	(*AuthorizationRequest)(nil),         // 5: api.user.AuthorizationRequest
+	(*TokenReply)(nil),                   // 6: api.user.TokenReply
 	(*emptypb.Empty)(nil),                // 7: google.protobuf.Empty
 }
 var file_user_proto_depIdxs = []int32{
 	4, // 0: api.user.User.DebugLogin:input_type -> api.user.DebugLoginRequest
-	5, // 1: api.user.User.Login:input_type -> api.user.LoginRequest
+	5, // 1: api.user.User.Authorization:input_type -> api.user.AuthorizationRequest
 	1, // 2: api.user.User.UpdateUserInformation:input_type -> api.user.UpdateUserInformationRequest
 	7, // 3: api.user.User.GetUserInfo:input_type -> google.protobuf.Empty
 	2, // 4: api.user.User.SendPhoneCode:input_type -> api.user.SendPhoneCodeRequest
 	3, // 5: api.user.User.CheckPhoneCode:input_type -> api.user.CheckPhoneCodeRequest
-	6, // 6: api.user.User.DebugLogin:output_type -> api.user.LoginReply
-	6, // 7: api.user.User.Login:output_type -> api.user.LoginReply
+	6, // 6: api.user.User.DebugLogin:output_type -> api.user.TokenReply
+	6, // 7: api.user.User.Authorization:output_type -> api.user.TokenReply
 	7, // 8: api.user.User.UpdateUserInformation:output_type -> google.protobuf.Empty
 	0, // 9: api.user.User.GetUserInfo:output_type -> api.user.UserInfo
 	7, // 10: api.user.User.SendPhoneCode:output_type -> google.protobuf.Empty
@@ -618,7 +620,7 @@ func file_user_proto_init() {
 			}
 		}
 		file_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*LoginRequest); i {
+			switch v := v.(*AuthorizationRequest); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -630,7 +632,7 @@ func file_user_proto_init() {
 			}
 		}
 		file_user_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*LoginReply); i {
+			switch v := v.(*TokenReply); i {
 			case 0:
 				return &v.state
 			case 1:

+ 5 - 5
api/user/user.proto

@@ -11,15 +11,15 @@ option java_multiple_files = true;
 option java_package = "api.user";
 
 service User {
-  rpc DebugLogin (DebugLoginRequest) returns (LoginReply){
+  rpc DebugLogin (DebugLoginRequest) returns (TokenReply){
     option (google.api.http) = {
       post: "/api/login/debug",
       body:"*"
     };
   };
-  rpc Login (LoginRequest) returns (LoginReply){
+  rpc Authorization (AuthorizationRequest) returns (TokenReply){
     option (google.api.http) = {
-      post: "/api/login",
+      post: "/api/authorization",
       body:"*"
     };
   };
@@ -77,10 +77,10 @@ message DebugLoginRequest {
   string code = 2;
 }
 
-message LoginRequest {
+message AuthorizationRequest {
   string jsCode = 1;
 }
 
-message LoginReply {
+message TokenReply {
   string token = 1;
 }

+ 19 - 19
api/user/user_grpc.pb.go

@@ -19,8 +19,8 @@ const _ = grpc.SupportPackageIsVersion7
 //
 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
 type UserClient interface {
-	DebugLogin(ctx context.Context, in *DebugLoginRequest, opts ...grpc.CallOption) (*LoginReply, error)
-	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error)
+	DebugLogin(ctx context.Context, in *DebugLoginRequest, opts ...grpc.CallOption) (*TokenReply, error)
+	Authorization(ctx context.Context, in *AuthorizationRequest, opts ...grpc.CallOption) (*TokenReply, error)
 	UpdateUserInformation(ctx context.Context, in *UpdateUserInformationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
 	GetUserInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserInfo, error)
 	SendPhoneCode(ctx context.Context, in *SendPhoneCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
@@ -35,8 +35,8 @@ func NewUserClient(cc grpc.ClientConnInterface) UserClient {
 	return &userClient{cc}
 }
 
-func (c *userClient) DebugLogin(ctx context.Context, in *DebugLoginRequest, opts ...grpc.CallOption) (*LoginReply, error) {
-	out := new(LoginReply)
+func (c *userClient) DebugLogin(ctx context.Context, in *DebugLoginRequest, opts ...grpc.CallOption) (*TokenReply, error) {
+	out := new(TokenReply)
 	err := c.cc.Invoke(ctx, "/api.user.User/DebugLogin", in, out, opts...)
 	if err != nil {
 		return nil, err
@@ -44,9 +44,9 @@ func (c *userClient) DebugLogin(ctx context.Context, in *DebugLoginRequest, opts
 	return out, nil
 }
 
-func (c *userClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error) {
-	out := new(LoginReply)
-	err := c.cc.Invoke(ctx, "/api.user.User/Login", in, out, opts...)
+func (c *userClient) Authorization(ctx context.Context, in *AuthorizationRequest, opts ...grpc.CallOption) (*TokenReply, error) {
+	out := new(TokenReply)
+	err := c.cc.Invoke(ctx, "/api.user.User/Authorization", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -93,8 +93,8 @@ func (c *userClient) CheckPhoneCode(ctx context.Context, in *CheckPhoneCodeReque
 // All implementations must embed UnimplementedUserServer
 // for forward compatibility
 type UserServer interface {
-	DebugLogin(context.Context, *DebugLoginRequest) (*LoginReply, error)
-	Login(context.Context, *LoginRequest) (*LoginReply, error)
+	DebugLogin(context.Context, *DebugLoginRequest) (*TokenReply, error)
+	Authorization(context.Context, *AuthorizationRequest) (*TokenReply, error)
 	UpdateUserInformation(context.Context, *UpdateUserInformationRequest) (*emptypb.Empty, error)
 	GetUserInfo(context.Context, *emptypb.Empty) (*UserInfo, error)
 	SendPhoneCode(context.Context, *SendPhoneCodeRequest) (*emptypb.Empty, error)
@@ -106,11 +106,11 @@ type UserServer interface {
 type UnimplementedUserServer struct {
 }
 
-func (UnimplementedUserServer) DebugLogin(context.Context, *DebugLoginRequest) (*LoginReply, error) {
+func (UnimplementedUserServer) DebugLogin(context.Context, *DebugLoginRequest) (*TokenReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method DebugLogin not implemented")
 }
-func (UnimplementedUserServer) Login(context.Context, *LoginRequest) (*LoginReply, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
+func (UnimplementedUserServer) Authorization(context.Context, *AuthorizationRequest) (*TokenReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method Authorization not implemented")
 }
 func (UnimplementedUserServer) UpdateUserInformation(context.Context, *UpdateUserInformationRequest) (*emptypb.Empty, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method UpdateUserInformation not implemented")
@@ -155,20 +155,20 @@ func _User_DebugLogin_Handler(srv interface{}, ctx context.Context, dec func(int
 	return interceptor(ctx, in, info, handler)
 }
 
-func _User_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(LoginRequest)
+func _User_Authorization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(AuthorizationRequest)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(UserServer).Login(ctx, in)
+		return srv.(UserServer).Authorization(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/api.user.User/Login",
+		FullMethod: "/api.user.User/Authorization",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(UserServer).Login(ctx, req.(*LoginRequest))
+		return srv.(UserServer).Authorization(ctx, req.(*AuthorizationRequest))
 	}
 	return interceptor(ctx, in, info, handler)
 }
@@ -257,8 +257,8 @@ var User_ServiceDesc = grpc.ServiceDesc{
 			Handler:    _User_DebugLogin_Handler,
 		},
 		{
-			MethodName: "Login",
-			Handler:    _User_Login_Handler,
+			MethodName: "Authorization",
+			Handler:    _User_Authorization_Handler,
 		},
 		{
 			MethodName: "UpdateUserInformation",

+ 24 - 24
api/user/user_http.pb.go

@@ -27,10 +27,10 @@ var _ = new(base.Html)
 const _ = http.SupportPackageIsVersion1
 
 type UserHTTPServer interface {
+	Authorization(context.Context, *AuthorizationRequest) (*TokenReply, error)
 	CheckPhoneCode(context.Context, *CheckPhoneCodeRequest) (*emptypb.Empty, error)
-	DebugLogin(context.Context, *DebugLoginRequest) (*LoginReply, error)
+	DebugLogin(context.Context, *DebugLoginRequest) (*TokenReply, error)
 	GetUserInfo(context.Context, *emptypb.Empty) (*UserInfo, error)
-	Login(context.Context, *LoginRequest) (*LoginReply, error)
 	SendPhoneCode(context.Context, *SendPhoneCodeRequest) (*emptypb.Empty, error)
 	UpdateUserInformation(context.Context, *UpdateUserInformationRequest) (*emptypb.Empty, error)
 }
@@ -38,7 +38,7 @@ type UserHTTPServer interface {
 func RegisterUserHTTPServer(s *http.Server, srv UserHTTPServer) {
 	r := s.Route("/")
 	r.POST("/api/login/debug", _User_DebugLogin0_HTTP_Handler(srv))
-	r.POST("/api/login", _User_Login0_HTTP_Handler(srv))
+	r.POST("/api/authorization", _User_Authorization0_HTTP_Handler(srv))
 	r.POST("/api/user/update/information", _User_UpdateUserInformation0_HTTP_Handler(srv))
 	r.POST("/api/user/info", _User_GetUserInfo0_HTTP_Handler(srv))
 	r.POST("/api/user/code/send", _User_SendPhoneCode0_HTTP_Handler(srv))
@@ -72,18 +72,18 @@ func _User_DebugLogin0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) e
 	}
 }
 
-func _User_Login0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error {
+func _User_Authorization0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error {
 	return func(ctx http.Context) error {
-		var in LoginRequest
+		var in AuthorizationRequest
 		if err := ctx.Bind(&in); err != nil {
 			return err
 		}
 		if err := ctx.BindQuery(&in); err != nil {
 			return err
 		}
-		http.SetOperation(ctx, "/api.user.User/Login")
+		http.SetOperation(ctx, "/api.user.User/Authorization")
 		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
-			return srv.Login(ctx, req.(*LoginRequest))
+			return srv.Authorization(ctx, req.(*AuthorizationRequest))
 		})
 		out, err := h(ctx, &in)
 		if err != nil {
@@ -208,10 +208,10 @@ func _User_CheckPhoneCode0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Contex
 }
 
 type UserHTTPClient interface {
+	Authorization(ctx context.Context, req *AuthorizationRequest, opts ...http.CallOption) (rsp *TokenReply, err error)
 	CheckPhoneCode(ctx context.Context, req *CheckPhoneCodeRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
-	DebugLogin(ctx context.Context, req *DebugLoginRequest, opts ...http.CallOption) (rsp *LoginReply, err error)
+	DebugLogin(ctx context.Context, req *DebugLoginRequest, opts ...http.CallOption) (rsp *TokenReply, err error)
 	GetUserInfo(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *UserInfo, err error)
-	Login(ctx context.Context, req *LoginRequest, opts ...http.CallOption) (rsp *LoginReply, err error)
 	SendPhoneCode(ctx context.Context, req *SendPhoneCodeRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
 	UpdateUserInformation(ctx context.Context, req *UpdateUserInformationRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
 }
@@ -224,6 +224,19 @@ func NewUserHTTPClient(client *http.Client) UserHTTPClient {
 	return &UserHTTPClientImpl{client}
 }
 
+func (c *UserHTTPClientImpl) Authorization(ctx context.Context, in *AuthorizationRequest, opts ...http.CallOption) (*TokenReply, error) {
+	var out TokenReply
+	pattern := "/api/authorization"
+	path := binding.EncodeURL(pattern, in, false)
+	opts = append(opts, http.Operation("/api.user.User/Authorization"))
+	opts = append(opts, http.PathTemplate(pattern))
+	err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return &out, err
+}
+
 func (c *UserHTTPClientImpl) CheckPhoneCode(ctx context.Context, in *CheckPhoneCodeRequest, opts ...http.CallOption) (*emptypb.Empty, error) {
 	var out emptypb.Empty
 	pattern := "/api/user/code/check"
@@ -237,8 +250,8 @@ func (c *UserHTTPClientImpl) CheckPhoneCode(ctx context.Context, in *CheckPhoneC
 	return &out, err
 }
 
-func (c *UserHTTPClientImpl) DebugLogin(ctx context.Context, in *DebugLoginRequest, opts ...http.CallOption) (*LoginReply, error) {
-	var out LoginReply
+func (c *UserHTTPClientImpl) DebugLogin(ctx context.Context, in *DebugLoginRequest, opts ...http.CallOption) (*TokenReply, error) {
+	var out TokenReply
 	pattern := "/api/login/debug"
 	path := binding.EncodeURL(pattern, in, false)
 	opts = append(opts, http.Operation("/api.user.User/DebugLogin"))
@@ -263,19 +276,6 @@ func (c *UserHTTPClientImpl) GetUserInfo(ctx context.Context, in *emptypb.Empty,
 	return &out, err
 }
 
-func (c *UserHTTPClientImpl) Login(ctx context.Context, in *LoginRequest, opts ...http.CallOption) (*LoginReply, error) {
-	var out LoginReply
-	pattern := "/api/login"
-	path := binding.EncodeURL(pattern, in, false)
-	opts = append(opts, http.Operation("/api.user.User/Login"))
-	opts = append(opts, http.PathTemplate(pattern))
-	err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return &out, err
-}
-
 func (c *UserHTTPClientImpl) SendPhoneCode(ctx context.Context, in *SendPhoneCodeRequest, opts ...http.CallOption) (*emptypb.Empty, error) {
 	var out emptypb.Empty
 	pattern := "/api/user/code/send"

+ 4 - 4
js/api/user/user_http_pb.ts

@@ -1,14 +1,14 @@
 // @ts-ignore
 import { request } from 'ice';
-import {DebugLoginRequest,LoginReply,LoginRequest,UpdateUserInformationRequest,UserInfo,SendPhoneCodeRequest,CheckPhoneCodeRequest} from "./user_pb";
+import {DebugLoginRequest,TokenReply,AuthorizationRequest,UpdateUserInformationRequest,UserInfo,SendPhoneCodeRequest,CheckPhoneCodeRequest} from "./user_pb";
 
 const UserService = {
   DebugLogin: async (req?: DebugLoginRequest) => {
-	const res = await request.post<{ data: LoginReply, code: string, message: string }>('/api/login/debug', req);
+	const res = await request.post<{ data: TokenReply, code: string, message: string }>('/api/login/debug', req);
     return res.data;
   },
-  Login: async (req?: LoginRequest) => {
-	const res = await request.post<{ data: LoginReply, code: string, message: string }>('/api/login', req);
+  Authorization: async (req?: AuthorizationRequest) => {
+	const res = await request.post<{ data: TokenReply, code: string, message: string }>('/api/authorization', req);
     return res.data;
   },
   UpdateUserInformation: async (req?: UpdateUserInformationRequest) => {

+ 2 - 2
js/api/user/user_pb.ts

@@ -28,10 +28,10 @@ export interface DebugLoginRequest{
     userId?:string;
     code?:string;
 }
-export interface LoginRequest{
+export interface AuthorizationRequest{
     jsCode?:string;
 }
-export interface LoginReply{
+export interface TokenReply{
     token?:string;
 }