import { AadTokenProvider, type IAadTokenProviderConfiguration } from '../index'; import type { IGetTokenOptions } from '../oauthTokenProvider/IAadTokenProvider'; /** * This class is useful for modifying the internal ADAL.js implementation of the OAuth2TokenProvider. */ export declare class MockAadTokenProvider extends AadTokenProvider { private _getTokenImplementation; constructor(configuration: ITestAadTokenProviderConfiguration); /** * Fetches the AAD OAuth2 token for a resource if the user that's currently logged in has * access to that resource. * * The OAuth2 token should not be cached by the caller since it is already cached by the method * itself. * * @param resourceEndpoint - the resource for which the token should be obtained * @param useCachedToken - Allows the developer to specify if cached tokens should be returned. * An example of a resourceEndpoint would be https://graph.microsoft.com * @returns A promise that will be fullfiled with the token or that will reject * with an error message */ getToken(resourceEndpoint: string, options?: IGetTokenOptions): Promise; getToken(resourceEndpoint: string, useCachedToken?: boolean): Promise; } export interface ITestAadTokenProviderConfiguration extends IAadTokenProviderConfiguration { getTokenImplementation?: (identifierUri: string) => Promise; } //# sourceMappingURL=MockAadTokenProvider.d.ts.map