|
|
|
|
@@ -1,7 +1,7 @@
|
|
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
|
|
|
// versions:
|
|
|
|
|
// protoc-gen-go v1.36.11
|
|
|
|
|
// protoc v3.21.12
|
|
|
|
|
// protoc v4.25.9
|
|
|
|
|
// source: sso/ldap-auth.proto
|
|
|
|
|
|
|
|
|
|
package pb
|
|
|
|
|
@@ -21,6 +21,114 @@ const (
|
|
|
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type LdapUserData struct {
|
|
|
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
|
|
|
Dn string `protobuf:"bytes,1,opt,name=dn,proto3" json:"dn,omitempty"` // Полный путь в AD (Distinguished Name)
|
|
|
|
|
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` // Логин (sAMAccountName)
|
|
|
|
|
DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // ФИО (displayName)
|
|
|
|
|
Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` // Почта (mail)
|
|
|
|
|
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` // Описание/Должность (description)
|
|
|
|
|
Avatar []byte `protobuf:"bytes,6,opt,name=avatar,proto3" json:"avatar,omitempty"` // Аватарка в байтах (thumbnailPhoto)
|
|
|
|
|
Groups []string `protobuf:"bytes,7,rep,name=groups,proto3" json:"groups,omitempty"` // Список групп
|
|
|
|
|
IsActive bool `protobuf:"varint,8,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` // Статус аккаунта
|
|
|
|
|
Phone string `protobuf:"bytes,9,opt,name=phone,proto3" json:"phone,omitempty"`
|
|
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *LdapUserData) Reset() {
|
|
|
|
|
*x = LdapUserData{}
|
|
|
|
|
mi := &file_sso_ldap_auth_proto_msgTypes[0]
|
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *LdapUserData) String() string {
|
|
|
|
|
return protoimpl.X.MessageStringOf(x)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (*LdapUserData) ProtoMessage() {}
|
|
|
|
|
|
|
|
|
|
func (x *LdapUserData) ProtoReflect() protoreflect.Message {
|
|
|
|
|
mi := &file_sso_ldap_auth_proto_msgTypes[0]
|
|
|
|
|
if x != nil {
|
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
|
if ms.LoadMessageInfo() == nil {
|
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
|
}
|
|
|
|
|
return ms
|
|
|
|
|
}
|
|
|
|
|
return mi.MessageOf(x)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Deprecated: Use LdapUserData.ProtoReflect.Descriptor instead.
|
|
|
|
|
func (*LdapUserData) Descriptor() ([]byte, []int) {
|
|
|
|
|
return file_sso_ldap_auth_proto_rawDescGZIP(), []int{0}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *LdapUserData) GetDn() string {
|
|
|
|
|
if x != nil {
|
|
|
|
|
return x.Dn
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *LdapUserData) GetUsername() string {
|
|
|
|
|
if x != nil {
|
|
|
|
|
return x.Username
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *LdapUserData) GetDisplayName() string {
|
|
|
|
|
if x != nil {
|
|
|
|
|
return x.DisplayName
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *LdapUserData) GetEmail() string {
|
|
|
|
|
if x != nil {
|
|
|
|
|
return x.Email
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *LdapUserData) GetDescription() string {
|
|
|
|
|
if x != nil {
|
|
|
|
|
return x.Description
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *LdapUserData) GetAvatar() []byte {
|
|
|
|
|
if x != nil {
|
|
|
|
|
return x.Avatar
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *LdapUserData) GetGroups() []string {
|
|
|
|
|
if x != nil {
|
|
|
|
|
return x.Groups
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *LdapUserData) GetIsActive() bool {
|
|
|
|
|
if x != nil {
|
|
|
|
|
return x.IsActive
|
|
|
|
|
}
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *LdapUserData) GetPhone() string {
|
|
|
|
|
if x != nil {
|
|
|
|
|
return x.Phone
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// --- Авторизация ---
|
|
|
|
|
type VerifyRequest struct {
|
|
|
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
|
|
|
@@ -32,7 +140,7 @@ type VerifyRequest struct {
|
|
|
|
|
|
|
|
|
|
func (x *VerifyRequest) Reset() {
|
|
|
|
|
*x = VerifyRequest{}
|
|
|
|
|
mi := &file_sso_ldap_auth_proto_msgTypes[0]
|
|
|
|
|
mi := &file_sso_ldap_auth_proto_msgTypes[1]
|
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
|
}
|
|
|
|
|
@@ -44,7 +152,7 @@ func (x *VerifyRequest) String() string {
|
|
|
|
|
func (*VerifyRequest) ProtoMessage() {}
|
|
|
|
|
|
|
|
|
|
func (x *VerifyRequest) ProtoReflect() protoreflect.Message {
|
|
|
|
|
mi := &file_sso_ldap_auth_proto_msgTypes[0]
|
|
|
|
|
mi := &file_sso_ldap_auth_proto_msgTypes[1]
|
|
|
|
|
if x != nil {
|
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
|
if ms.LoadMessageInfo() == nil {
|
|
|
|
|
@@ -57,7 +165,7 @@ func (x *VerifyRequest) ProtoReflect() protoreflect.Message {
|
|
|
|
|
|
|
|
|
|
// Deprecated: Use VerifyRequest.ProtoReflect.Descriptor instead.
|
|
|
|
|
func (*VerifyRequest) Descriptor() ([]byte, []int) {
|
|
|
|
|
return file_sso_ldap_auth_proto_rawDescGZIP(), []int{0}
|
|
|
|
|
return file_sso_ldap_auth_proto_rawDescGZIP(), []int{1}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *VerifyRequest) GetUsername() string {
|
|
|
|
|
@@ -78,14 +186,14 @@ type VerifyResponse struct {
|
|
|
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
|
|
|
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
|
|
|
|
ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
|
|
|
|
|
User *UserData `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` // Отдаем полные данные при успешном входе
|
|
|
|
|
User *LdapUserData `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` // Отдаем полные данные при успешном входе
|
|
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *VerifyResponse) Reset() {
|
|
|
|
|
*x = VerifyResponse{}
|
|
|
|
|
mi := &file_sso_ldap_auth_proto_msgTypes[1]
|
|
|
|
|
mi := &file_sso_ldap_auth_proto_msgTypes[2]
|
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
|
}
|
|
|
|
|
@@ -97,7 +205,7 @@ func (x *VerifyResponse) String() string {
|
|
|
|
|
func (*VerifyResponse) ProtoMessage() {}
|
|
|
|
|
|
|
|
|
|
func (x *VerifyResponse) ProtoReflect() protoreflect.Message {
|
|
|
|
|
mi := &file_sso_ldap_auth_proto_msgTypes[1]
|
|
|
|
|
mi := &file_sso_ldap_auth_proto_msgTypes[2]
|
|
|
|
|
if x != nil {
|
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
|
if ms.LoadMessageInfo() == nil {
|
|
|
|
|
@@ -110,7 +218,7 @@ func (x *VerifyResponse) ProtoReflect() protoreflect.Message {
|
|
|
|
|
|
|
|
|
|
// Deprecated: Use VerifyResponse.ProtoReflect.Descriptor instead.
|
|
|
|
|
func (*VerifyResponse) Descriptor() ([]byte, []int) {
|
|
|
|
|
return file_sso_ldap_auth_proto_rawDescGZIP(), []int{1}
|
|
|
|
|
return file_sso_ldap_auth_proto_rawDescGZIP(), []int{2}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *VerifyResponse) GetSuccess() bool {
|
|
|
|
|
@@ -127,7 +235,7 @@ func (x *VerifyResponse) GetErrorMessage() string {
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *VerifyResponse) GetUser() *UserData {
|
|
|
|
|
func (x *VerifyResponse) GetUser() *LdapUserData {
|
|
|
|
|
if x != nil {
|
|
|
|
|
return x.User
|
|
|
|
|
}
|
|
|
|
|
@@ -138,14 +246,24 @@ var File_sso_ldap_auth_proto protoreflect.FileDescriptor
|
|
|
|
|
|
|
|
|
|
const file_sso_ldap_auth_proto_rawDesc = "" +
|
|
|
|
|
"\n" +
|
|
|
|
|
"\x13sso/ldap-auth.proto\x12\fldap_auth.v1\x1a\x0esso/ldap.proto\"G\n" +
|
|
|
|
|
"\x13sso/ldap-auth.proto\x12\fldap_auth.v1\"\xf8\x01\n" +
|
|
|
|
|
"\fLdapUserData\x12\x0e\n" +
|
|
|
|
|
"\x02dn\x18\x01 \x01(\tR\x02dn\x12\x1a\n" +
|
|
|
|
|
"\busername\x18\x02 \x01(\tR\busername\x12!\n" +
|
|
|
|
|
"\fdisplay_name\x18\x03 \x01(\tR\vdisplayName\x12\x14\n" +
|
|
|
|
|
"\x05email\x18\x04 \x01(\tR\x05email\x12 \n" +
|
|
|
|
|
"\vdescription\x18\x05 \x01(\tR\vdescription\x12\x16\n" +
|
|
|
|
|
"\x06avatar\x18\x06 \x01(\fR\x06avatar\x12\x16\n" +
|
|
|
|
|
"\x06groups\x18\a \x03(\tR\x06groups\x12\x1b\n" +
|
|
|
|
|
"\tis_active\x18\b \x01(\bR\bisActive\x12\x14\n" +
|
|
|
|
|
"\x05phone\x18\t \x01(\tR\x05phone\"G\n" +
|
|
|
|
|
"\rVerifyRequest\x12\x1a\n" +
|
|
|
|
|
"\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" +
|
|
|
|
|
"\bpassword\x18\x02 \x01(\tR\bpassword\"v\n" +
|
|
|
|
|
"\bpassword\x18\x02 \x01(\tR\bpassword\"\x7f\n" +
|
|
|
|
|
"\x0eVerifyResponse\x12\x18\n" +
|
|
|
|
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12#\n" +
|
|
|
|
|
"\rerror_message\x18\x02 \x01(\tR\ferrorMessage\x12%\n" +
|
|
|
|
|
"\x04user\x18\x03 \x01(\v2\x11.ldap.v1.UserDataR\x04user2Z\n" +
|
|
|
|
|
"\rerror_message\x18\x02 \x01(\tR\ferrorMessage\x12.\n" +
|
|
|
|
|
"\x04user\x18\x03 \x01(\v2\x1a.ldap_auth.v1.LdapUserDataR\x04user2Z\n" +
|
|
|
|
|
"\x0fLdapAuthService\x12G\n" +
|
|
|
|
|
"\n" +
|
|
|
|
|
"VerifyUser\x12\x1b.ldap_auth.v1.VerifyRequest\x1a\x1c.ldap_auth.v1.VerifyResponseB*Z(git.lendry.ru/lendry-erp/proto.git/go;pbb\x06proto3"
|
|
|
|
|
@@ -162,16 +280,16 @@ func file_sso_ldap_auth_proto_rawDescGZIP() []byte {
|
|
|
|
|
return file_sso_ldap_auth_proto_rawDescData
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var file_sso_ldap_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
|
|
|
|
var file_sso_ldap_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
|
|
|
|
var file_sso_ldap_auth_proto_goTypes = []any{
|
|
|
|
|
(*VerifyRequest)(nil), // 0: ldap_auth.v1.VerifyRequest
|
|
|
|
|
(*VerifyResponse)(nil), // 1: ldap_auth.v1.VerifyResponse
|
|
|
|
|
(*UserData)(nil), // 2: ldap.v1.UserData
|
|
|
|
|
(*LdapUserData)(nil), // 0: ldap_auth.v1.LdapUserData
|
|
|
|
|
(*VerifyRequest)(nil), // 1: ldap_auth.v1.VerifyRequest
|
|
|
|
|
(*VerifyResponse)(nil), // 2: ldap_auth.v1.VerifyResponse
|
|
|
|
|
}
|
|
|
|
|
var file_sso_ldap_auth_proto_depIdxs = []int32{
|
|
|
|
|
2, // 0: ldap_auth.v1.VerifyResponse.user:type_name -> ldap.v1.UserData
|
|
|
|
|
0, // 1: ldap_auth.v1.LdapAuthService.VerifyUser:input_type -> ldap_auth.v1.VerifyRequest
|
|
|
|
|
1, // 2: ldap_auth.v1.LdapAuthService.VerifyUser:output_type -> ldap_auth.v1.VerifyResponse
|
|
|
|
|
0, // 0: ldap_auth.v1.VerifyResponse.user:type_name -> ldap_auth.v1.LdapUserData
|
|
|
|
|
1, // 1: ldap_auth.v1.LdapAuthService.VerifyUser:input_type -> ldap_auth.v1.VerifyRequest
|
|
|
|
|
2, // 2: ldap_auth.v1.LdapAuthService.VerifyUser:output_type -> ldap_auth.v1.VerifyResponse
|
|
|
|
|
2, // [2:3] is the sub-list for method output_type
|
|
|
|
|
1, // [1:2] is the sub-list for method input_type
|
|
|
|
|
1, // [1:1] is the sub-list for extension type_name
|
|
|
|
|
@@ -184,14 +302,13 @@ func file_sso_ldap_auth_proto_init() {
|
|
|
|
|
if File_sso_ldap_auth_proto != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
file_sso_ldap_proto_init()
|
|
|
|
|
type x struct{}
|
|
|
|
|
out := protoimpl.TypeBuilder{
|
|
|
|
|
File: protoimpl.DescBuilder{
|
|
|
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
|
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_sso_ldap_auth_proto_rawDesc), len(file_sso_ldap_auth_proto_rawDesc)),
|
|
|
|
|
NumEnums: 0,
|
|
|
|
|
NumMessages: 2,
|
|
|
|
|
NumMessages: 3,
|
|
|
|
|
NumExtensions: 0,
|
|
|
|
|
NumServices: 1,
|
|
|
|
|
},
|
|
|
|
|
|