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:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user