diff options
author | rtkay123 <dev@kanjala.com> | 2025-07-25 18:37:28 +0200 |
---|---|---|
committer | rtkay123 <dev@kanjala.com> | 2025-07-25 18:37:28 +0200 |
commit | 3831e5a42ab4e21f116537c5251582245de37f0b (patch) | |
tree | de6b5e41b6bbac7c48f617a293a670cdbd43c77a /lib/sellershut-core/proto | |
parent | cd528dbb7fb5d596b47178110a3dcef9af573c8d (diff) | |
download | sellershut-3831e5a42ab4e21f116537c5251582245de37f0b.tar.bz2 sellershut-3831e5a42ab4e21f116537c5251582245de37f0b.zip |
feat(lib): auth rpc
Diffstat (limited to 'lib/sellershut-core/proto')
-rw-r--r-- | lib/sellershut-core/proto/auth/auth.proto | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/sellershut-core/proto/auth/auth.proto b/lib/sellershut-core/proto/auth/auth.proto new file mode 100644 index 0000000..5e340b3 --- /dev/null +++ b/lib/sellershut-core/proto/auth/auth.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package auth; + +import "google/protobuf/timestamp.proto"; + +// A message representing a user +message User { + // Unique identifier for the user + string id = 1; + // Email address of the user + string email = 2; + // Timestamp for when the user was created + google.protobuf.Timestamp created_at = 3; + // Timestamp for when the user was last updated + google.protobuf.Timestamp updated_at = 4; +} + +// Define a message for sending a token to be validated +message ValidationRequest { + // The token to validate + string token = 1; +} + +// Define a message for the result of a token validation +message ValidationResponse { + // Indicates whether the token is valid + bool valid = 1; +} + +// Define the AuthServer gRPC service +service Auth { + // Validate a token + rpc ValidateAuthToken (ValidationRequest) returns (ValidationResponse); +} |