refactor all proto files

This commit is contained in:
Дмитрий
2026-04-02 20:10:53 +03:00
parent dbf71f91ef
commit 31d02ab7d8
13 changed files with 285 additions and 4820 deletions

45
proto/ldap-auth.proto Normal file
View File

@@ -0,0 +1,45 @@
syntax = "proto3";
package ldap_auth.v1;
option go_package = "git.lendry.ru/lendry-erp/proto.git/go;pb";
service LdapAuthService {
rpc VerifyUser (VerifyRequest) returns (VerifyResponse);
}
// ==========================================
// БАЗОВЫЕ И ПЕРЕИСПОЛЬЗУЕМЫЕ СТРУКТУРЫ
// ==========================================
// Полная модель пользователя
message UserData {
string dn = 1; // Полный путь в AD (Distinguished Name)
string username = 2; // Логин (sAMAccountName)
string display_name = 3; // ФИО (displayName)
string email = 4; // Почта (mail)
string description = 5; // Описание/Должность (description)
bytes avatar = 6; // Аватарка в байтах (thumbnailPhoto)
repeated string groups = 7; // Список групп
bool is_active = 8; // Статус аккаунта
}
// ==========================================
// ЗАПРОСЫ И ОТВЕТЫ (REQUESTS / RESPONSES)
// ==========================================
// --- Авторизация ---
message VerifyRequest {
string username = 1;
string password = 2;
}
message VerifyResponse {
bool success = 1;
string error_message = 2;
UserData user = 3; // Отдаем полные данные при успешном входе
}