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:
93
README.md
93
README.md
@@ -3,18 +3,23 @@
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [options/v1/options_v1.proto](#options_v1_options_v1-proto)
|
||||
- [AuthOptions](#options-v1-AuthOptions)
|
||||
|
||||
- [File-level Extensions](#options_v1_options_v1-proto-extensions)
|
||||
|
||||
- [accounts/v1/accounts_v1.proto](#accounts_v1_accounts_v1-proto)
|
||||
- [AccountData](#accounts-v1-AccountData)
|
||||
- [AccountPassword](#accounts-v1-AccountPassword)
|
||||
- [IsEmailVerifiedRequest](#accounts-v1-IsEmailVerifiedRequest)
|
||||
- [IsEmailVerifiedResponse](#accounts-v1-IsEmailVerifiedResponse)
|
||||
- [NewPasswordRequest](#accounts-v1-NewPasswordRequest)
|
||||
- [RefreshTokenRequest](#accounts-v1-RefreshTokenRequest)
|
||||
- [ResetPasswordRequest](#accounts-v1-ResetPasswordRequest)
|
||||
- [SignInRequest](#accounts-v1-SignInRequest)
|
||||
- [SignUpRequest](#accounts-v1-SignUpRequest)
|
||||
|
||||
- [AccountAuthService](#accounts-v1-AccountAuthService)
|
||||
- [AccountsNoAuthService](#accounts-v1-AccountsNoAuthService)
|
||||
- [AccountManagementService](#accounts-v1-AccountManagementService)
|
||||
|
||||
- [applications/v1/applications_v1.proto](#applications_v1_applications_v1-proto)
|
||||
- [ApplicationFull](#applications-ApplicationFull)
|
||||
@@ -71,6 +76,45 @@
|
||||
|
||||
|
||||
|
||||
<a name="options_v1_options_v1-proto"></a>
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## options/v1/options_v1.proto
|
||||
|
||||
|
||||
|
||||
<a name="options-v1-AuthOptions"></a>
|
||||
|
||||
### AuthOptions
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| auth | [bool](#bool) | | When set to false, the auth interceptor will be skiped on the backend |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="options_v1_options_v1-proto-extensions"></a>
|
||||
|
||||
### File-level Extensions
|
||||
| Extension | Type | Base | Number | Description |
|
||||
| --------- | ---- | ---- | ------ | ----------- |
|
||||
| auth_options | AuthOptions | .google.protobuf.MethodOptions | 50001 | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="accounts_v1_accounts_v1-proto"></a>
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
@@ -156,6 +200,21 @@ Protobuf definitions for the accounts service.
|
||||
|
||||
|
||||
|
||||
<a name="accounts-v1-RefreshTokenRequest"></a>
|
||||
|
||||
### RefreshTokenRequest
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| session_id | [string](#string) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="accounts-v1-ResetPasswordRequest"></a>
|
||||
|
||||
### ResetPasswordRequest
|
||||
@@ -179,8 +238,8 @@ Protobuf definitions for the accounts service.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| data | [AccountData](#accounts-v1-AccountData) | | |
|
||||
| password | [AccountPassword](#accounts-v1-AccountPassword) | | |
|
||||
| email | [string](#string) | | |
|
||||
| password | [string](#string) | | |
|
||||
|
||||
|
||||
|
||||
@@ -195,8 +254,8 @@ Protobuf definitions for the accounts service.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| data | [AccountData](#accounts-v1-AccountData) | | |
|
||||
| password | [AccountPassword](#accounts-v1-AccountPassword) | | |
|
||||
| email | [string](#string) | | |
|
||||
| password | [string](#string) | | |
|
||||
|
||||
|
||||
|
||||
@@ -209,29 +268,17 @@ Protobuf definitions for the accounts service.
|
||||
|
||||
|
||||
|
||||
<a name="accounts-v1-AccountAuthService"></a>
|
||||
<a name="accounts-v1-AccountManagementService"></a>
|
||||
|
||||
### AccountAuthService
|
||||
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
|
||||
|
||||
| Method Name | Request Type | Response Type | Description |
|
||||
| ----------- | ------------ | ------------- | ------------|
|
||||
| IsEmailVerified | [IsEmailVerifiedRequest](#accounts-v1-IsEmailVerifiedRequest) | [IsEmailVerifiedResponse](#accounts-v1-IsEmailVerifiedResponse) | Is email for the current account verified |
|
||||
|
||||
|
||||
<a name="accounts-v1-AccountsNoAuthService"></a>
|
||||
|
||||
### AccountsNoAuthService
|
||||
### AccountManagementService
|
||||
Service for handling accounts that do not require authentication
|
||||
|
||||
| Method Name | Request Type | Response Type | Description |
|
||||
| ----------- | ------------ | ------------- | ------------|
|
||||
| SignUp | [SignUpRequest](#accounts-v1-SignUpRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Create a new user |
|
||||
| SignIn | [SignInRequest](#accounts-v1-SignInRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Sing in into an existing account |
|
||||
| ResetPassword | [ResetPasswordRequest](#accounts-v1-ResetPasswordRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Reset the password, if it was lost |
|
||||
| NewPassword | [NewPasswordRequest](#accounts-v1-NewPasswordRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Set the new password after reset |
|
||||
| RefreshToken | [.google.protobuf.Empty](#google-protobuf-Empty) | [.google.protobuf.Empty](#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 |
|
||||
| SignUp | [SignUpRequest](#accounts-v1-SignUpRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Create a new account |
|
||||
| IsEmailVerified | [IsEmailVerifiedRequest](#accounts-v1-IsEmailVerifiedRequest) | [IsEmailVerifiedResponse](#accounts-v1-IsEmailVerifiedResponse) | Is email for the current account verified |
|
||||
| RefreshSession | [.google.protobuf.Empty](#google-protobuf-Empty) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user