mirror of
https://github.com/hexedtech/codemp-proto.git
synced 2024-11-22 07:24:50 +01:00
feat: login answers with your user
This commit is contained in:
parent
bfadf378f8
commit
334389360e
1 changed files with 6 additions and 1 deletions
|
@ -7,7 +7,7 @@ import "common.proto";
|
||||||
// service entrypoint, authenticate users and grant initial token
|
// service entrypoint, authenticate users and grant initial token
|
||||||
service Auth {
|
service Auth {
|
||||||
// send credentials, returns empty valid token
|
// send credentials, returns empty valid token
|
||||||
rpc Login (LoginRequest) returns (common.Token);
|
rpc Login (LoginRequest) returns (LoginResponse);
|
||||||
|
|
||||||
// if given token has just expired, get a new valid one
|
// if given token has just expired, get a new valid one
|
||||||
rpc Refresh (common.Token) returns (common.Token);
|
rpc Refresh (common.Token) returns (common.Token);
|
||||||
|
@ -17,3 +17,8 @@ message LoginRequest {
|
||||||
required string username = 1;
|
required string username = 1;
|
||||||
required string password = 2;
|
required string password = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message LoginResponse {
|
||||||
|
required common.Token token = 1;
|
||||||
|
required common.User user = 2;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue