From 2b8987cab4841d891bcf52defa1745a8b3d2d233 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Fri, 8 May 2026 19:17:06 +0000 Subject: [PATCH] Implement Internal Auth (#5) Reviewed-on: https://gitea.badhouseplants.net/softplayer/softplayer-proto/pulls/5 Co-authored-by: Nikolai Rodionov Co-committed-by: Nikolai Rodionov --- proto/accounts/v1/accounts_v1.proto | 17 ++++++++++++----- proto/applications/v1/applications_v1.proto | 4 ++-- proto/email/v1/email_v1.proto | 3 +-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/proto/accounts/v1/accounts_v1.proto b/proto/accounts/v1/accounts_v1.proto index af1ef9a..1d38bdb 100644 --- a/proto/accounts/v1/accounts_v1.proto +++ b/proto/accounts/v1/accounts_v1.proto @@ -10,6 +10,10 @@ option go_package = "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg service AccountsNoAuthService { // Sing in into an existing account rpc SignIn (SignInRequest) returns (google.protobuf.Empty) {} + // Create a new account + rpc SignUp (SignUpRequest) returns (google.protobuf.Empty) {} + // RefreshToken doesn't use regular auth methods + rpc RefreshToken (RefreshTokenRequest) returns (google.protobuf.Empty) {} } /** @@ -19,7 +23,6 @@ service AccountsNoAuthService { service AccountsAuthService { // Is email for the current account verified rpc IsEmailVerified (IsEmailVerifiedRequest) returns (IsEmailVerifiedResponse) {} - rpc RefreshToken (google.protobuf.Empty) returns (google.protobuf.Empty) {} } message AccountPassword { @@ -32,13 +35,13 @@ message AccountData { } message SignUpRequest { - AccountData data = 1; - AccountPassword password = 2; + string email = 1; + string password = 2; } message SignInRequest { - string code = 1; - string verifier = 2; + string email = 1; + string password = 2; }; message ResetPasswordRequest { @@ -58,3 +61,7 @@ message IsEmailVerifiedRequest { message IsEmailVerifiedResponse { bool verified = 1; } + +message RefreshTokenRequest { + string session_id = 1; +} diff --git a/proto/applications/v1/applications_v1.proto b/proto/applications/v1/applications_v1.proto index 0972545..d663279 100644 --- a/proto/applications/v1/applications_v1.proto +++ b/proto/applications/v1/applications_v1.proto @@ -74,7 +74,7 @@ message ApplicationId { } message ApplicationMetadata { - string name = 1; + string name = 1; string description = 2; } @@ -82,7 +82,7 @@ message ApplicationSpec { string application = 1; string version = 2; string environemnt_id = 3; - map config = 4; + map config = 4; string raw_config = 5; } diff --git a/proto/email/v1/email_v1.proto b/proto/email/v1/email_v1.proto index 41e78a4..0e7c13f 100644 --- a/proto/email/v1/email_v1.proto +++ b/proto/email/v1/email_v1.proto @@ -3,7 +3,7 @@ package email; import "google/protobuf/empty.proto"; option go_package = "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/email"; -/* +/* * A service that should handle email validation */ service EmailValidation { @@ -19,4 +19,3 @@ message ConfirmValidation { string user_id = 1; int32 code = 2; } -