diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sellershut-core/proto/auth/auth.proto | 13 | ||||
-rw-r--r-- | lib/sellershut-core/proto/users/users.proto | 19 |
2 files changed, 32 insertions, 0 deletions
diff --git a/lib/sellershut-core/proto/auth/auth.proto b/lib/sellershut-core/proto/auth/auth.proto index 65792bf..5271d15 100644 --- a/lib/sellershut-core/proto/auth/auth.proto +++ b/lib/sellershut-core/proto/auth/auth.proto @@ -40,6 +40,17 @@ message ValidationResponse { } // Define a message for the result of a token validation +message GetPrivateKeyRequest { + // Indicates whether the token is valid + string email = 1; +} +// Define a message for the result of a token validation +message GetPrivateKeyResponse { + // Indicates whether the token is valid + string private_key = 1; +} + +// Define a message for the result of a token validation message RegisterUserResponse { // Indicates whether the token is valid string profile_id = 1; @@ -66,4 +77,6 @@ service Auth { rpc ValidateAuthToken (ValidationRequest) returns (ValidationResponse); // Register User rpc RegisterUser (RegisterUserRequest) returns (RegisterUserResponse); + // Register User + rpc GetPrivateKey (GetPrivateKeyRequest) returns (GetPrivateKeyResponse); } diff --git a/lib/sellershut-core/proto/users/users.proto b/lib/sellershut-core/proto/users/users.proto index bbc8188..02cf338 100644 --- a/lib/sellershut-core/proto/users/users.proto +++ b/lib/sellershut-core/proto/users/users.proto @@ -5,10 +5,15 @@ package users; import "google/protobuf/timestamp.proto"; enum UserType { + // Person PERSON = 0; + // Application APPLICATION = 1; + // Group GROUP = 2; + // Organisation ORGANIZATION = 3; + // Service SERVICE = 4; } @@ -76,10 +81,24 @@ message CompleteUserRequest { UserType user_type = 8; } +// Message to get user +message GetUserRequest { + // ID of the user to get + string id = 1; +} + +// Message to get user +message GetUserResponse { + // ID of the user to get + User user = 1; +} + // Users gRPC service service UsersService { // Create a new user rpc CreateUser (CreateUserRequest) returns (CreateUserResponse); // Complete user rpc CompleteUser (CompleteUserRequest) returns (User); + // Get User + rpc GetUser (GetUserRequest) returns (GetUserResponse); } |