import type * as AuthenticationContext from 'adal-angular'; import type { IAuthenticationContextInternal, IGetTokenOptions, ITokenProvider } from '../../ITokenProvider'; /** * Class that wraps the ADAL's authentication class * @internal */ export default class AdalAuthContext implements ITokenProvider { readonly clientId: string; private readonly _extraQueryParameter; private readonly _aadUserId; private _authContext; constructor(authContext: IAuthenticationContextInternal, aadUserId?: string); getToken(resourceEndpoint: string, options?: IGetTokenOptions): Promise; getToken(resourceEndpoint: string, useCachedToken?: boolean): Promise; _ensureState(): Promise; _ensureTelemetry(): Promise; private _getAccessToken; /** * Returns an access token if a valid cached token exists */ private _tryGetCachedAccessToken; private _fetchAccessToken; /** * Throws an exception if an expected error has occurred. List of expected errors are listed in AadConstants.ts */ private _monitorAndThrowForAccessTokenExpectedFailures; /** * Wraps the ADAL.js callback code with a promise. */ private _fetchAccessTokenSilent; /** * Patching ADAL context to address design issues. */ private _patchAdalAuthContext; /** * Adds the hidden iframe for silent token renewal. This code is a security fix to ADAL.js's iframe * rendering code. IE11 doesn't support dynamically setting attributes on an iFrame element, so * we must patch the original implementation. Original code is in ADAL.js addAdalFrame. * https://github.com/AzureAD/azure-activedirectory-library-for-js/ for source code */ private _addAdalFrame; /** * Opens a hidden iframe for silent token renewal. The original code performed this action in a really weird * and inefficent way, so we're fixing it. * Original code is in ADAL.js loadFrame. * https://github.com/AzureAD/azure-activedirectory-library-for-js/ for source code */ private _loadFrame; } /** * Represents the exported module from the adal-angular npm package. * @internal */ export interface IAdalJsModule { inject: (configuration: AuthenticationContext.Options) => AuthenticationContext; } //# sourceMappingURL=AdalAuthContext.d.ts.map