From cc0845f68e156fcf8d77ef055f529fae53d41525 Mon Sep 17 00:00:00 2001 From: itzaname Date: Thu, 28 Nov 2024 00:12:09 -0500 Subject: [PATCH] Add auth service protobuf --- auth.proto | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 auth.proto diff --git a/auth.proto b/auth.proto new file mode 100644 index 0000000..bf9eed6 --- /dev/null +++ b/auth.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; + +option go_package = "git.itzana.me/strafesnet/go-grpc/auth"; + +package auth; + +service AuthService { + rpc GetSession(IdMessage) returns (SessionResponse); + rpc GetGroupRole(IdMessage) returns (RoleReponse); + rpc ValidateSession(IdMessage) returns (ValidateResponse); +} + +message IdMessage { + string SessionID = 1; +} + +message SessionResponse { + string SessionID = 1; + uint64 UserID = 2; + string Username = 3; + uint64 Created = 4; + uint64 Expires = 5; +} + +message RoleReponse { + uint32 Role = 1; +} + +message ValidateResponse { + bool Valid = 1; +} \ No newline at end of file