feat(api-tokens): add ability to roll (regenerate) API token secrets and UI to display the newly generated token once

This commit is contained in:
2026-02-27 10:24:20 +00:00
parent 56f41d70b3
commit dee6897931
8 changed files with 144 additions and 2 deletions

View File

@@ -63,6 +63,26 @@ export interface IReq_RevokeApiToken extends plugins.typedrequestInterfaces.impl
};
}
/**
* Roll (regenerate) an API token's secret. Returns the new raw token value once.
* Admin JWT only.
*/
export interface IReq_RollApiToken extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IReq_RollApiToken
> {
method: 'rollApiToken';
request: {
identity?: authInterfaces.IIdentity;
id: string;
};
response: {
success: boolean;
tokenValue?: string;
message?: string;
};
}
/**
* Enable or disable an API token.
*/