Start updating proto definitions
Some checks failed
Some checks failed
Signed-off-by: Nikolai Rodionov <iam@allanger.xyz>
This commit is contained in:
2
buf.yaml
2
buf.yaml
@@ -7,5 +7,5 @@ lint:
|
||||
- STANDARD
|
||||
enum_zero_value_suffix: _UNSPECIFIED
|
||||
rpc_allow_same_request_response: true
|
||||
rpc_allow_google_protobuf_empty_requests: false
|
||||
rpc_allow_google_protobuf_empty_requests: true
|
||||
rpc_allow_google_protobuf_empty_responses: true
|
||||
|
||||
@@ -1,17 +1,33 @@
|
||||
/// This file has messages for describing environments
|
||||
/// Protobuf definitions for the accounts service.
|
||||
syntax = "proto3";
|
||||
package accounts.v1;
|
||||
import "google/protobuf/empty.proto";
|
||||
option go_package = "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/accounts/v1";
|
||||
|
||||
/**
|
||||
* Service for handling environments
|
||||
* Service for handling accounts that do not require authentication
|
||||
*/
|
||||
service AccountsService {
|
||||
service AccountsNoAuthService {
|
||||
// Create a new user
|
||||
rpc SignUp (SignUpRequest) returns (google.protobuf.Empty) {}
|
||||
// Sing in into an existing account
|
||||
rpc SignIn (SignInRequest) returns (google.protobuf.Empty) {}
|
||||
// Reset the password, if it was lost
|
||||
rpc ResetPassword (ResetPasswordRequest) returns (google.protobuf.Empty) {}
|
||||
// Set the new password after reset
|
||||
rpc NewPassword (NewPasswordRequest) returns (google.protobuf.Empty) {}
|
||||
// Send the refresh token request, token should be passed in the metadata.
|
||||
// This rpc does requier auth, but it should be handled not on the middleware level,
|
||||
// that's why it set in the NoAuth service
|
||||
rpc RefreshToken (google.protobuf.Empty) returns (google.protobuf.Empty) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Service for handling accounts that do require authentication
|
||||
* Tokens should be sent via metadata, so the service is able to authenticate a user for a request
|
||||
*/
|
||||
service AccountAuthService {
|
||||
// Is email for the current account verified
|
||||
rpc IsEmailVerified (IsEmailVerifiedRequest) returns (IsEmailVerifiedResponse) {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user