2 Commits

Author SHA1 Message Date
lendry
3319b124df first commit
Some checks failed
Publish / Publish Job (push) Has been cancelled
2026-04-21 16:04:58 +03:00
lendry
465ed43531 add oauth 2026-04-21 16:01:19 +03:00

View File

@@ -14,6 +14,10 @@ service AuthService {
rpc GetSessions(GetSessionRequest) returns (GetSessionsResponse);
rpc TerminateSession(TerminateSessionRequest) returns (TerminateSessionResponse);
// === OAuth2 SSO ===
rpc GenerateOauthCode (GenerateOauthCodeRequest) returns (GenerateOauthCodeResponse);
rpc ExchangeOauthCode (ExchangeOauthCodeRequest) returns (ExchangeOauthCodeResponse);
// Системные методы для админа
rpc SystemCreateAccount (SystemCreateAccountRequest) returns (SystemCreateAccountResponse);
rpc SystemChangeStatus (SystemChangeStatusRequest) returns (SystemChangeStatusResponse);
@@ -113,6 +117,28 @@ message TerminateSessionResponse {
string message = 2;
}
// === Сообщения для OAuth2 SSO ===
message GenerateOauthCodeRequest {
string user_id = 1;
}
message GenerateOauthCodeResponse {
string code = 1;
}
message ExchangeOauthCodeRequest {
string code = 1;
string client_id = 2;
string client_secret = 3;
}
message ExchangeOauthCodeResponse {
string access_token = 1;
int32 expires_in = 2;
}
message SystemCreateAccountRequest {
string username = 1;
string password_hash = 2; // Хеш пароля генерирует Admin Service и передает сюда