/**
 * Authentication and Session Management
 * JWT-based authentication for BaoLife.
 * Ported from Python auth.py
 */
export interface TokenPayload {
    user_id: string;
    iat: number;
    exp: number;
    jti: string;
    [key: string]: unknown;
}
export interface SessionInfo {
    token: string;
    user_id: string;
    expires_in: number;
}
export declare class AuthError extends Error {
    constructor(message: string);
}
export declare class AuthManager {
    private secret;
    private timeout;
    private algorithm;
    constructor();
    /**
     * Hash password using SHA-256
     */
    hashPassword(password: string): string;
    /**
     * Verify password against hash
     */
    verifyPassword(password: string, hashed: string): boolean;
    /**
     * Create JWT token for user
     */
    createToken(userId: string, additionalClaims?: Record<string, unknown>): string;
    /**
     * Verify JWT token
     */
    verifyToken(token: string): TokenPayload;
    /**
     * Create authenticated session
     */
    createSession(userId: string): SessionInfo;
    /**
     * Authenticate user with credentials
     */
    authenticateUser(userId: string, password: string): Promise<SessionInfo | null>;
}
export declare const authManager: AuthManager;
/**
 * Require authentication for operation
 */
export declare function requireAuth(token: string): string | null;
/**
 * Middleware-style auth check
 */
export declare function isAuthenticated(token: string): boolean;
export declare const auth: {
    AuthManager: typeof AuthManager;
    AuthError: typeof AuthError;
    authManager: AuthManager;
    requireAuth: typeof requireAuth;
    isAuthenticated: typeof isAuthenticated;
};
//# sourceMappingURL=auth.d.ts.map