feat(api-key): Allow revoking in the future, and enforce the secret key (#6484)

Since there is quite a bit of code here already, I'll do the middleware changes in a separate PR
This commit is contained in:
Stevche Radevski
2024-02-27 11:37:32 +01:00
committed by GitHub
parent ca463ae9a9
commit 690e8c2e09
13 changed files with 357 additions and 120 deletions
@@ -3,6 +3,7 @@ import { Type } from "class-transformer"
import {
IsArray,
IsEnum,
IsNumber,
IsOptional,
IsString,
ValidateNested,
@@ -65,6 +66,10 @@ export class AdminPostApiKeysApiKeyReq {
title: string
}
export class AdminRevokeApiKeysApiKeyReq {}
export class AdminRevokeApiKeysApiKeyReq {
@IsOptional()
@IsNumber()
revoke_in?: number
}
export class AdminDeleteApiKeysApiKeyReq {}