import type { PondoknusaRequest } from '@pondoknusa/http'; import type { Middleware } from '@pondoknusa/http'; import { SessionGuard } from './session-guard.js'; import type { Authenticatable, AuthConfig, Guard } from './types.js'; type WebResponse = globalThis.Response; export declare class AuthManager { private readonly config; private readonly guards; private readonly sessionGuardName; private defaultGuard; constructor(config: AuthConfig, guardFactories: Record Guard>, sessionGuardName: string); guard(name?: string): Guard; sessionGuard(): SessionGuard; user(guardName?: string): Authenticatable | null; id(guardName?: string): string | number | null; check(guardName?: string): Promise; attempt(credentials: Record, guardName?: string): Promise; login(user: Authenticatable, guardName?: string): Promise; logout(guardName?: string): Promise; primeRequest(request: PondoknusaRequest): void; startRequest(request: PondoknusaRequest): Promise; endRequest(response: WebResponse): Promise; } export declare function createAuthMiddleware(auth: AuthManager, guardName?: string): Middleware; export declare function createGuestMiddleware(auth: AuthManager, guardName?: string): Middleware; export declare function createTokenAbilityMiddleware(required: string | string[]): Middleware; export declare function createStartSessionMiddleware(auth: AuthManager): Middleware; export { SessionGuard } from './session-guard.js'; //# sourceMappingURL=auth-manager.d.ts.map