Brijesh's Git Server — argus_client @ c2cd3ed573cf2d9422ea4824206cdb18788bdac7

rpc/auth/service.proto (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
syntax = "proto3";

package auth;
option go_package = "argus-core/rpc/auth";

service AuthService {
  rpc Register(RegisterRequest) returns (RegisterResponse);
  rpc Login(LoginRequest) returns (LoginResponse);
  rpc ValidateToken(ValidateTokenRequest) returns (ValidateTokenResponse);
}

message RegisterRequest {
  string email = 1;
  string password = 2;
}

message RegisterResponse {
  User user = 1;
}

message LoginRequest {
  string email = 1;
  string password = 2;
}

message LoginResponse {
  string token = 1;
  User user = 2;
}

message ValidateTokenRequest {
  string token = 1;
}

message ValidateTokenResponse {
  User user = 1;
}

message User {
  string id = 1;
  string email = 2;
  string created_at = 3;
  string updated_at = 4;
}