Update the token auth method

Signed-off-by: Nikolai Rodionov <iam@allanger.xyz>
This commit is contained in:
2026-05-14 19:38:23 +02:00
parent 3b984ff0c2
commit 0c7ba3e42a
2 changed files with 22 additions and 1 deletions

View File

@@ -29,6 +29,7 @@
- [TestService](#test-v1-TestService)
- [tokens/v1/tokens_v1.proto](#tokens_v1_tokens_v1-proto)
- [AuthenticateWithTokenRequest](#tokens-v1-AuthenticateWithTokenRequest)
- [CreateTokenRequest](#tokens-v1-CreateTokenRequest)
- [CreateTokenResponse](#tokens-v1-CreateTokenResponse)
- [ForceTokenExpirationRequest](#tokens-v1-ForceTokenExpirationRequest)
@@ -347,6 +348,21 @@ Service for handling environments
Protobuf definitions for the accounts service.
<a name="tokens-v1-AuthenticateWithTokenRequest"></a>
### AuthenticateWithTokenRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| token_value | [TokenValue](#tokens-v1-TokenValue) | | |
<a name="tokens-v1-CreateTokenRequest"></a>
### CreateTokenRequest
@@ -638,6 +654,7 @@ For example CLI or terraform modules
| GetToken | [GetTokenRequest](#tokens-v1-GetTokenRequest) | [GetTokenResponse](#tokens-v1-GetTokenResponse) | Get an existing token |
| ListTokens | [.google.protobuf.Empty](#google-protobuf-Empty) | [ListTokensResponse](#tokens-v1-ListTokensResponse) stream | List all existing tokens |
| ListPermissions | [.google.protobuf.Empty](#google-protobuf-Empty) | [ListPermissionsResponse](#tokens-v1-ListPermissionsResponse) stream | List all available permissions |
| AuthenticateWithToken | [AuthenticateWithTokenRequest](#tokens-v1-AuthenticateWithTokenRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Recieve a JWT access token |

View File

@@ -23,7 +23,7 @@ service TokensService {
// List all available permissions
rpc ListPermissions (google.protobuf.Empty) returns (stream ListPermissionsResponse) {}
// Recieve a JWT access token
rcp AuthenticateWithToken(google.protobuf.Empty) returns (google.protobuf.Empty) {}
rpc AuthenticateWithToken(AuthenticateWithTokenRequest) returns (google.protobuf.Empty) {}
}
message TokenMetadata {
@@ -111,3 +111,7 @@ message ListTokensResponse {
message ListPermissionsResponse {
TokenPermissions permissions = 1;
}
message AuthenticateWithTokenRequest {
TokenValue token_value = 1;
}