{"version":3,"file":"ClientApplication.js","sources":["../../src/app/ClientApplication.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { CryptoOps } from \"../crypto/CryptoOps\";\nimport { StringUtils, InteractionRequiredAuthError, AccountInfo, Constants, INetworkModule, AuthenticationResult, Logger, CommonSilentFlowRequest, ICrypto, DEFAULT_CRYPTO_IMPLEMENTATION, AuthError, PerformanceEvents, PerformanceCallbackFunction, StubPerformanceClient, IPerformanceClient, BaseAuthRequest, PromptValue, ClientAuthError } from \"@azure/msal-common\";\nimport { BrowserCacheManager, DEFAULT_BROWSER_CACHE_MANAGER } from \"../cache/BrowserCacheManager\";\nimport { BrowserConfiguration, buildConfiguration, CacheOptions, Configuration } from \"../config/Configuration\";\nimport { InteractionType, ApiId, BrowserCacheLocation, WrapperSKU, TemporaryCacheKeys, CacheLookupPolicy } from \"../utils/BrowserConstants\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { SsoSilentRequest } from \"../request/SsoSilentRequest\";\nimport { version, name } from \"../packageMetadata\";\nimport { EventCallbackFunction } from \"../event/EventMessage\";\nimport { EventType } from \"../event/EventType\";\nimport { EndSessionRequest } from \"../request/EndSessionRequest\";\nimport { BrowserConfigurationAuthError } from \"../error/BrowserConfigurationAuthError\";\nimport { EndSessionPopupRequest } from \"../request/EndSessionPopupRequest\";\nimport { INavigationClient } from \"../navigation/INavigationClient\";\nimport { EventHandler } from \"../event/EventHandler\";\nimport { PopupClient } from \"../interaction_client/PopupClient\";\nimport { RedirectClient } from \"../interaction_client/RedirectClient\";\nimport { SilentIframeClient } from \"../interaction_client/SilentIframeClient\";\nimport { SilentRefreshClient } from \"../interaction_client/SilentRefreshClient\";\nimport { TokenCache } from \"../cache/TokenCache\";\nimport { ITokenCache } from \"../cache/ITokenCache\";\nimport { NativeInteractionClient } from \"../interaction_client/NativeInteractionClient\";\nimport { NativeMessageHandler } from \"../broker/nativeBroker/NativeMessageHandler\";\nimport { SilentRequest } from \"../request/SilentRequest\";\nimport { NativeAuthError } from \"../error/NativeAuthError\";\nimport { SilentCacheClient } from \"../interaction_client/SilentCacheClient\";\nimport { SilentAuthCodeClient } from \"../interaction_client/SilentAuthCodeClient\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { AuthorizationCodeRequest } from \"../request/AuthorizationCodeRequest\";\nimport { NativeTokenRequest } from \"../broker/nativeBroker/NativeRequest\";\nimport { BrowserPerformanceClient } from \"../telemetry/BrowserPerformanceClient\";\n\nexport abstract class ClientApplication {\n\n // Crypto interface implementation\n protected readonly browserCrypto: ICrypto;\n\n // Storage interface implementation\n protected readonly browserStorage: BrowserCacheManager;\n\n // Native Cache in memory storage implementation\n protected readonly nativeInternalStorage: BrowserCacheManager;\n\n // Network interface implementation\n protected readonly networkClient: INetworkModule;\n\n // Navigation interface implementation\n protected navigationClient: INavigationClient;\n\n // Input configuration by developer/user\n protected config: BrowserConfiguration;\n\n // Token cache implementation\n private tokenCache: TokenCache;\n\n // Logger\n protected logger: Logger;\n\n // Flag to indicate if in browser environment\n protected isBrowserEnvironment: boolean;\n\n protected eventHandler: EventHandler;\n\n // Redirect Response Object\n protected redirectResponse: Map>;\n\n // Native Extension Provider\n protected nativeExtensionProvider: NativeMessageHandler | undefined;\n\n // Hybrid auth code responses\n private hybridAuthCodeResponses: Map>;\n\n // Performance telemetry client\n protected performanceClient: IPerformanceClient;\n\n // Flag representing whether or not the initialize API has been called and completed\n protected initialized: boolean;\n\n /**\n * @constructor\n * Constructor for the PublicClientApplication used to instantiate the PublicClientApplication object\n *\n * Important attributes in the Configuration object for auth are:\n * - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview\n * - authority: the authority URL for your application.\n * - redirect_uri: the uri of your application registered in the portal.\n *\n * In Azure AD, authority is a URL indicating the Azure active directory that MSAL uses to obtain tokens.\n * It is of the form https://login.microsoftonline.com/{Enter_the_Tenant_Info_Here}\n * If your application supports Accounts in one organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com).\n * If your application supports Accounts in any organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with organizations.\n * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace \"Enter_the_Tenant_Info_Here\" value with common.\n * To restrict support to Personal Microsoft accounts only, replace \"Enter_the_Tenant_Info_Here\" value with consumers.\n *\n * In Azure B2C, authority is of the form https://{instance}/tfp/{tenant}/{policyName}/\n * Full B2C functionality will be available in this library in future versions.\n *\n * @param configuration Object for the MSAL PublicClientApplication instance\n */\n constructor(configuration: Configuration) {\n /*\n * If loaded in an environment where window is not available,\n * set internal flag to false so that further requests fail.\n * This is to support server-side rendering environments.\n */\n this.isBrowserEnvironment = typeof window !== \"undefined\";\n // Set the configuration.\n this.config = buildConfiguration(configuration, this.isBrowserEnvironment);\n this.initialized = false;\n\n // Initialize logger\n this.logger = new Logger(this.config.system.loggerOptions, name, version);\n\n // Initialize the network module class.\n this.networkClient = this.config.system.networkClient;\n\n // Initialize the navigation client class.\n this.navigationClient = this.config.system.navigationClient;\n\n // Initialize redirectResponse Map\n this.redirectResponse = new Map();\n\n // Initial hybrid spa map\n this.hybridAuthCodeResponses = new Map();\n\n // Initialize performance client\n this.performanceClient = this.isBrowserEnvironment ?\n new BrowserPerformanceClient(this.config.auth.clientId, this.config.auth.authority, this.logger, name, version, this.config.telemetry.application, this.config.system.cryptoOptions) :\n new StubPerformanceClient(this.config.auth.clientId, this.config.auth.authority, this.logger, name, version, this.config.telemetry.application);\n\n // Initialize the crypto class.\n this.browserCrypto = this.isBrowserEnvironment ? new CryptoOps(this.logger, this.performanceClient, this.config.system.cryptoOptions) : DEFAULT_CRYPTO_IMPLEMENTATION;\n\n this.eventHandler = new EventHandler(this.logger, this.browserCrypto);\n\n // Initialize the browser storage class.\n this.browserStorage = this.isBrowserEnvironment ?\n new BrowserCacheManager(this.config.auth.clientId, this.config.cache, this.browserCrypto, this.logger) :\n DEFAULT_BROWSER_CACHE_MANAGER(this.config.auth.clientId, this.logger);\n\n // initialize in memory storage for native flows\n const nativeCacheOptions: Required = {\n cacheLocation: BrowserCacheLocation.MemoryStorage,\n storeAuthStateInCookie: false,\n secureCookies: false\n };\n this.nativeInternalStorage = new BrowserCacheManager(this.config.auth.clientId, nativeCacheOptions, this.browserCrypto, this.logger);\n\n // Initialize the token cache\n this.tokenCache = new TokenCache(this.config, this.browserStorage, this.logger, this.browserCrypto);\n }\n\n /**\n * Initializer function to perform async startup tasks such as connecting to WAM extension\n */\n async initialize(): Promise {\n this.logger.trace(\"initialize called\");\n if (this.initialized) {\n this.logger.info(\"initialize has already been called, exiting early.\");\n return;\n }\n this.eventHandler.emitEvent(EventType.INITIALIZE_START);\n if (this.config.system.allowNativeBroker) {\n try {\n this.nativeExtensionProvider = await NativeMessageHandler.createProvider(this.logger, this.config.system.nativeBrokerHandshakeTimeout);\n } catch (e) {\n this.logger.verbose(e);\n }\n }\n this.initialized = true;\n this.eventHandler.emitEvent(EventType.INITIALIZE_END);\n }\n\n // #region Redirect Flow\n\n /**\n * Event handler function which allows users to fire events after the PublicClientApplication object\n * has loaded during redirect flows. This should be invoked on all page loads involved in redirect\n * auth flows.\n * @param hash Hash to process. Defaults to the current value of window.location.hash. Only needs to be provided explicitly if the response to be handled is not contained in the current value.\n * @returns Token response or null. If the return value is null, then no auth redirect was detected.\n */\n async handleRedirectPromise(hash?: string): Promise {\n this.logger.verbose(\"handleRedirectPromise called\");\n // Block token acquisition before initialize has been called if native brokering is enabled\n BrowserUtils.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker, this.initialized);\n\n const loggedInAccounts = this.getAllAccounts();\n if (this.isBrowserEnvironment) {\n /**\n * Store the promise on the PublicClientApplication instance if this is the first invocation of handleRedirectPromise,\n * otherwise return the promise from the first invocation. Prevents race conditions when handleRedirectPromise is called\n * several times concurrently.\n */\n const redirectResponseKey = hash || Constants.EMPTY_STRING;\n let response = this.redirectResponse.get(redirectResponseKey);\n if (typeof response === \"undefined\") {\n this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_START, InteractionType.Redirect);\n this.logger.verbose(\"handleRedirectPromise has been called for the first time, storing the promise\");\n\n const request: NativeTokenRequest | null = this.browserStorage.getCachedNativeRequest();\n let redirectResponse: Promise;\n if (request && NativeMessageHandler.isNativeAvailable(this.config, this.logger, this.nativeExtensionProvider) && this.nativeExtensionProvider && !hash) {\n this.logger.trace(\"handleRedirectPromise - acquiring token from native platform\");\n const nativeClient = new NativeInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.handleRedirectPromise, this.performanceClient, this.nativeExtensionProvider, request.accountId, this.nativeInternalStorage, request.correlationId);\n redirectResponse = nativeClient.handleRedirectPromise();\n } else {\n this.logger.trace(\"handleRedirectPromise - acquiring token from web flow\");\n const correlationId = this.browserStorage.getTemporaryCache(TemporaryCacheKeys.CORRELATION_ID, true) || Constants.EMPTY_STRING;\n const redirectClient = this.createRedirectClient(correlationId);\n redirectResponse = redirectClient.handleRedirectPromise(hash);\n }\n\n response = redirectResponse.then((result: AuthenticationResult | null) => {\n if (result) {\n // Emit login event if number of accounts change\n\n const isLoggingIn = loggedInAccounts.length < this.getAllAccounts().length;\n if (isLoggingIn) {\n this.eventHandler.emitEvent(EventType.LOGIN_SUCCESS, InteractionType.Redirect, result);\n this.logger.verbose(\"handleRedirectResponse returned result, login success\");\n } else {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Redirect, result);\n this.logger.verbose(\"handleRedirectResponse returned result, acquire token success\");\n }\n }\n this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_END, InteractionType.Redirect);\n\n return result;\n }).catch((e) => {\n // Emit login event if there is an account\n if (loggedInAccounts.length > 0) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Redirect, null, e);\n } else {\n this.eventHandler.emitEvent(EventType.LOGIN_FAILURE, InteractionType.Redirect, null, e);\n }\n this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_END, InteractionType.Redirect);\n \n throw e;\n });\n this.redirectResponse.set(redirectResponseKey, response);\n } else {\n this.logger.verbose(\"handleRedirectPromise has been called previously, returning the result from the first call\");\n }\n\n return response;\n }\n this.logger.verbose(\"handleRedirectPromise returns null, not browser environment\");\n return null;\n }\n\n /**\n * Use when you want to obtain an access_token for your API by redirecting the user's browser window to the authorization endpoint. This function redirects\n * the page, so any code that follows this function will not execute.\n *\n * IMPORTANT: It is NOT recommended to have code that is dependent on the resolution of the Promise. This function will navigate away from the current\n * browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.\n *\n * @param request\n */\n async acquireTokenRedirect(request: RedirectRequest): Promise {\n // Preflight request\n const correlationId = this.getRequestCorrelationId(request);\n this.logger.verbose(\"acquireTokenRedirect called\", correlationId);\n this.preflightBrowserEnvironmentCheck(InteractionType.Redirect);\n\n // If logged in, emit acquire token events\n const isLoggedIn = this.getAllAccounts().length > 0;\n if (isLoggedIn) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Redirect, request);\n } else {\n this.eventHandler.emitEvent(EventType.LOGIN_START, InteractionType.Redirect, request);\n }\n\n let result: Promise;\n\n if (this.nativeExtensionProvider && this.canUseNative(request)) {\n const nativeClient = new NativeInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.acquireTokenRedirect, this.performanceClient, this.nativeExtensionProvider, this.getNativeAccountId(request), this.nativeInternalStorage, request.correlationId);\n result = nativeClient.acquireTokenRedirect(request).catch((e: AuthError) => {\n if (e instanceof NativeAuthError && e.isFatal()) {\n this.nativeExtensionProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt\n const redirectClient = this.createRedirectClient(request.correlationId);\n return redirectClient.acquireToken(request);\n } else if (e instanceof InteractionRequiredAuthError) {\n this.logger.verbose(\"acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow\");\n const redirectClient = this.createRedirectClient(request.correlationId);\n return redirectClient.acquireToken(request);\n }\n this.browserStorage.setInteractionInProgress(false);\n throw e;\n });\n } else {\n const redirectClient = this.createRedirectClient(request.correlationId);\n result = redirectClient.acquireToken(request);\n }\n\n return result.catch((e) => {\n // If logged in, emit acquire token events\n if (isLoggedIn) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Redirect, null, e);\n } else {\n this.eventHandler.emitEvent(EventType.LOGIN_FAILURE, InteractionType.Redirect, null, e);\n }\n throw e;\n });\n }\n\n // #endregion\n\n // #region Popup Flow\n\n /**\n * Use when you want to obtain an access_token for your API via opening a popup window in the user's browser\n *\n * @param request\n *\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\n */\n acquireTokenPopup(request: PopupRequest): Promise {\n const correlationId = this.getRequestCorrelationId(request);\n const atPopupMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenPopup, correlationId);\n\n try {\n this.logger.verbose(\"acquireTokenPopup called\", correlationId);\n this.preflightBrowserEnvironmentCheck(InteractionType.Popup);\n } catch (e) {\n // Since this function is syncronous we need to reject\n return Promise.reject(e);\n }\n\n // If logged in, emit acquire token events\n const loggedInAccounts = this.getAllAccounts();\n if (loggedInAccounts.length > 0) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Popup, request);\n } else {\n this.eventHandler.emitEvent(EventType.LOGIN_START, InteractionType.Popup, request);\n }\n\n let result: Promise;\n\n if (this.canUseNative(request)) {\n result = this.acquireTokenNative(request, ApiId.acquireTokenPopup).then((response) => {\n this.browserStorage.setInteractionInProgress(false);\n atPopupMeasurement.endMeasurement({\n success: true,\n isNativeBroker: true,\n requestId: response.requestId\n });\n atPopupMeasurement.flushMeasurement();\n return response;\n }).catch((e: AuthError) => {\n if (e instanceof NativeAuthError && e.isFatal()) {\n this.nativeExtensionProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt\n const popupClient = this.createPopupClient(request.correlationId);\n return popupClient.acquireToken(request);\n } else if (e instanceof InteractionRequiredAuthError) {\n this.logger.verbose(\"acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow\");\n const popupClient = this.createPopupClient(request.correlationId);\n return popupClient.acquireToken(request);\n }\n this.browserStorage.setInteractionInProgress(false);\n throw e;\n });\n } else {\n const popupClient = this.createPopupClient(request.correlationId);\n result = popupClient.acquireToken(request);\n }\n\n return result.then((result) => {\n\n /*\n * If logged in, emit acquire token events\n */\n const isLoggingIn = loggedInAccounts.length < this.getAllAccounts().length;\n if (isLoggingIn) {\n this.eventHandler.emitEvent(EventType.LOGIN_SUCCESS, InteractionType.Popup, result);\n } else {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Popup, result);\n }\n\n atPopupMeasurement.addStaticFields({\n accessTokenSize: result.accessToken.length,\n idTokenSize: result.idToken.length\n });\n atPopupMeasurement.endMeasurement({\n success: true,\n requestId: result.requestId\n });\n\n atPopupMeasurement.flushMeasurement();\n return result;\n }).catch((e: AuthError) => {\n if (loggedInAccounts.length > 0) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Popup, null, e);\n } else {\n this.eventHandler.emitEvent(EventType.LOGIN_FAILURE, InteractionType.Popup, null, e);\n }\n\n atPopupMeasurement.endMeasurement({\n errorCode: e.errorCode,\n subErrorCode: e.subError,\n success: false\n });\n atPopupMeasurement.flushMeasurement();\n\n // Since this function is syncronous we need to reject\n return Promise.reject(e);\n });\n }\n\n // #endregion\n\n // #region Silent Flow\n\n /**\n * This function uses a hidden iframe to fetch an authorization code from the eSTS. There are cases where this may not work:\n * - Any browser using a form of Intelligent Tracking Prevention\n * - If there is not an established session with the service\n *\n * In these cases, the request must be done inside a popup or full frame redirect.\n *\n * For the cases where interaction is required, you cannot send a request with prompt=none.\n *\n * If your refresh token has expired, you can use this function to fetch a new set of tokens silently as long as\n * you session on the server still exists.\n * @param request {@link SsoSilentRequest}\n *\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\n */\n async ssoSilent(request: SsoSilentRequest): Promise {\n const correlationId = this.getRequestCorrelationId(request);\n const validRequest = {\n ...request,\n // will be PromptValue.NONE or PromptValue.NO_SESSION\n prompt: request.prompt,\n correlationId: correlationId\n };\n this.preflightBrowserEnvironmentCheck(InteractionType.Silent);\n const ssoSilentMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.SsoSilent, correlationId);\n this.logger.verbose(\"ssoSilent called\", correlationId);\n this.eventHandler.emitEvent(EventType.SSO_SILENT_START, InteractionType.Silent, validRequest);\n\n let result: Promise;\n\n if (this.canUseNative(validRequest)) {\n result = this.acquireTokenNative(validRequest, ApiId.ssoSilent).catch((e: AuthError) => {\n // If native token acquisition fails for availability reasons fallback to standard flow\n if (e instanceof NativeAuthError && e.isFatal()) {\n this.nativeExtensionProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt\n const silentIframeClient = this.createSilentIframeClient(validRequest.correlationId);\n return silentIframeClient.acquireToken(validRequest);\n }\n throw e;\n });\n } else {\n const silentIframeClient = this.createSilentIframeClient(validRequest.correlationId);\n result = silentIframeClient.acquireToken(validRequest);\n }\n\n return result.then((response) => {\n this.eventHandler.emitEvent(EventType.SSO_SILENT_SUCCESS, InteractionType.Silent, response);\n ssoSilentMeasurement.addStaticFields({\n accessTokenSize: response.accessToken.length,\n idTokenSize: response.idToken.length\n });\n ssoSilentMeasurement.endMeasurement({\n success: true,\n isNativeBroker: response.fromNativeBroker,\n requestId: response.requestId\n });\n ssoSilentMeasurement.flushMeasurement();\n return response;\n }).catch((e: AuthError) => {\n this.eventHandler.emitEvent(EventType.SSO_SILENT_FAILURE, InteractionType.Silent, null, e);\n ssoSilentMeasurement.endMeasurement({\n errorCode: e.errorCode,\n subErrorCode: e.subError,\n success: false\n });\n ssoSilentMeasurement.flushMeasurement();\n throw e;\n });\n }\n\n /**\n * This function redeems an authorization code (passed as code) from the eSTS token endpoint.\n * This authorization code should be acquired server-side using a confidential client to acquire a spa_code.\n * This API is not indended for normal authorization code acquisition and redemption.\n *\n * Redemption of this authorization code will not require PKCE, as it was acquired by a confidential client.\n *\n * @param request {@link AuthorizationCodeRequest}\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\n */\n async acquireTokenByCode(request: AuthorizationCodeRequest): Promise {\n const correlationId = this.getRequestCorrelationId(request);\n this.preflightBrowserEnvironmentCheck(InteractionType.Silent);\n this.logger.trace(\"acquireTokenByCode called\", correlationId);\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_BY_CODE_START, InteractionType.Silent, request);\n const atbcMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenByCode, request.correlationId);\n\n try {\n if (request.code) {\n const hybridAuthCode = request.code;\n let response = this.hybridAuthCodeResponses.get(hybridAuthCode);\n if (!response) {\n this.logger.verbose(\"Initiating new acquireTokenByCode request\", correlationId);\n response = this.acquireTokenByCodeAsync({\n ...request,\n correlationId\n })\n .then((result: AuthenticationResult) => {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_BY_CODE_SUCCESS, InteractionType.Silent, result);\n this.hybridAuthCodeResponses.delete(hybridAuthCode);\n atbcMeasurement.addStaticFields({\n accessTokenSize: result.accessToken.length,\n idTokenSize: result.idToken.length\n });\n atbcMeasurement.endMeasurement({\n success: true,\n isNativeBroker: result.fromNativeBroker,\n requestId: result.requestId\n });\n atbcMeasurement.flushMeasurement();\n return result;\n })\n .catch((error: AuthError) => {\n this.hybridAuthCodeResponses.delete(hybridAuthCode);\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_BY_CODE_FAILURE, InteractionType.Silent, null, error);\n atbcMeasurement.endMeasurement({\n errorCode: error.errorCode,\n subErrorCode: error.subError,\n success: false\n });\n atbcMeasurement.flushMeasurement();\n throw error;\n });\n this.hybridAuthCodeResponses.set(hybridAuthCode, response);\n } else {\n this.logger.verbose(\"Existing acquireTokenByCode request found\", request.correlationId);\n atbcMeasurement.endMeasurement({\n success: true\n });\n atbcMeasurement.discardMeasurement();\n }\n return response;\n } else if (request.nativeAccountId) {\n if (this.canUseNative(request, request.nativeAccountId)) {\n return this.acquireTokenNative(request, ApiId.acquireTokenByCode, request.nativeAccountId).catch((e: AuthError) => {\n // If native token acquisition fails for availability reasons fallback to standard flow\n if (e instanceof NativeAuthError && e.isFatal()) {\n this.nativeExtensionProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt\n }\n throw e;\n });\n } else {\n throw BrowserAuthError.createUnableToAcquireTokenFromNativePlatformError();\n }\n } else {\n throw BrowserAuthError.createAuthCodeOrNativeAccountIdRequiredError();\n }\n\n } catch (e) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_BY_CODE_FAILURE, InteractionType.Silent, null, e);\n atbcMeasurement.endMeasurement({\n errorCode: e instanceof AuthError && e.errorCode || undefined,\n subErrorCode: e instanceof AuthError && e.subError || undefined,\n success: false\n });\n throw e;\n }\n }\n\n /**\n * Creates a SilentAuthCodeClient to redeem an authorization code.\n * @param request\n * @returns Result of the operation to redeem the authorization code\n */\n private async acquireTokenByCodeAsync(request: AuthorizationCodeRequest): Promise {\n this.logger.trace(\"acquireTokenByCodeAsync called\", request.correlationId);\n const silentAuthCodeClient = this.createSilentAuthCodeClient(request.correlationId);\n const silentTokenResult = await silentAuthCodeClient.acquireToken(request);\n return silentTokenResult;\n }\n\n /**\n * Attempt to acquire an access token from the cache\n * @param silentCacheClient SilentCacheClient\n * @param commonRequest CommonSilentFlowRequest\n * @param silentRequest SilentRequest\n * @returns A promise that, when resolved, returns the access token\n */\n protected async acquireTokenFromCache(\n silentCacheClient: SilentCacheClient,\n commonRequest: CommonSilentFlowRequest,\n silentRequest: SilentRequest\n ): Promise {\n switch(silentRequest.cacheLookupPolicy) {\n case CacheLookupPolicy.Default:\n case CacheLookupPolicy.AccessToken:\n case CacheLookupPolicy.AccessTokenAndRefreshToken:\n return silentCacheClient.acquireToken(commonRequest);\n default:\n throw ClientAuthError.createRefreshRequiredError();\n }\n }\n\n /**\n * Attempt to acquire an access token via a refresh token\n * @param commonRequest CommonSilentFlowRequest\n * @param silentRequest SilentRequest\n * @returns A promise that, when resolved, returns the access token\n */\n protected async acquireTokenByRefreshToken(\n commonRequest: CommonSilentFlowRequest,\n silentRequest: SilentRequest\n ): Promise {\n switch(silentRequest.cacheLookupPolicy) {\n case CacheLookupPolicy.Default:\n case CacheLookupPolicy.AccessTokenAndRefreshToken:\n case CacheLookupPolicy.RefreshToken:\n case CacheLookupPolicy.RefreshTokenAndNetwork:\n const silentRefreshClient = this.createSilentRefreshClient(commonRequest.correlationId);\n return silentRefreshClient.acquireToken(commonRequest);\n default:\n throw ClientAuthError.createRefreshRequiredError();\n }\n }\n\n /**\n * Attempt to acquire an access token via an iframe\n * @param request CommonSilentFlowRequest\n * @returns A promise that, when resolved, returns the access token\n */\n protected async acquireTokenBySilentIframe(\n request: CommonSilentFlowRequest\n ): Promise {\n const silentIframeClient = this.createSilentIframeClient(request.correlationId);\n return silentIframeClient.acquireToken(request);\n }\n\n // #endregion\n\n // #region Logout\n\n /**\n * Deprecated logout function. Use logoutRedirect or logoutPopup instead\n * @param logoutRequest\n * @deprecated\n */\n async logout(logoutRequest?: EndSessionRequest): Promise {\n const correlationId = this.getRequestCorrelationId(logoutRequest);\n this.logger.warning(\"logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.\", correlationId);\n return this.logoutRedirect({\n correlationId,\n ...logoutRequest\n });\n }\n\n /**\n * Use to log out the current user, and redirect the user to the postLogoutRedirectUri.\n * Default behaviour is to redirect the user to `window.location.href`.\n * @param logoutRequest\n */\n async logoutRedirect(logoutRequest?: EndSessionRequest): Promise {\n const correlationId = this.getRequestCorrelationId(logoutRequest);\n this.preflightBrowserEnvironmentCheck(InteractionType.Redirect);\n\n const redirectClient = this.createRedirectClient(correlationId);\n return redirectClient.logout(logoutRequest);\n }\n\n /**\n * Clears local cache for the current user then opens a popup window prompting the user to sign-out of the server\n * @param logoutRequest\n */\n logoutPopup(logoutRequest?: EndSessionPopupRequest): Promise {\n try {\n const correlationId = this.getRequestCorrelationId(logoutRequest);\n this.preflightBrowserEnvironmentCheck(InteractionType.Popup);\n const popupClient = this.createPopupClient(correlationId);\n return popupClient.logout(logoutRequest);\n } catch (e) {\n // Since this function is syncronous we need to reject\n return Promise.reject(e);\n }\n }\n\n // #endregion\n\n // #region Account APIs\n\n /**\n * Returns all accounts that MSAL currently has data for.\n * (the account object is created at the time of successful login)\n * or empty array when no accounts are found\n * @returns Array of account objects in cache\n */\n getAllAccounts(): AccountInfo[] {\n this.logger.verbose(\"getAllAccounts called\");\n return this.isBrowserEnvironment ? this.browserStorage.getAllAccounts() : [];\n }\n\n /**\n * Returns the signed in account matching username.\n * (the account object is created at the time of successful login)\n * or null when no matching account is found.\n * This API is provided for convenience but getAccountById should be used for best reliability\n * @param userName\n * @returns The account object stored in MSAL\n */\n getAccountByUsername(userName: string): AccountInfo | null {\n const allAccounts = this.getAllAccounts();\n if (!StringUtils.isEmpty(userName) && allAccounts && allAccounts.length) {\n this.logger.verbose(\"Account matching username found, returning\");\n this.logger.verbosePii(`Returning signed-in accounts matching username: ${userName}`);\n return allAccounts.filter(accountObj => accountObj.username.toLowerCase() === userName.toLowerCase())[0] || null;\n } else {\n this.logger.verbose(\"getAccountByUsername: No matching account found, returning null\");\n return null;\n }\n }\n\n /**\n * Returns the signed in account matching homeAccountId.\n * (the account object is created at the time of successful login)\n * or null when no matching account is found\n * @param homeAccountId\n * @returns The account object stored in MSAL\n */\n getAccountByHomeId(homeAccountId: string): AccountInfo | null {\n const allAccounts = this.getAllAccounts();\n if (!StringUtils.isEmpty(homeAccountId) && allAccounts && allAccounts.length) {\n this.logger.verbose(\"Account matching homeAccountId found, returning\");\n this.logger.verbosePii(`Returning signed-in accounts matching homeAccountId: ${homeAccountId}`);\n return allAccounts.filter(accountObj => accountObj.homeAccountId === homeAccountId)[0] || null;\n } else {\n this.logger.verbose(\"getAccountByHomeId: No matching account found, returning null\");\n return null;\n }\n }\n\n /**\n * Returns the signed in account matching localAccountId.\n * (the account object is created at the time of successful login)\n * or null when no matching account is found\n * @param localAccountId\n * @returns The account object stored in MSAL\n */\n getAccountByLocalId(localAccountId: string): AccountInfo | null {\n const allAccounts = this.getAllAccounts();\n if (!StringUtils.isEmpty(localAccountId) && allAccounts && allAccounts.length) {\n this.logger.verbose(\"Account matching localAccountId found, returning\");\n this.logger.verbosePii(`Returning signed-in accounts matching localAccountId: ${localAccountId}`);\n return allAccounts.filter(accountObj => accountObj.localAccountId === localAccountId)[0] || null;\n } else {\n this.logger.verbose(\"getAccountByLocalId: No matching account found, returning null\");\n return null;\n }\n }\n\n /**\n * Sets the account to use as the active account. If no account is passed to the acquireToken APIs, then MSAL will use this active account.\n * @param account\n */\n setActiveAccount(account: AccountInfo | null): void {\n this.browserStorage.setActiveAccount(account);\n }\n\n /**\n * Gets the currently active account\n */\n getActiveAccount(): AccountInfo | null {\n return this.browserStorage.getActiveAccount();\n }\n\n // #endregion\n\n // #region Helpers\n\n /**\n * Helper to validate app environment before making an auth request\n *\n * @protected\n * @param {InteractionType} interactionType What kind of interaction is being used\n * @param {boolean} [setInteractionInProgress=true] Whether to set interaction in progress temp cache flag\n */\n protected preflightBrowserEnvironmentCheck(interactionType: InteractionType, setInteractionInProgress: boolean = true): void {\n this.logger.verbose(\"preflightBrowserEnvironmentCheck started\");\n // Block request if not in browser environment\n BrowserUtils.blockNonBrowserEnvironment(this.isBrowserEnvironment);\n\n // Block redirects if in an iframe\n BrowserUtils.blockRedirectInIframe(interactionType, this.config.system.allowRedirectInIframe);\n\n // Block auth requests inside a hidden iframe\n BrowserUtils.blockReloadInHiddenIframes();\n\n // Block redirectUri opened in a popup from calling MSAL APIs\n BrowserUtils.blockAcquireTokenInPopups();\n\n // Block token acquisition before initialize has been called if native brokering is enabled\n BrowserUtils.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker, this.initialized);\n\n // Block redirects if memory storage is enabled but storeAuthStateInCookie is not\n if (interactionType === InteractionType.Redirect &&\n this.config.cache.cacheLocation === BrowserCacheLocation.MemoryStorage &&\n !this.config.cache.storeAuthStateInCookie) {\n throw BrowserConfigurationAuthError.createInMemoryRedirectUnavailableError();\n }\n\n if (interactionType === InteractionType.Redirect || interactionType === InteractionType.Popup) {\n this.preflightInteractiveRequest(setInteractionInProgress);\n }\n }\n\n /**\n * Preflight check for interactive requests\n *\n * @protected\n * @param {boolean} setInteractionInProgress Whether to set interaction in progress temp cache flag\n */\n protected preflightInteractiveRequest(setInteractionInProgress: boolean): void {\n this.logger.verbose(\"preflightInteractiveRequest called, validating app environment\");\n // block the reload if it occurred inside a hidden iframe\n BrowserUtils.blockReloadInHiddenIframes();\n\n // Set interaction in progress temporary cache or throw if alread set.\n if (setInteractionInProgress) {\n this.browserStorage.setInteractionInProgress(true);\n }\n }\n\n /**\n * Acquire a token from native device (e.g. WAM)\n * @param request\n */\n protected async acquireTokenNative(request: PopupRequest | SilentRequest | SsoSilentRequest, apiId: ApiId, accountId?: string): Promise {\n this.logger.trace(\"acquireTokenNative called\");\n if (!this.nativeExtensionProvider) {\n throw BrowserAuthError.createNativeConnectionNotEstablishedError();\n }\n\n const nativeClient = new NativeInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, apiId, this.performanceClient, this.nativeExtensionProvider, accountId || this.getNativeAccountId(request), this.nativeInternalStorage, request.correlationId);\n\n return nativeClient.acquireToken(request);\n }\n\n /**\n * Returns boolean indicating if this request can use the native broker\n * @param request\n */\n protected canUseNative(request: RedirectRequest | PopupRequest | SsoSilentRequest, accountId?: string): boolean {\n this.logger.trace(\"canUseNative called\");\n if (!NativeMessageHandler.isNativeAvailable(this.config, this.logger, this.nativeExtensionProvider, request.authenticationScheme)) {\n this.logger.trace(\"canUseNative: isNativeAvailable returned false, returning false\");\n return false;\n }\n\n if (request.prompt) {\n switch (request.prompt) {\n case PromptValue.NONE:\n case PromptValue.CONSENT:\n case PromptValue.LOGIN:\n this.logger.trace(\"canUseNative: prompt is compatible with native flow\");\n break;\n default:\n this.logger.trace(`canUseNative: prompt = ${request.prompt} is not compatible with native flow, returning false`);\n return false;\n }\n }\n\n if (!accountId && !this.getNativeAccountId(request)) {\n this.logger.trace(\"canUseNative: nativeAccountId is not available, returning false\");\n return false;\n }\n\n return true;\n }\n\n /**\n * Get the native accountId from the account\n * @param request\n * @returns\n */\n protected getNativeAccountId(request: RedirectRequest | PopupRequest | SsoSilentRequest): string {\n const account = request.account || this.browserStorage.getAccountInfoByHints(request.loginHint, request.sid) || this.getActiveAccount();\n\n return account && account.nativeAccountId || \"\";\n }\n\n /**\n * Returns new instance of the Popup Interaction Client\n * @param correlationId\n */\n protected createPopupClient(correlationId?: string): PopupClient {\n return new PopupClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, this.performanceClient, this.nativeInternalStorage, this.nativeExtensionProvider, correlationId);\n }\n\n /**\n * Returns new instance of the Redirect Interaction Client\n * @param correlationId\n */\n protected createRedirectClient(correlationId?: string): RedirectClient {\n return new RedirectClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, this.performanceClient, this.nativeInternalStorage, this.nativeExtensionProvider, correlationId);\n }\n\n /**\n * Returns new instance of the Silent Iframe Interaction Client\n * @param correlationId\n */\n protected createSilentIframeClient(correlationId?: string): SilentIframeClient {\n return new SilentIframeClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.ssoSilent, this.performanceClient, this.nativeInternalStorage, this.nativeExtensionProvider, correlationId);\n }\n\n /**\n * Returns new instance of the Silent Cache Interaction Client\n */\n protected createSilentCacheClient(correlationId?: string): SilentCacheClient {\n return new SilentCacheClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, this.performanceClient, this.nativeExtensionProvider, correlationId);\n }\n\n /**\n * Returns new instance of the Silent Refresh Interaction Client\n */\n protected createSilentRefreshClient(correlationId?: string): SilentRefreshClient {\n return new SilentRefreshClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, this.performanceClient, this.nativeExtensionProvider, correlationId);\n }\n\n /**\n * Returns new instance of the Silent AuthCode Interaction Client\n */\n protected createSilentAuthCodeClient(correlationId?: string): SilentAuthCodeClient {\n return new SilentAuthCodeClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.acquireTokenByCode, this.performanceClient, this.nativeExtensionProvider, correlationId);\n }\n\n /**\n * Adds event callbacks to array\n * @param callback\n */\n addEventCallback(callback: EventCallbackFunction): string | null {\n return this.eventHandler.addEventCallback(callback);\n }\n\n /**\n * Removes callback with provided id from callback array\n * @param callbackId\n */\n removeEventCallback(callbackId: string): void {\n this.eventHandler.removeEventCallback(callbackId);\n }\n\n /**\n * Registers a callback to receive performance events.\n *\n * @param {PerformanceCallbackFunction} callback\n * @returns {string}\n */\n addPerformanceCallback(callback: PerformanceCallbackFunction): string {\n return this.performanceClient.addPerformanceCallback(callback);\n }\n\n /**\n * Removes a callback registered with addPerformanceCallback.\n *\n * @param {string} callbackId\n * @returns {boolean}\n */\n removePerformanceCallback(callbackId: string): boolean {\n return this.performanceClient.removePerformanceCallback(callbackId);\n }\n\n /**\n * Adds event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window\n */\n enableAccountStorageEvents(): void {\n this.eventHandler.enableAccountStorageEvents();\n }\n\n /**\n * Removes event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window\n */\n disableAccountStorageEvents(): void {\n this.eventHandler.disableAccountStorageEvents();\n }\n\n /**\n * Gets the token cache for the application.\n */\n getTokenCache(): ITokenCache {\n return this.tokenCache;\n }\n\n /**\n * Returns the logger instance\n */\n getLogger(): Logger {\n return this.logger;\n }\n\n /**\n * Replaces the default logger set in configurations with new Logger with new configurations\n * @param logger Logger instance\n */\n setLogger(logger: Logger): void {\n this.logger = logger;\n }\n\n /**\n * Called by wrapper libraries (Angular & React) to set SKU and Version passed down to telemetry, logger, etc.\n * @param sku\n * @param version\n */\n initializeWrapperLibrary(sku: WrapperSKU, version: string): void {\n // Validate the SKU passed in is one we expect\n this.browserStorage.setWrapperMetadata(sku, version);\n }\n\n /**\n * Sets navigation client\n * @param navigationClient\n */\n setNavigationClient(navigationClient: INavigationClient): void {\n this.navigationClient = navigationClient;\n }\n\n /**\n * Returns the configuration object\n */\n getConfiguration(): BrowserConfiguration {\n return this.config;\n }\n\n /**\n * Generates a correlation id for a request if none is provided.\n *\n * @protected\n * @param {?Partial} [request]\n * @returns {string}\n */\n protected getRequestCorrelationId(request?: Partial): string {\n if (request?.correlationId) {\n return request.correlationId;\n }\n\n if (this.isBrowserEnvironment) {\n return this.browserCrypto.createNewGuid();\n }\n\n /*\n * Included for fallback for non-browser environments,\n * and to ensure this method always returns a string.\n */\n return Constants.EMPTY_STRING;\n }\n\n // #endregion\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;IA0GI,2BAAY,aAA4B;;;;;;QAMpC,IAAI,CAAC,oBAAoB,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC;;QAE1D,IAAI,CAAC,MAAM,GAAG,kBAAkB,CAAC,aAAa,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAC3E,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;;QAGzB,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;;QAG1E,IAAI,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