Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an endpoint to refresh an API key's token without creating a new API key #241

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions apikeys.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ service ApiKeyService {
// cannot be used until the user has been redirected to the given URL which
// allows Auth0 to actually generate an access token
rpc CreateAPIKey(CreateAPIKeyRequest) returns (CreateAPIKeyResponse);
// Refreshes an API key, returning a new one with the same metadata and
// properties. The response will be the same as CreateAPIKey, and requires
// the same redirect handling to authenticate the new key.
rpc RefreshAPIKey(RefreshAPIKeyRequest) returns (RefreshAPIKeyResponse);
rpc GetAPIKey(GetAPIKeyRequest) returns (GetAPIKeyResponse);
rpc UpdateAPIKey(UpdateAPIKeyRequest) returns (UpdateAPIKeyResponse);
rpc ListAPIKeys(ListAPIKeysRequest) returns (ListAPIKeysResponse);
Expand Down Expand Up @@ -141,6 +145,18 @@ message CreateAPIKeyResponse {
string authorizeURL = 2;
}

message RefreshAPIKeyRequest {
// The UUID of the API key to refresh
bytes uuid = 1;
}

message RefreshAPIKeyResponse {
// Refreshing the API key will return the same response as CreateAPIKey, as
// it is basically the a new Key, just under the same UUID and reusing the
// old info.
CreateAPIKeyResponse response = 1;
}

message GetAPIKeyRequest {
// The UUID of the API Key to get
bytes uuid = 1;
Expand Down
Loading