Files
osirose-new/proto/auth.proto
raven a8755bd3de Add comprehensive documentation and unit tests
Documentation:
- Add detailed README files for all services (auth, character, database, launcher, packet, utils, world)
- Create API documentation for the database service with detailed endpoint specifications
- Document database schema and relationships
- Add service architecture overviews and configuration instructions

Unit Tests:
- Implement comprehensive test suite for database repositories (user, character, session)
- Add gRPC service tests for database interactions
- Create tests for packet service components (bufferpool, connection, packets)
- Add utility service tests (health check, logging, load balancer, redis cache, service discovery)
- Implement auth service user tests
- Add character service tests

Code Structure:
- Reorganize test files into a more consistent structure
- Create a dedicated tests crate for integration testing
- Add test helpers and mock implementations for easier testing
2025-04-09 13:29:53 -04:00

56 lines
1.0 KiB
Protocol Buffer

syntax = "proto3";
package auth;
import "common.proto";
service AuthService {
rpc Login(LoginRequest) returns (LoginResponse);
rpc Logout(LogoutRequest) returns (common.Empty);
rpc ValidateToken(ValidateTokenRequest) returns (ValidateTokenResponse);
rpc ValidateSession(ValidateSessionRequest) returns (ValidateSessionResponse);
rpc RefreshSession(ValidateSessionRequest) returns (RefreshSessionResponse);
}
message LoginRequest {
string username = 1;
string password = 2;
string ip_address = 3;
}
message LoginResponse {
string token = 1;
string user_id = 2;
string session_id = 3;
}
message LogoutRequest {
string session_id = 1;
}
message ValidateTokenRequest {
string token = 1;
}
message ValidateTokenResponse {
bool valid = 1;
string user_id = 2;
string session_id = 3;
}
message ValidateSessionRequest {
string session_id = 1;
}
message ValidateSessionResponse {
bool valid = 1;
string session_id = 2;
string user_id = 3;
}
message RefreshSessionResponse {
bool valid = 1;
}