diff --git a/proto/users/users.proto b/proto/users/users.proto index 94b7543231d5f5c43acf86862e5ca9b8bb67a367..c45f4fec1e283ed260c5b76264ae1d60a58083ca 100644 --- a/proto/users/users.proto +++ b/proto/users/users.proto @@ -29,6 +29,15 @@ message Filter { google.protobuf.BoolValue system = 10; } +message LoginRequest { + string email = 1; + string identity = 2; +} + +message LoginResponse { + User user = 1; +} + message CreateRequest { User create = 1; } @@ -73,7 +82,14 @@ message GetByIdentityResponse { User user = 1; } + service Users { + // Метод для авторизации пользователя. Возвращает информацию о пользователе + // Пользователь может быть авторизован в разных системах IdP, поэтому + // авторизация происходит по email и identity. Если для одного email есть + // несколько identity, то они будут объединены в одного пользователя + rpc Login(LoginRequest) returns(LoginResponse) {} + // Создание пользователя или регистрация текущего пользователя в системе, если create.id == `current` rpc Create(CreateRequest) returns(CreateResponse) {}