import { WebAuth } from 'auth0-js'; import EventEmitter from 'eventemitter3'; import * as types from './types'; import { TokenConfig } from './types'; type Events = 'access-success' | 'access-failure'; export declare class Authorizer extends EventEmitter { private _webAuth; _config: types.AuthorizerConfig; _checkSessionCount: number; _accesses: { [key: string]: types.AccessSuccess | types.AccessFailure; }; _accessesToRefresh: { [key: string]: boolean; }; constructor(config: Partial, _webAuth: WebAuth); /** * This function returns after the first token has been retrieved (or failed). * It will also periodically refresh the token, so you need to listen for * 'access-success' and 'access-failure' to be informed when the token changes. */ authorize(tokenConfig: TokenConfig, license: string): Promise; authorizeOnce(tokenConfig: TokenConfig, license: string): Promise; unauthorize(key: string, license: string): Promise; getAccesses(): (types.AccessSuccess | types.AccessFailure)[]; hasAccess(key: string, license: string): boolean; getAccess(key: string, license: string): types.AccessSuccess | types.AccessFailure; isRefreshing(key: string, license: string): boolean; private _accessKey; private _setAccess; private _setRefresh; private _keepTokenFresh; private _refreshToken; private _onTokenSuccess; private _onTokenFailure; private _checkSession; } export {};