feat: login answers with your user

This commit is contained in:
əlemi 2024-08-22 01:01:25 +02:00
parent bfadf378f8
commit 334389360e
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -7,7 +7,7 @@ import "common.proto";
// service entrypoint, authenticate users and grant initial token
service Auth {
// 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
rpc Refresh (common.Token) returns (common.Token);
@ -17,3 +17,8 @@ message LoginRequest {
required string username = 1;
required string password = 2;
}
message LoginResponse {
required common.Token token = 1;
required common.User user = 2;
}