- update: auth system to work with the website auth

This commit is contained in:
2025-03-16 01:35:44 -04:00
parent cbd71d1ab1
commit cf9efc9866
11 changed files with 93 additions and 219 deletions

View File

@@ -23,7 +23,7 @@ message CharacterListResponse {
}
message CreateCharacterRequest {
int32 user_id = 1;
string user_id = 1;
string name = 2;
string inventory = 3; // JSON serialized
string skills = 4; // JSON serialized
@@ -50,7 +50,7 @@ message DeleteCharacterResponse {
message Character {
int32 id = 1;
int32 user_id = 2;
string user_id = 2;
string name = 3;
int64 money = 4;
string inventory = 6;

View File

@@ -3,38 +3,26 @@ syntax = "proto3";
package user_db_api;
service UserService {
rpc GetUser(GetUserRequest) returns (GetUserResponse);
rpc CreateUser(CreateUserRequest) returns (CreateUserResponse);
rpc GetUserByUsername(GetUserByUsernameRequest) returns (GetUserResponse);
rpc GetUserByEmail(GetUserByEmailRequest) returns (GetUserResponse);
rpc GetUser(GetUserRequest) returns (GetUserResponse);
rpc GetUserByUsername(GetUserByUsernameRequest) returns (GetUserResponse);
rpc GetUserByEmail(GetUserByEmailRequest) returns (GetUserResponse);
}
message GetUserRequest {
int32 user_id = 1;
int32 user_id = 1;
}
message GetUserByUsernameRequest {
string username = 1;
string username = 1;
}
message GetUserByEmailRequest {
string email = 1;
string email = 1;
}
message GetUserResponse {
int32 user_id = 1;
string username = 2;
string email = 3;
string hashed_password = 4;
repeated string roles = 5;
}
message CreateUserRequest {
string username = 1;
string email = 2;
string hashed_password = 3;
}
message CreateUserResponse {
int32 user_id = 1;
int32 user_id = 1;
string username = 2;
string email = 3;
string role = 4;
}