import { IMonitorUser } from "../APIService"; export interface IMonitorSession { token: string; login: string; createdAt: number; lastSeenAt: number; } export type TMonitorRole = "admin" | "it" | "analytic"; export type TMonitorCapability = "dashboard" | "logs" | "admin"; export declare class MonitorAuth { private static readonly ROLE_CAPS; static roleAllows(role: string | undefined | null, capability: TMonitorCapability): boolean; static describeRole(role: string | undefined | null): { role: string; capabilities: TMonitorCapability[]; }; private static authFile; private static projectKey; private static enrolled; private static storeLoaded; private static fileSafe; static configure(opts?: { authFile?: string | null; authDir?: string | null; projectName?: string; }): void; private static loadStore; private static saveStore; static secretFor(user: IMonitorUser): string | null; static isEnrolled(user: IMonitorUser): boolean; static MIN_PASSWORD_LENGTH: number; static SESSION_IDLE_MS: number; static SESSION_MAX_MS: number; static MAX_FAILED_ATTEMPTS: number; static LOCKOUT_MS: number; private static sessions; private static failures; private static usedTotpCounter; static passwordPolicyError(password: string | undefined | null): string | null; static compliantUsers(users: IMonitorUser[]): IMonitorUser[]; static policyReportFor(users: IMonitorUser[]): string[]; static PLAINTEXT_ERROR: string; static plaintextLogins(users: IMonitorUser[]): string[]; private static base32Decode; private static hotp; static verifyTotp(login: string, secretBase32: string, code: string): string | null; private static base32Encode; static generateTotpSecret(login: string, issuer?: string): { secret: string; uri: string; }; static lockoutRemainingMs(login: string): number; private static registerFailure; private static clearFailures; private static sameSecret; static authenticate(users: IMonitorUser[], login: string, password: string, totp?: string): Promise<{ user?: IMonitorUser; error?: string; enrollmentRequired?: boolean; }>; private static pendingEnrollments; static ENROLLMENT_TTL_MS: number; static beginEnrollment(login: string, issuer?: string): { token: string; secret: string; uri: string; }; static completeEnrollment(token: string, code: string): { login?: string; error?: string; }; private static purgeSessions; static createSession(login: string): IMonitorSession; static touchSession(token: string): IMonitorSession | null; static revokeSession(token: string): void; static revokeAllFor(login: string): void; }