import { AuthService } from './AuthService';
import { XHR } from '../../icc-api/api/XHR';
import { IccAuthApi } from '../../icc-api';
import Header = XHR.Header;
/**
 * Differs from JwtAuthService in that it can create new refresh tokens if the old one is expired
 */
export declare class JwtBridgedAuthService implements AuthService {
    private authApi;
    private username;
    private password;
    private thirdPartyTokens;
    private _error;
    private _currentPromise;
    readonly jwtGetter: () => Promise<{
        token: string;
        refreshToken: string;
    } | undefined>;
    constructor(authApi: IccAuthApi, username: string | undefined, password: string | undefined, thirdPartyTokens: {
        [thirdParty: string]: string;
    } | undefined, initialJwt: {
        authJwt: string;
        refreshJwt: string;
    } | undefined);
    get refreshToken(): Promise<string | undefined>;
    getIcureTokens(): Promise<{
        token: string;
        refreshToken: string;
    } | undefined>;
    getJWT(): Promise<string | undefined>;
    getAuthHeaders(): Promise<Array<Header>>;
    private _refreshAuthJwt;
    private _loginAndGetTokens;
    private _isJwtInvalidOrExpired;
    private _base64Decode;
    invalidateHeader(error: Error): void;
    isInErrorState(): boolean;
}
