/** * JWT Utilities * * Provides functions for decoding and validating JWT tokens. * NOTE: These functions do NOT verify signatures - they are for * expiration checking and display purposes only. */ export interface JwtPayload { sub?: string; exp?: number; iat?: number; [key: string]: unknown; } /** * Decode JWT payload without signature verification. * ONLY for expiration checking and display purposes. */ export declare function decodeJwtPayload(token: string): JwtPayload | null; /** * Check if a token is expiring soon (within threshold seconds). * Default threshold is 5 minutes (300 seconds). */ export declare function isTokenExpiringSoon(token: string, thresholdSeconds?: number): boolean; /** * Check if a token has expired. */ export declare function isTokenExpired(token: string): boolean; /** * Get the time remaining until token expiration in seconds. * Returns negative value if expired. */ export declare function getTokenTimeRemaining(token: string): number; /** * Format seconds into human-readable duration. */ export declare function formatDuration(seconds: number): string; /** * Mask sensitive token data for display. */ export declare function maskToken(token: string | undefined): string;