token-guardian
Version:
A comprehensive solution for protecting and managing API tokens and secrets
27 lines (26 loc) • 725 B
TypeScript
import { RotationResult } from '../interfaces/RotationResult';
import { RotationStrategy } from './RotationStrategy';
/**
* Manages token rotation using different rotation strategies
*/
export declare class TokenRotator {
private readonly logger;
private readonly rotators;
constructor();
/**
* Initialize default rotators
*/
private initializeRotators;
/**
* Register a custom rotator
*/
registerRotator(name: string, rotator: RotationStrategy): void;
/**
* Get a registered rotator
*/
getRotator(name?: string): RotationStrategy;
/**
* Rotate a token using the specified rotator
*/
rotateToken(token: string): Promise<RotationResult>;
}