Compare commits
2 Commits
9a7073c8ae
...
3319b124df
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3319b124df | ||
|
|
465ed43531 |
@@ -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 и передает сюда
|
||||
|
||||
Reference in New Issue
Block a user