Move auth logic to options
Some checks failed
ci/woodpecker/push/go-generate Pipeline was successful
ci/woodpecker/push/dart-generate Pipeline was successful
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/js-generate Pipeline was successful
ci/woodpecker/push/repo-checks Pipeline was successful
Some checks failed
ci/woodpecker/push/go-generate Pipeline was successful
ci/woodpecker/push/dart-generate Pipeline was successful
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/js-generate Pipeline was successful
ci/woodpecker/push/repo-checks Pipeline was successful
Signed-off-by: Nikolai Rodionov <allanger@badhouseplants.net>
This commit is contained in:
@@ -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) {}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user