import * as events from 'events';
import { NextFunction, Request, RequestHandler, Response, Router } from 'express';
import { XuiLogger } from '../../common';
import { AuthOptions } from './authOptions.interface';
export declare abstract class Strategy extends events.EventEmitter {
    protected static readonly REDACTED_LOG_VALUE = "[REDACTED]";
    private static readonly SENSITIVE_LOG_KEY_PATTERN;
    readonly strategyName: string;
    protected readonly router: Router;
    protected readonly logger: XuiLogger;
    protected options: AuthOptions;
    protected constructor(strategyName: string, router: Router, logger?: XuiLogger);
    validateOptions(options: any): boolean;
    protected redactingLogReplacer: (key: string, value: any) => any;
    initialiseStrategy: (options: any) => Promise<void>;
    private saveStateInSession;
    /**
     * The login route handler will attempt to setup security state param and redirect user if not authenticated
     * @param req Request
     * @param res Response
     * @param next NextFunction
     */
    loginHandler: (req: Request, res: Response, next: NextFunction) => Promise<RequestHandler>;
    setCallbackURL: (req: Request, _res: Response, next: NextFunction) => void;
    logout: (req: Request, res: Response, next: NextFunction) => Promise<void>;
    authRouteHandler: (req: Request, res: Response) => Response;
    destroySession: (req: Request) => Promise<any>;
    keepAliveHandler: (_req: Request, _res: Response, next: NextFunction) => void;
    configure: (options: AuthOptions) => RequestHandler;
    callbackHandler: (req: Request, res: Response, next: NextFunction) => Promise<void>;
    isTokenExpired: (token: string) => boolean;
    authenticate: (req: Request, _res: Response, next: NextFunction) => void | Response<any, Record<string, any>>;
    makeAuthorization: (passport: any) => string;
    setHeaders: (req: Request, _res: Response, next: NextFunction) => Promise<void>;
    isRouteCredentialNeeded: (url: string, options: AuthOptions) => boolean | undefined;
    setCredentialToken: (req: Request) => Promise<void>;
    generateToken: () => Promise<any | undefined>;
    verifyLogin: (req: Request, user: any, next: NextFunction, res: Response) => void;
    initializePassport: () => void;
    initializeSession: () => void;
    initializeKeepAlive: () => void;
    initializeTrustProxy: () => void;
    /**
     * helper method to store csrf token into session
     */
    initialiseCSRF: () => void;
    /**
     * retrieve the csrf token value, lastly from sent cookies
     * @param req
     * @return string
     */
    getCSRFValue: (req: Request) => string;
    addHeaders: () => void;
    serializeUser: () => void;
    deserializeUser: () => void;
    jwTokenExpired: (jwtData: any) => boolean;
    /**
     * Get session URL
     * @return {string}
     */
    urlFromToken: (url: string | undefined, token: any) => string;
    /**
     * Get authorization from ClientID and secret
     * @return {string}
     */
    getAuthorization: (clientID: string, clientSecret: string, encoding?: BufferEncoding) => string;
    /**
     * Get all the events that this strategy emits
     * @return {string[]} - ['auth.authenticate.success']
     */
    getEvents: () => string[];
    /**
     * emit Events if any subscriptions available
     */
    emitIfListenersExist: (eventName: string, eventObject: unknown, done: (err: any, id?: any) => void) => void;
    getRequestBody: (options: AuthOptions) => string;
    getUrlFromOptions: (options: AuthOptions) => string;
}
//# sourceMappingURL=strategy.class.d.ts.map