add admin methods
All checks were successful
Publish / Publish Job (push) Successful in 2m26s

This commit is contained in:
Дмитрий
2026-04-11 21:10:31 +03:00
parent bd2ccecd5d
commit 284059d19d
3 changed files with 101 additions and 33 deletions

View File

@@ -13,7 +13,11 @@ service AuthService {
rpc LogoutOther (LogoutRequest) returns (LogoutResponse);
rpc GetSessions(GetSessionRequest) returns (GetSessionsResponse);
rpc TerminateSession(TerminateSessionRequest) returns (TerminateSessionResponse);
rpc SystemCreateAccount (SystemCreateAccountRequest) returns (SystemCreateAccountResponse);
rpc SystemChangeStatus (SystemChangeStatusRequest) returns (SystemChangeStatusResponse);
rpc SystemUpdatePassword (SystemUpdatePasswordRequest) returns (SystemUpdatePasswordResponse);
rpc SystemUpdatePin (SystemUpdatePinRequest) returns (SystemUpdatePinResponse);
}
message LoginRequest {
@@ -101,4 +105,31 @@ message TerminateSessionResponse {
string message = 2;
}
message SystemCreateAccountRequest {
string username = 1;
string password_hash = 2; // Хеш пароля генерирует Admin Service и передает сюда
bool is_ldap = 3;
}
message SystemCreateAccountResponse {
string account_id = 1;
}
message SystemChangeStatusRequest {
string account_id = 1;
string status = 2; // 'ACTIVE', 'BLOCKED', 'DELETED'
}
message SystemChangeStatusResponse { bool success = 1; }
message SystemUpdatePasswordRequest {
string account_id = 1;
string new_password_hash = 2;
}
message SystemUpdatePasswordResponse { bool success = 1; }
message SystemUpdatePinRequest {
string account_id = 1;
optional string pin_hash = 2; // null если удаляем
}
message SystemUpdatePinResponse { bool success = 1; }