From 2431d438e5bb9efe977d4ca2a3572a1a67afc9e8 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Sun, 10 May 2026 18:56:08 +0200 Subject: [PATCH] Move auth logic to options Signed-off-by: Nikolai Rodionov --- proto/accounts/v1/accounts_v1.proto | 13 ++----------- proto/options/v1/options_v1.proto | 13 ------------- 2 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 proto/options/v1/options_v1.proto diff --git a/proto/accounts/v1/accounts_v1.proto b/proto/accounts/v1/accounts_v1.proto index ed29d6e..b9f2f9f 100644 --- a/proto/accounts/v1/accounts_v1.proto +++ b/proto/accounts/v1/accounts_v1.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package accounts.v1; import "google/protobuf/empty.proto"; -import "options/v1/options_v1.proto"; option go_package = "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/accounts/v1"; /** @@ -10,17 +9,9 @@ option go_package = "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg */ service AccountManagementService { // Sing in into an existing account - rpc SignIn (SignInRequest) returns (google.protobuf.Empty) { - option (options.v1.auth_options) = { - auth: true - }; - } + rpc SignIn (SignInRequest) returns (google.protobuf.Empty) {} // Create a new account - rpc SignUp (SignUpRequest) returns (google.protobuf.Empty) { - option (options.v1.auth_options) = { - auth: true - }; - } + rpc SignUp (SignUpRequest) returns (google.protobuf.Empty) {} // Is email for the current account verified rpc IsEmailVerified (IsEmailVerifiedRequest) returns (IsEmailVerifiedResponse) {} rpc RefreshSession (google.protobuf.Empty) returns (google.protobuf.Empty) {} diff --git a/proto/options/v1/options_v1.proto b/proto/options/v1/options_v1.proto deleted file mode 100644 index f76418e..0000000 --- a/proto/options/v1/options_v1.proto +++ /dev/null @@ -1,13 +0,0 @@ -syntax = "proto3"; -package options.v1; -import "google/protobuf/descriptor.proto"; -option go_package = "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/options/v1"; - -message AuthOptions { - // When set to false, the auth interceptor will be skiped on the backend - bool auth = 1; -} - -extend google.protobuf.MethodOptions { - AuthOptions auth_options = 50001; -}