summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sellershut-core/proto/auth/auth.proto34
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/sellershut-core/proto/auth/auth.proto b/lib/sellershut-core/proto/auth/auth.proto
index 5e340b3..65792bf 100644
--- a/lib/sellershut-core/proto/auth/auth.proto
+++ b/lib/sellershut-core/proto/auth/auth.proto
@@ -14,6 +14,17 @@ message User {
google.protobuf.Timestamp created_at = 3;
// Timestamp for when the user was last updated
google.protobuf.Timestamp updated_at = 4;
+ // Private key
+ string private_key = 5;
+}
+
+message Account {
+ // Unique identifier for the user
+ string provider_id = 1;
+ // Email address of the user
+ string provider_user_id = 2;
+ // Email address of the user
+ string user_id = 3;
}
// Define a message for sending a token to be validated
@@ -28,8 +39,31 @@ message ValidationResponse {
bool valid = 1;
}
+// Define a message for the result of a token validation
+message RegisterUserResponse {
+ // Indicates whether the token is valid
+ string profile_id = 1;
+ // Indicates whether the token is valid
+ string auth_id = 2;
+}
+
+// Define a message for the result of a token validation
+message RegisterUserRequest {
+ // Indicates whether the token is valid
+ string email = 1;
+ message AccountDetails {
+ // Unique identifier for the user
+ string provider_id = 1;
+ // Email address of the user
+ string provider_user_id = 2;
+ }
+ optional AccountDetails account = 2;
+}
+
// Define the AuthServer gRPC service
service Auth {
// Validate a token
rpc ValidateAuthToken (ValidationRequest) returns (ValidationResponse);
+ // Register User
+ rpc RegisterUser (RegisterUserRequest) returns (RegisterUserResponse);
}