import * as winston from "winston";
import * as express from "express";
export declare class OAuthProvider {
    private _logger;
    private app;
    static instance: OAuthProvider;
    private clients;
    private codes;
    oauthServer: any;
    private authorizationCodeStore;
    static configure(logger: winston.Logger, app: express.Express): OAuthProvider;
    authorize(req: any, res: any): any;
    authenticateHandler(): {
        handle: (request: any, response: any) => {
            username: any;
        };
    };
    obtainToken(req: any, res: any): any;
    getAccessToken(accessToken: any): Promise<any>;
    getRefreshToken(refreshToken: any): Promise<any>;
    getClient(clientId: any, clientSecret: any): any;
    getClientById(clientId: any): any;
    saveToken(token: any, client: any, user: any): Promise<any>;
    saveAuthorizationCode(code: string, client: any, user: any, redirect_uri: string): Promise<any>;
    sleep(ms: any): Promise<unknown>;
    getAuthorizationCode(code: any): Promise<{
        code: any;
        client: any;
        user: {
            id: any;
            _id: any;
            name: any;
            username: any;
            email: any;
            role: any;
        };
        expiresAt: Date;
        redirectUri: any;
    }>;
    revokeAuthorizationCode(code: any): Promise<boolean>;
    static tokenCache: CachedToken[];
    private static getCachedAccessToken;
    private static getCachedRefreshToken;
    private static addToken;
}
export declare class CachedToken {
    token: any;
    firstsignin: Date;
    constructor(token: any);
}
