From 50f84d3aaadccf7872388800df7b1f7226d5d1fc Mon Sep 17 00:00:00 2001 From: I0HuKc Date: Sat, 9 Apr 2022 18:55:53 +0300 Subject: [PATCH] update security protocol --- .../security/security-microservice.pb.go | 181 ++++++++++++------ .../security/security-microservice_grpc.pb.go | 12 +- 2 files changed, 128 insertions(+), 65 deletions(-) diff --git a/pkg/proto/security/security-microservice.pb.go b/pkg/proto/security/security-microservice.pb.go index c12f640..c2844b7 100644 --- a/pkg/proto/security/security-microservice.pb.go +++ b/pkg/proto/security/security-microservice.pb.go @@ -76,6 +76,53 @@ func (x *TokensPair) GetAccessToken() string { return "" } +type AuthCheckReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` +} + +func (x *AuthCheckReq) Reset() { + *x = AuthCheckReq{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_security_security_microservice_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AuthCheckReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthCheckReq) ProtoMessage() {} + +func (x *AuthCheckReq) ProtoReflect() protoreflect.Message { + mi := &file_proto_security_security_microservice_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthCheckReq.ProtoReflect.Descriptor instead. +func (*AuthCheckReq) Descriptor() ([]byte, []int) { + return file_proto_security_security_microservice_proto_rawDescGZIP(), []int{1} +} + +func (x *AuthCheckReq) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + type RefreshTokenReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -87,7 +134,7 @@ type RefreshTokenReq struct { func (x *RefreshTokenReq) Reset() { *x = RefreshTokenReq{} if protoimpl.UnsafeEnabled { - mi := &file_proto_security_security_microservice_proto_msgTypes[1] + mi := &file_proto_security_security_microservice_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -100,7 +147,7 @@ func (x *RefreshTokenReq) String() string { func (*RefreshTokenReq) ProtoMessage() {} func (x *RefreshTokenReq) ProtoReflect() protoreflect.Message { - mi := &file_proto_security_security_microservice_proto_msgTypes[1] + mi := &file_proto_security_security_microservice_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113,7 +160,7 @@ func (x *RefreshTokenReq) ProtoReflect() protoreflect.Message { // Deprecated: Use RefreshTokenReq.ProtoReflect.Descriptor instead. func (*RefreshTokenReq) Descriptor() ([]byte, []int) { - return file_proto_security_security_microservice_proto_rawDescGZIP(), []int{1} + return file_proto_security_security_microservice_proto_rawDescGZIP(), []int{2} } func (x *RefreshTokenReq) GetToken() string { @@ -135,7 +182,7 @@ type LoginReq struct { func (x *LoginReq) Reset() { *x = LoginReq{} if protoimpl.UnsafeEnabled { - mi := &file_proto_security_security_microservice_proto_msgTypes[2] + mi := &file_proto_security_security_microservice_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -148,7 +195,7 @@ func (x *LoginReq) String() string { func (*LoginReq) ProtoMessage() {} func (x *LoginReq) ProtoReflect() protoreflect.Message { - mi := &file_proto_security_security_microservice_proto_msgTypes[2] + mi := &file_proto_security_security_microservice_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -161,7 +208,7 @@ func (x *LoginReq) ProtoReflect() protoreflect.Message { // Deprecated: Use LoginReq.ProtoReflect.Descriptor instead. func (*LoginReq) Descriptor() ([]byte, []int) { - return file_proto_security_security_microservice_proto_rawDescGZIP(), []int{2} + return file_proto_security_security_microservice_proto_rawDescGZIP(), []int{3} } func (x *LoginReq) GetLogin() string { @@ -189,7 +236,7 @@ type AuthCheckResp struct { func (x *AuthCheckResp) Reset() { *x = AuthCheckResp{} if protoimpl.UnsafeEnabled { - mi := &file_proto_security_security_microservice_proto_msgTypes[3] + mi := &file_proto_security_security_microservice_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -202,7 +249,7 @@ func (x *AuthCheckResp) String() string { func (*AuthCheckResp) ProtoMessage() {} func (x *AuthCheckResp) ProtoReflect() protoreflect.Message { - mi := &file_proto_security_security_microservice_proto_msgTypes[3] + mi := &file_proto_security_security_microservice_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -215,7 +262,7 @@ func (x *AuthCheckResp) ProtoReflect() protoreflect.Message { // Deprecated: Use AuthCheckResp.ProtoReflect.Descriptor instead. func (*AuthCheckResp) Descriptor() ([]byte, []int) { - return file_proto_security_security_microservice_proto_rawDescGZIP(), []int{3} + return file_proto_security_security_microservice_proto_rawDescGZIP(), []int{4} } func (x *AuthCheckResp) GetIsAuth() bool { @@ -238,40 +285,43 @@ var file_proto_security_security_microservice_proto_rawDesc = []byte{ 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x27, 0x0a, 0x0f, 0x52, 0x65, 0x66, - 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x22, 0x3c, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x14, - 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, - 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x22, 0x28, 0x0a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x32, 0xbf, 0x02, 0x0a, 0x0f, 0x53, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x31, - 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, - 0x74, 0x79, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x73, 0x65, - 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x50, 0x61, 0x69, - 0x72, 0x12, 0x3c, 0x0a, 0x09, 0x41, 0x75, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x17, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, - 0x79, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x3f, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, - 0x19, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, - 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x73, 0x65, 0x63, - 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x50, 0x61, 0x69, 0x72, - 0x12, 0x38, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x40, 0x0a, 0x0e, 0x48, 0x65, - 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x2c, 0x5a, 0x2a, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x77, 0x72, 0x73, 0x2d, 0x6e, - 0x65, 0x77, 0x73, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x31, 0x0a, 0x0c, 0x41, 0x75, 0x74, + 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x27, 0x0a, 0x0f, + 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12, + 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x3c, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, + 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x22, 0x28, 0x0a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x32, 0xbf, 0x02, + 0x0a, 0x0f, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x31, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x2e, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x14, + 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, + 0x50, 0x61, 0x69, 0x72, 0x12, 0x3c, 0x0a, 0x09, 0x41, 0x75, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x12, 0x16, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x41, 0x75, 0x74, + 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x73, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x19, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x50, + 0x61, 0x69, 0x72, 0x12, 0x38, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x40, 0x0a, + 0x0e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, + 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x77, 0x72, + 0x73, 0x2d, 0x6e, 0x65, 0x77, 0x73, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -286,25 +336,26 @@ func file_proto_security_security_microservice_proto_rawDescGZIP() []byte { return file_proto_security_security_microservice_proto_rawDescData } -var file_proto_security_security_microservice_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_proto_security_security_microservice_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_proto_security_security_microservice_proto_goTypes = []interface{}{ (*TokensPair)(nil), // 0: security.TokensPair - (*RefreshTokenReq)(nil), // 1: security.RefreshTokenReq - (*LoginReq)(nil), // 2: security.LoginReq - (*AuthCheckResp)(nil), // 3: security.AuthCheckResp - (*emptypb.Empty)(nil), // 4: google.protobuf.Empty + (*AuthCheckReq)(nil), // 1: security.AuthCheckReq + (*RefreshTokenReq)(nil), // 2: security.RefreshTokenReq + (*LoginReq)(nil), // 3: security.LoginReq + (*AuthCheckResp)(nil), // 4: security.AuthCheckResp + (*emptypb.Empty)(nil), // 5: google.protobuf.Empty } var file_proto_security_security_microservice_proto_depIdxs = []int32{ - 2, // 0: security.SecurityService.Login:input_type -> security.LoginReq - 4, // 1: security.SecurityService.AuthCheck:input_type -> google.protobuf.Empty - 1, // 2: security.SecurityService.RefreshToken:input_type -> security.RefreshTokenReq - 4, // 3: security.SecurityService.Logout:input_type -> google.protobuf.Empty - 4, // 4: security.SecurityService.HeartbeatCheck:input_type -> google.protobuf.Empty + 3, // 0: security.SecurityService.Login:input_type -> security.LoginReq + 1, // 1: security.SecurityService.AuthCheck:input_type -> security.AuthCheckReq + 2, // 2: security.SecurityService.RefreshToken:input_type -> security.RefreshTokenReq + 5, // 3: security.SecurityService.Logout:input_type -> google.protobuf.Empty + 5, // 4: security.SecurityService.HeartbeatCheck:input_type -> google.protobuf.Empty 0, // 5: security.SecurityService.Login:output_type -> security.TokensPair - 3, // 6: security.SecurityService.AuthCheck:output_type -> security.AuthCheckResp + 4, // 6: security.SecurityService.AuthCheck:output_type -> security.AuthCheckResp 0, // 7: security.SecurityService.RefreshToken:output_type -> security.TokensPair - 4, // 8: security.SecurityService.Logout:output_type -> google.protobuf.Empty - 4, // 9: security.SecurityService.HeartbeatCheck:output_type -> google.protobuf.Empty + 5, // 8: security.SecurityService.Logout:output_type -> google.protobuf.Empty + 5, // 9: security.SecurityService.HeartbeatCheck:output_type -> google.protobuf.Empty 5, // [5:10] is the sub-list for method output_type 0, // [0:5] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -331,7 +382,7 @@ func file_proto_security_security_microservice_proto_init() { } } file_proto_security_security_microservice_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RefreshTokenReq); i { + switch v := v.(*AuthCheckReq); i { case 0: return &v.state case 1: @@ -343,7 +394,7 @@ func file_proto_security_security_microservice_proto_init() { } } file_proto_security_security_microservice_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoginReq); i { + switch v := v.(*RefreshTokenReq); i { case 0: return &v.state case 1: @@ -355,6 +406,18 @@ func file_proto_security_security_microservice_proto_init() { } } file_proto_security_security_microservice_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LoginReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_security_security_microservice_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AuthCheckResp); i { case 0: return &v.state @@ -373,7 +436,7 @@ func file_proto_security_security_microservice_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_security_security_microservice_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 5, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/proto/security/security-microservice_grpc.pb.go b/pkg/proto/security/security-microservice_grpc.pb.go index 6e28d9d..4cec70b 100644 --- a/pkg/proto/security/security-microservice_grpc.pb.go +++ b/pkg/proto/security/security-microservice_grpc.pb.go @@ -20,7 +20,7 @@ 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 SecurityServiceClient interface { Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*TokensPair, error) - AuthCheck(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*AuthCheckResp, error) + AuthCheck(ctx context.Context, in *AuthCheckReq, opts ...grpc.CallOption) (*AuthCheckResp, error) RefreshToken(ctx context.Context, in *RefreshTokenReq, opts ...grpc.CallOption) (*TokensPair, error) Logout(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) HeartbeatCheck(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) @@ -43,7 +43,7 @@ func (c *securityServiceClient) Login(ctx context.Context, in *LoginReq, opts .. return out, nil } -func (c *securityServiceClient) AuthCheck(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*AuthCheckResp, error) { +func (c *securityServiceClient) AuthCheck(ctx context.Context, in *AuthCheckReq, opts ...grpc.CallOption) (*AuthCheckResp, error) { out := new(AuthCheckResp) err := c.cc.Invoke(ctx, "/security.SecurityService/AuthCheck", in, out, opts...) if err != nil { @@ -84,7 +84,7 @@ func (c *securityServiceClient) HeartbeatCheck(ctx context.Context, in *emptypb. // for forward compatibility type SecurityServiceServer interface { Login(context.Context, *LoginReq) (*TokensPair, error) - AuthCheck(context.Context, *emptypb.Empty) (*AuthCheckResp, error) + AuthCheck(context.Context, *AuthCheckReq) (*AuthCheckResp, error) RefreshToken(context.Context, *RefreshTokenReq) (*TokensPair, error) Logout(context.Context, *emptypb.Empty) (*emptypb.Empty, error) HeartbeatCheck(context.Context, *emptypb.Empty) (*emptypb.Empty, error) @@ -98,7 +98,7 @@ type UnimplementedSecurityServiceServer struct { func (UnimplementedSecurityServiceServer) Login(context.Context, *LoginReq) (*TokensPair, error) { return nil, status.Errorf(codes.Unimplemented, "method Login not implemented") } -func (UnimplementedSecurityServiceServer) AuthCheck(context.Context, *emptypb.Empty) (*AuthCheckResp, error) { +func (UnimplementedSecurityServiceServer) AuthCheck(context.Context, *AuthCheckReq) (*AuthCheckResp, error) { return nil, status.Errorf(codes.Unimplemented, "method AuthCheck not implemented") } func (UnimplementedSecurityServiceServer) RefreshToken(context.Context, *RefreshTokenReq) (*TokensPair, error) { @@ -142,7 +142,7 @@ func _SecurityService_Login_Handler(srv interface{}, ctx context.Context, dec fu } func _SecurityService_AuthCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) + in := new(AuthCheckReq) if err := dec(in); err != nil { return nil, err } @@ -154,7 +154,7 @@ func _SecurityService_AuthCheck_Handler(srv interface{}, ctx context.Context, de FullMethod: "/security.SecurityService/AuthCheck", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SecurityServiceServer).AuthCheck(ctx, req.(*emptypb.Empty)) + return srv.(SecurityServiceServer).AuthCheck(ctx, req.(*AuthCheckReq)) } return interceptor(ctx, in, info, handler) }