Files
micro-service-api/node_modules/@redis/client/dist/lib/authx/token.d.ts
2025-11-11 12:36:06 +07:00

15 lines
485 B
TypeScript

/**
* A token that can be used to authenticate with a service.
*/
export declare class Token<T> {
readonly value: T;
readonly expiresAtMs: number;
readonly receivedAtMs: number;
constructor(value: T, expiresAtMs: number, receivedAtMs: number);
/**
* Returns the time-to-live of the token in milliseconds.
* @param now The current time in milliseconds since the Unix epoch.
*/
getTtlMs(now: number): number;
}
//# sourceMappingURL=token.d.ts.map