/// import { Handler, Request, Response } from 'express'; import { SakuraApi } from './sakura-api'; export declare const authenticatorPluginSymbols: { id: symbol; isAuthenticator: symbol; sapi: symbol; }; export interface IAuthenticator { authenticate: (req: Request, res: Response) => Promise; } export interface IAuthenticatorConstructor { } export interface SakuraApiPlugin { options?: any; order?: number; plugin: (sapi: SakuraApi, options: any) => SakuraApiPluginResult; } export interface SakuraApiPluginResult { authenticators?: IAuthenticator[]; middlewareHandlers?: Handler[]; models?: any[]; providers?: any[]; routables?: any[]; } export interface AuthenticatorPluginResult { data: { [key: string]: any; }; error?: Error; status: number; success: boolean; } export declare type AuthenticationHandler = (req: Request, res: Response) => Promise; export declare class AuthenticatorsMustBeDecoratedWithAuthenticatorPluginError extends Error { constructor(target: any); } export declare class AuthenticatorNotRegistered extends Error { constructor(target: any); } export declare function AuthenticatorPlugin(): (any) => any; export declare class Anonymous implements IAuthenticator, IAuthenticatorConstructor { authenticate(req: Request, res: Response): Promise; }