import { CamundaPlatform8Configuration, DeepPartial } from '../../lib';
import { IOAuthProvider, Token } from '../index';
import { TokenGrantAudienceType } from './IOAuthProvider';
export declare class OAuthProvider implements IOAuthProvider {
    private static readonly defaultTokenCache;
    private cacheDir;
    private authServerUrl;
    private mTLSPrivateKey;
    private mTLSCertChain;
    private clientId;
    private clientSecret;
    private useFileCache;
    tokenCache: {
        [key: string]: Token;
    };
    private failed;
    private failureCount;
    private inflightTokenRequest?;
    userAgentString: string;
    private scope;
    private audienceMap;
    private consoleClientId;
    private consoleClientSecret;
    private isCamundaSaaS;
    private camundaModelerOAuthAudience;
    private refreshWindow;
    private rest;
    private log;
    constructor(options?: {
        config?: DeepPartial<CamundaPlatform8Configuration>;
    });
    getToken(audienceType: TokenGrantAudienceType): Promise<string>;
    flushMemoryCache(): void;
    flushFileCache(): void;
    /** Camunda SaaS needs an audience for a Modeler token request, and Self-Managed does not. */
    private addAudienceIfNeeded;
    private makeDebouncedTokenRequest;
    private sendToMemoryCache;
    private retrieveFromFileCache;
    private sendToFileCache;
    private isExpired;
    private evictFromMemoryCache;
    private evictFromFileCache;
    private getCacheKey;
    private getCachedTokenFileName;
    private getAudience;
    private addBearer;
}
