import { IAutoload } from 'najs-binding'; import { ContextualFacade } from 'najs-facade'; import { IGuard, GuardConfiguration } from './interfaces/IGuard'; import { IAuth } from './interfaces/IAuth'; import { IAuthenticatable } from './interfaces/IAuthenticatable'; import { Controller } from '../http/controller/Controller'; export declare class AuthManager extends ContextualFacade implements IAuth, IAutoload { static className: string; /** * The currently authenticated user. */ protected currentUser: IAuthenticatable | undefined; /** * The currently guard. */ protected currentGuard: IGuard; /** * Indicates if the logout method has been called. */ protected loggedOut: boolean; /** * Guard's configuration */ protected configurations: { [key: string]: GuardConfiguration; }; /** * guard's instance bag */ protected guardBag: { [key: string]: IGuard; }; constructor(controller: Controller); getClassName(): string; findDefaultGuardName(): string; resolveGuard(name: string): IGuard | undefined; getCurrentGuard(): IGuard; guard(name: string): IAuth; login(user: IAuthenticatable): Promise; login(user: IAuthenticatable, remember: boolean): Promise; logout(): Promise; attempt(credentials: Object, remember?: boolean, login?: boolean): Promise; validate(credentials: Object): Promise; check(): boolean; guest(): boolean; user(): T | undefined; id(): T | undefined; getUser(): T | undefined; setUser(user: T): void; }