add frontend support for api token create, delete and revoke

This commit is contained in:
Gregor Vostrak
2025-02-11 17:57:00 +01:00
parent a9d9c13846
commit e0506fa3e3
9 changed files with 488 additions and 41 deletions

View File

@@ -37,6 +37,8 @@ class ApiTokenController extends Controller
* The response will contain the access token that can be used to send authenticated API requests.
* Please note that the access token is only shown in this response and cannot be retrieved later.
*
* @operationId createApiToken
*
* @throws AuthorizationException
*/
public function store(ApiTokenStoreRequest $request): ApiTokenWithAccessTokenResource
@@ -53,6 +55,8 @@ class ApiTokenController extends Controller
/**
* Revoke an api token
*
* @operationId revokeApiToken
*
* @throws AuthorizationException
*/
public function revoke(string $apiTokenId): JsonResponse
@@ -69,6 +73,8 @@ class ApiTokenController extends Controller
/**
* Delete an api token
*
* @operationId deleteApiToken
*
* @throws AuthorizationException
*/
public function destroy(string $apiTokenId): JsonResponse