codecrucible-synth
Version:
Production-Ready AI Development Platform with Multi-Voice Synthesis, Smithery MCP Integration, Enterprise Security, and Zero-Timeout Reliability
53 lines • 1.62 kB
TypeScript
/**
* Enterprise JWT Authentication System
* Implements secure JWT token management with refresh tokens and session tracking
*/
import { AuthConfig, User, TokenPayload, AuthResult, AuthSession } from './auth-types.js';
export declare class JWTAuthenticator {
private config;
private activeSessions;
private refreshTokens;
private blacklistedTokens;
constructor(config: AuthConfig);
/**
* Generate access and refresh tokens
*/
generateTokens(user: User, ipAddress: string, userAgent: string): Promise<AuthResult>;
/**
* Verify and decode access token
*/
verifyToken(token: string): Promise<TokenPayload>;
/**
* Refresh access token using refresh token
*/
refreshAccessToken(refreshToken: string): Promise<AuthResult>;
/**
* Revoke token (add to blacklist)
*/
revokeToken(token: string): Promise<void>;
/**
* Revoke all tokens for a user
*/
revokeAllUserTokens(userId: string): Promise<void>;
/**
* Get active sessions for user
*/
getUserSessions(userId: string): AuthSession[];
/**
* Clean up expired sessions and tokens
*/
private cleanupExpiredSessions;
/**
* Express middleware for authentication
*/
middleware(): (req: any, res: any, next: any) => Promise<any>;
/**
* Hash password securely
*/
static hashPassword(password: string): Promise<string>;
/**
* Verify password against hash
*/
static verifyPassword(password: string, hash: string): Promise<boolean>;
}
//# sourceMappingURL=jwt-authenticator.d.ts.map