rbac from the server used in the client from now on
This commit is contained in:
@@ -7,6 +7,7 @@ import "common.proto";
|
||||
service AuthService {
|
||||
rpc Register(RegisterRequest) returns (AuthResponse);
|
||||
rpc Login(LoginRequest) returns (LoginResponse);
|
||||
rpc GetAuthorization(GetAuthorizationRequest) returns (AuthorizationSnapshot);
|
||||
}
|
||||
|
||||
message RegisterRequest {
|
||||
@@ -36,4 +37,17 @@ message LoginResponse {
|
||||
string user_id = 4; // User's UUID in string format
|
||||
string role = 5; // User's role
|
||||
string username = 6;
|
||||
AuthorizationSnapshot authorization = 7;
|
||||
}
|
||||
|
||||
message GetAuthorizationRequest {}
|
||||
|
||||
message Permission {
|
||||
string resource = 1;
|
||||
string action = 2;
|
||||
}
|
||||
|
||||
message AuthorizationSnapshot {
|
||||
string role = 1;
|
||||
repeated Permission permissions = 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user