@azure/msal-browser 2.16.1 → 2.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +283 -0
- package/{changelog.md → CHANGELOG.md} +73 -1
- package/README.md +12 -4
- package/dist/_virtual/_tslib.js +1 -1
- package/dist/app/ClientApplication.d.ts +35 -137
- package/dist/app/ClientApplication.d.ts.map +1 -1
- package/dist/app/ClientApplication.js +178 -883
- package/dist/app/ClientApplication.js.map +1 -1
- package/dist/app/IPublicClientApplication.d.ts +8 -0
- package/dist/app/IPublicClientApplication.d.ts.map +1 -1
- package/dist/app/IPublicClientApplication.js +16 -1
- package/dist/app/IPublicClientApplication.js.map +1 -1
- package/dist/app/PublicClientApplication.d.ts.map +1 -1
- package/dist/app/PublicClientApplication.js +35 -41
- package/dist/app/PublicClientApplication.js.map +1 -1
- package/dist/cache/AsyncMemoryStorage.d.ts +46 -0
- package/dist/cache/AsyncMemoryStorage.d.ts.map +1 -0
- package/dist/cache/AsyncMemoryStorage.js +195 -0
- package/dist/cache/AsyncMemoryStorage.js.map +1 -0
- package/dist/cache/BrowserCacheManager.d.ts +19 -2
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.js +104 -15
- package/dist/cache/BrowserCacheManager.js.map +1 -1
- package/dist/cache/BrowserStorage.d.ts +1 -1
- package/dist/cache/BrowserStorage.d.ts.map +1 -1
- package/dist/cache/BrowserStorage.js +1 -1
- package/dist/cache/BrowserStorage.js.map +1 -1
- package/dist/cache/DatabaseStorage.d.ts +29 -4
- package/dist/cache/DatabaseStorage.d.ts.map +1 -1
- package/dist/cache/DatabaseStorage.js +151 -45
- package/dist/cache/DatabaseStorage.js.map +1 -1
- package/dist/cache/IAsyncMemoryStorage.d.ts +28 -0
- package/dist/cache/IAsyncMemoryStorage.d.ts.map +1 -0
- package/dist/cache/ITokenCache.d.ts +8 -0
- package/dist/cache/ITokenCache.d.ts.map +1 -0
- package/dist/cache/IWindowStorage.d.ts +3 -3
- package/dist/cache/IWindowStorage.d.ts.map +1 -1
- package/dist/cache/MemoryStorage.d.ts +3 -3
- package/dist/cache/MemoryStorage.d.ts.map +1 -1
- package/dist/cache/MemoryStorage.js +1 -1
- package/dist/cache/MemoryStorage.js.map +1 -1
- package/dist/cache/TokenCache.d.ts +48 -0
- package/dist/cache/TokenCache.d.ts.map +1 -0
- package/dist/cache/TokenCache.js +124 -0
- package/dist/cache/TokenCache.js.map +1 -0
- package/dist/config/Configuration.js +1 -1
- package/dist/crypto/BrowserCrypto.d.ts +3 -1
- package/dist/crypto/BrowserCrypto.d.ts.map +1 -1
- package/dist/crypto/BrowserCrypto.js +3 -2
- package/dist/crypto/BrowserCrypto.js.map +1 -1
- package/dist/crypto/CryptoOps.d.ts +21 -6
- package/dist/crypto/CryptoOps.d.ts.map +1 -1
- package/dist/crypto/CryptoOps.js +67 -15
- package/dist/crypto/CryptoOps.js.map +1 -1
- package/dist/crypto/GuidGenerator.js +1 -1
- package/dist/crypto/PkceGenerator.js +1 -1
- package/dist/crypto/SignedHttpRequest.d.ts +31 -0
- package/dist/crypto/SignedHttpRequest.d.ts.map +1 -0
- package/dist/crypto/SignedHttpRequest.js +70 -0
- package/dist/crypto/SignedHttpRequest.js.map +1 -0
- package/dist/encode/Base64Decode.js +1 -1
- package/dist/encode/Base64Encode.js +1 -1
- package/dist/error/BrowserAuthError.d.ts +36 -4
- package/dist/error/BrowserAuthError.d.ts.map +1 -1
- package/dist/error/BrowserAuthError.js +51 -11
- package/dist/error/BrowserAuthError.js.map +1 -1
- package/dist/error/BrowserConfigurationAuthError.js +1 -1
- package/dist/event/EventHandler.d.ts +13 -0
- package/dist/event/EventHandler.d.ts.map +1 -1
- package/dist/event/EventHandler.js +66 -1
- package/dist/event/EventHandler.js.map +1 -1
- package/dist/event/EventMessage.d.ts +4 -3
- package/dist/event/EventMessage.d.ts.map +1 -1
- package/dist/event/EventMessage.js +24 -5
- package/dist/event/EventMessage.js.map +1 -1
- package/dist/event/EventType.d.ts +5 -0
- package/dist/event/EventType.d.ts.map +1 -1
- package/dist/event/EventType.js +6 -1
- package/dist/event/EventType.js.map +1 -1
- package/dist/index.cjs.js +4678 -2996
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/interaction_client/BaseInteractionClient.d.ts +42 -0
- package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -0
- package/dist/interaction_client/BaseInteractionClient.js +131 -0
- package/dist/interaction_client/BaseInteractionClient.js.map +1 -0
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.d.ts +5 -0
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.d.ts.map +1 -0
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +21 -0
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js.map +1 -0
- package/dist/interaction_client/PopupClient.d.ts +37 -0
- package/dist/interaction_client/PopupClient.d.ts.map +1 -0
- package/dist/interaction_client/PopupClient.js +234 -0
- package/dist/interaction_client/PopupClient.js.map +1 -0
- package/dist/interaction_client/RedirectClient.d.ts +42 -0
- package/dist/interaction_client/RedirectClient.d.ts.map +1 -0
- package/dist/interaction_client/RedirectClient.js +301 -0
- package/dist/interaction_client/RedirectClient.js.map +1 -0
- package/dist/interaction_client/SilentAuthCodeClient.d.ts +22 -0
- package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -0
- package/dist/interaction_client/SilentAuthCodeClient.js +80 -0
- package/dist/interaction_client/SilentAuthCodeClient.js.map +1 -0
- package/dist/interaction_client/SilentCacheClient.d.ts +22 -0
- package/dist/interaction_client/SilentCacheClient.d.ts.map +1 -0
- package/dist/interaction_client/SilentCacheClient.js +85 -0
- package/dist/interaction_client/SilentCacheClient.js.map +1 -0
- package/dist/interaction_client/SilentIframeClient.d.ts +29 -0
- package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -0
- package/dist/interaction_client/SilentIframeClient.js +107 -0
- package/dist/interaction_client/SilentIframeClient.js.map +1 -0
- package/dist/interaction_client/SilentRefreshClient.d.ts +20 -0
- package/dist/interaction_client/SilentRefreshClient.d.ts.map +1 -0
- package/dist/interaction_client/SilentRefreshClient.js +76 -0
- package/dist/interaction_client/SilentRefreshClient.js.map +1 -0
- package/dist/interaction_client/StandardInteractionClient.d.ts +66 -0
- package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -0
- package/dist/interaction_client/StandardInteractionClient.js +249 -0
- package/dist/interaction_client/StandardInteractionClient.js.map +1 -0
- package/dist/interaction_handler/InteractionHandler.d.ts +11 -2
- package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
- package/dist/interaction_handler/InteractionHandler.js +36 -10
- package/dist/interaction_handler/InteractionHandler.js.map +1 -1
- package/dist/interaction_handler/PopupHandler.d.ts +2 -0
- package/dist/interaction_handler/PopupHandler.d.ts.map +1 -1
- package/dist/interaction_handler/PopupHandler.js +3 -4
- package/dist/interaction_handler/PopupHandler.js.map +1 -1
- package/dist/interaction_handler/RedirectHandler.d.ts +1 -1
- package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
- package/dist/interaction_handler/RedirectHandler.js +7 -6
- package/dist/interaction_handler/RedirectHandler.js.map +1 -1
- package/dist/interaction_handler/SilentHandler.js +1 -1
- package/dist/navigation/NavigationClient.js +1 -1
- package/dist/network/FetchClient.js +1 -1
- package/dist/network/XhrClient.js +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.js +2 -2
- package/dist/packageMetadata.js.map +1 -1
- package/dist/request/AuthorizationCodeRequest.d.ts +8 -0
- package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -0
- package/dist/request/EndSessionPopupRequest.d.ts +3 -0
- package/dist/request/EndSessionPopupRequest.d.ts.map +1 -1
- package/dist/request/PopupRequest.d.ts +3 -0
- package/dist/request/PopupRequest.d.ts.map +1 -1
- package/dist/request/RedirectRequest.d.ts.map +1 -1
- package/dist/utils/BrowserConstants.d.ts +13 -1
- package/dist/utils/BrowserConstants.d.ts.map +1 -1
- package/dist/utils/BrowserConstants.js +17 -3
- package/dist/utils/BrowserConstants.js.map +1 -1
- package/dist/utils/BrowserProtocolUtils.js +1 -1
- package/dist/utils/BrowserStringUtils.js +1 -1
- package/dist/utils/BrowserUtils.js +1 -1
- package/dist/utils/MathUtils.js +1 -1
- package/dist/utils/PopupUtils.d.ts +26 -2
- package/dist/utils/PopupUtils.d.ts.map +1 -1
- package/dist/utils/PopupUtils.js +42 -15
- package/dist/utils/PopupUtils.js.map +1 -1
- package/lib/msal-browser.js +4678 -2996
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +32 -32
- package/package.json +9 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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 { Authority, StringUtils, UrlString, ServerAuthorizationCodeResponse, CommonAuthorizationCodeRequest, AuthorizationCodeClient, PromptValue, ServerError, InteractionRequiredAuthError, AccountInfo, AuthorityFactory, ServerTelemetryManager, SilentFlowClient, ClientConfiguration, BaseAuthRequest, ServerTelemetryRequest, PersistentCacheKeys, IdToken, ProtocolUtils, ResponseMode, Constants, INetworkModule, AuthenticationResult, Logger, ThrottlingUtils, RefreshTokenClient, AuthenticationScheme, CommonSilentFlowRequest, CommonEndSessionRequest, AccountEntity, ICrypto, DEFAULT_CRYPTO_IMPLEMENTATION, AuthorityOptions } from \"@azure/msal-common\";\nimport { BrowserCacheManager, DEFAULT_BROWSER_CACHE_MANAGER } from \"../cache/BrowserCacheManager\";\nimport { BrowserConfiguration, buildConfiguration, Configuration } from \"../config/Configuration\";\nimport { TemporaryCacheKeys, InteractionType, ApiId, BrowserConstants, BrowserCacheLocation, WrapperSKU } from \"../utils/BrowserConstants\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\nimport { BrowserStateObject, BrowserProtocolUtils } from \"../utils/BrowserProtocolUtils\";\nimport { RedirectHandler } from \"../interaction_handler/RedirectHandler\";\nimport { PopupHandler, PopupParams } from \"../interaction_handler/PopupHandler\";\nimport { SilentHandler } from \"../interaction_handler/SilentHandler\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { AuthorizationUrlRequest } from \"../request/AuthorizationUrlRequest\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\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 { PopupUtils } from \"../utils/PopupUtils\";\nimport { EndSessionPopupRequest } from \"../request/EndSessionPopupRequest\";\nimport { INavigationClient } from \"../navigation/INavigationClient\";\nimport { NavigationOptions } from \"../navigation/NavigationOptions\";\nimport { EventHandler } from \"../event/EventHandler\";\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 // 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 // Logger\n protected logger: Logger;\n\n // Flag to indicate if in browser environment\n protected isBrowserEnvironment: boolean;\n\n // Set the SKU and Version for wrapper library if applicable\n private wrapperSKU: string | undefined;\n private wrapperVer: string | undefined;\n\n protected eventHandler: EventHandler;\n\n // Redirect Response Object\n private redirectResponse: Map<string, Promise<AuthenticationResult | null>>;\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\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 // Initialize the crypto class.\n this.browserCrypto = this.isBrowserEnvironment ? new CryptoOps() : 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\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<AuthenticationResult | null> {\n this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_START, InteractionType.Redirect);\n this.logger.verbose(\"handleRedirectPromise called\");\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.logger.verbose(\"handleRedirectPromise has been called for the first time, storing the promise\");\n response = this.handleRedirectResponse(hash)\n .then((result: AuthenticationResult | null) => {\n if (result) {\n // Emit login event if number of accounts change\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 })\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 * Checks if navigateToLoginRequestUrl is set, and:\n * - if true, performs logic to cache and navigate\n * - if false, handles hash string and parses response\n * @param hash\n */\n private async handleRedirectResponse(hash?: string): Promise<AuthenticationResult | null> {\n if (!this.interactionInProgress()) {\n this.logger.info(\"handleRedirectPromise called but there is no interaction in progress, returning null.\");\n return null;\n }\n\n const responseHash = this.getRedirectResponseHash(hash || window.location.hash);\n if (!responseHash) {\n // Not a recognized server response hash or hash not associated with a redirect request\n this.logger.info(\"handleRedirectPromise did not detect a response hash as a result of a redirect. Cleaning temporary cache.\");\n this.browserStorage.cleanRequestByInteractionType(InteractionType.Redirect);\n return null;\n }\n\n let state: string;\n try {\n state = this.validateAndExtractStateFromHash(responseHash, InteractionType.Redirect);\n BrowserUtils.clearHash(window);\n this.logger.verbose(\"State extracted from hash\");\n } catch (e) {\n this.logger.info(`handleRedirectPromise was unable to extract state due to: ${e}`);\n this.browserStorage.cleanRequestByInteractionType(InteractionType.Redirect);\n return null;\n }\n\n // If navigateToLoginRequestUrl is true, get the url where the redirect request was initiated\n const loginRequestUrl = this.browserStorage.getTemporaryCache(TemporaryCacheKeys.ORIGIN_URI, true) || \"\";\n const loginRequestUrlNormalized = UrlString.removeHashFromUrl(loginRequestUrl);\n const currentUrlNormalized = UrlString.removeHashFromUrl(window.location.href);\n\n if (loginRequestUrlNormalized === currentUrlNormalized && this.config.auth.navigateToLoginRequestUrl) {\n // We are on the page we need to navigate to - handle hash\n this.logger.verbose(\"Current page is loginRequestUrl, handling hash\");\n const handleHashResult = await this.handleHash(responseHash, state);\n\n if (loginRequestUrl.indexOf(\"#\") > -1) {\n // Replace current hash with non-msal hash, if present\n BrowserUtils.replaceHash(loginRequestUrl);\n }\n\n return handleHashResult;\n } else if (!this.config.auth.navigateToLoginRequestUrl) {\n this.logger.verbose(\"NavigateToLoginRequestUrl set to false, handling hash\");\n return this.handleHash(responseHash, state);\n } else if (!BrowserUtils.isInIframe()) {\n /*\n * Returned from authority using redirect - need to perform navigation before processing response\n * Cache the hash to be retrieved after the next redirect\n */\n this.browserStorage.setTemporaryCache(TemporaryCacheKeys.URL_HASH, responseHash, true);\n const navigationOptions: NavigationOptions = {\n apiId: ApiId.handleRedirectPromise,\n timeout: this.config.system.redirectNavigationTimeout,\n noHistory: true\n };\n\n /**\n * Default behavior is to redirect to the start page and not process the hash now. \n * The start page is expected to also call handleRedirectPromise which will process the hash in one of the checks above.\n */ \n let processHashOnRedirect: boolean = true;\n if (!loginRequestUrl || loginRequestUrl === \"null\") {\n // Redirect to home page if login request url is null (real null or the string null)\n const homepage = BrowserUtils.getHomepage();\n // Cache the homepage under ORIGIN_URI to ensure cached hash is processed on homepage\n this.browserStorage.setTemporaryCache(TemporaryCacheKeys.ORIGIN_URI, homepage, true);\n this.logger.warning(\"Unable to get valid login request url from cache, redirecting to home page\");\n processHashOnRedirect = await this.navigationClient.navigateInternal(homepage, navigationOptions);\n } else {\n // Navigate to page that initiated the redirect request\n this.logger.verbose(`Navigating to loginRequestUrl: ${loginRequestUrl}`);\n processHashOnRedirect = await this.navigationClient.navigateInternal(loginRequestUrl, navigationOptions);\n }\n\n // If navigateInternal implementation returns false, handle the hash now\n if (!processHashOnRedirect) {\n return this.handleHash(responseHash, state);\n }\n }\n\n return null;\n }\n\n /**\n * Gets the response hash for a redirect request\n * Returns null if interactionType in the state value is not \"redirect\" or the hash does not contain known properties\n * @param hash\n */\n private getRedirectResponseHash(hash: string): string | null {\n this.logger.verbose(\"getRedirectResponseHash called\");\n // Get current location hash from window or cache.\n const isResponseHash: boolean = UrlString.hashContainsKnownProperties(hash);\n const cachedHash = this.browserStorage.getTemporaryCache(TemporaryCacheKeys.URL_HASH, true);\n this.browserStorage.removeItem(this.browserStorage.generateCacheKey(TemporaryCacheKeys.URL_HASH));\n\n if (isResponseHash) {\n this.logger.verbose(\"Hash contains known properties, returning response hash\");\n return hash;\n }\n\n this.logger.verbose(\"Hash does not contain known properties, returning cached hash\");\n return cachedHash;\n }\n\n /**\n * @param hash\n * @param interactionType\n */\n private validateAndExtractStateFromHash(hash: string, interactionType: InteractionType, requestCorrelationId?: string): string {\n this.logger.verbose(\"validateAndExtractStateFromHash called\", requestCorrelationId);\n // Deserialize hash fragment response parameters.\n const serverParams: ServerAuthorizationCodeResponse = UrlString.getDeserializedHash(hash);\n if (!serverParams.state) {\n throw BrowserAuthError.createHashDoesNotContainStateError();\n }\n\n const platformStateObj = BrowserProtocolUtils.extractBrowserRequestState(this.browserCrypto, serverParams.state);\n if (!platformStateObj) {\n throw BrowserAuthError.createUnableToParseStateError();\n }\n\n if (platformStateObj.interactionType !== interactionType) {\n throw BrowserAuthError.createStateInteractionTypeMismatchError();\n }\n\n this.logger.verbose(\"Returning state from hash\", requestCorrelationId);\n return serverParams.state;\n }\n\n /**\n * Checks if hash exists and handles in window.\n * @param hash\n * @param state\n */\n private async handleHash(hash: string, state: string): Promise<AuthenticationResult> {\n const cachedRequest = this.browserStorage.getCachedRequest(state, this.browserCrypto);\n const browserRequestLogger = this.logger.clone(name, version, cachedRequest.correlationId);\n browserRequestLogger.verbose(\"handleHash called, retrieved cached request\");\n const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.handleRedirectPromise, cachedRequest.correlationId);\n\n try {\n // Hash contains known properties - handle and return in callback\n const currentAuthority = this.browserStorage.getCachedAuthority(state);\n if (!currentAuthority) {\n throw BrowserAuthError.createNoCachedAuthorityError();\n }\n\n const authClient = await this.createAuthCodeClient(serverTelemetryManager, currentAuthority, cachedRequest.correlationId);\n browserRequestLogger.verbose(\"Auth code client created\");\n const interactionHandler = new RedirectHandler(authClient, this.browserStorage, cachedRequest, browserRequestLogger, this.browserCrypto);\n return await interactionHandler.handleCodeResponse(hash, state, authClient.authority, this.networkClient, this.config.auth.clientId);\n } catch (e) {\n serverTelemetryManager.cacheFailedRequest(e);\n this.browserStorage.cleanRequestByInteractionType(InteractionType.Redirect);\n throw e;\n }\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<void> {\n // Preflight request\n this.preflightBrowserEnvironmentCheck(InteractionType.Redirect);\n this.logger.verbose(\"acquireTokenRedirect called\");\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 const validRequest: AuthorizationUrlRequest = this.preflightInteractiveRequest(request, InteractionType.Redirect);\n const browserRequestLogger = this.logger.clone(name, version, validRequest.correlationId);\n const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenRedirect, validRequest.correlationId);\n\n try {\n // Create auth code request and generate PKCE params\n const authCodeRequest: CommonAuthorizationCodeRequest = await this.initializeAuthorizationCodeRequest(validRequest);\n\n // Initialize the client\n const authClient: AuthorizationCodeClient = await this.createAuthCodeClient(serverTelemetryManager, validRequest.authority, validRequest.correlationId);\n browserRequestLogger.verbose(\"Auth code client created\");\n\n // Create redirect interaction handler.\n const interactionHandler = new RedirectHandler(authClient, this.browserStorage, authCodeRequest, browserRequestLogger, this.browserCrypto);\n\n // Create acquire token url.\n const navigateUrl = await authClient.getAuthCodeUrl(validRequest);\n\n const redirectStartPage = this.getRedirectStartPage(request.redirectStartPage);\n browserRequestLogger.verbosePii(`Redirect start page: ${redirectStartPage}`);\n\n // Show the UI once the url has been created. Response will come back in the hash, which will be handled in the handleRedirectCallback function.\n return interactionHandler.initiateAuthRequest(navigateUrl, {\n navigationClient: this.navigationClient,\n redirectTimeout: this.config.system.redirectNavigationTimeout,\n redirectStartPage: redirectStartPage,\n onRedirectNavigate: request.onRedirectNavigate\n });\n } 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\n serverTelemetryManager.cacheFailedRequest(e);\n this.browserStorage.cleanRequestByState(validRequest.state);\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<AuthenticationResult> {\n let validRequest: AuthorizationUrlRequest;\n try {\n this.preflightBrowserEnvironmentCheck(InteractionType.Popup);\n this.logger.verbose(\"acquireTokenPopup called\", request.correlationId);\n validRequest = this.preflightInteractiveRequest(request, InteractionType.Popup);\n } catch (e) {\n // Since this function is syncronous we need to reject\n return Promise.reject(e);\n }\n\n const popupName = PopupUtils.generatePopupName(this.config.auth.clientId, validRequest);\n\n // asyncPopups flag is true. Acquires token without first opening popup. Popup will be opened later asynchronously.\n if (this.config.system.asyncPopups) {\n this.logger.verbose(\"asyncPopups set to true, acquiring token\", validRequest.correlationId);\n return this.acquireTokenPopupAsync(validRequest, popupName);\n } else {\n // asyncPopups flag is set to false. Opens popup before acquiring token.\n this.logger.verbose(\"asyncPopup set to false, opening popup before acquiring token\", validRequest.correlationId);\n const popup = PopupUtils.openSizedPopup(\"about:blank\", popupName);\n return this.acquireTokenPopupAsync(validRequest, popupName, popup);\n }\n }\n\n /**\n * Helper which obtains an access_token for your API via opening a popup window in the user's browser\n * @param validRequest\n * @param popupName\n * @param popup\n *\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\n */\n private async acquireTokenPopupAsync(validRequest: AuthorizationUrlRequest, popupName: string, popup?: Window|null): Promise<AuthenticationResult> {\n this.logger.verbose(\"acquireTokenPopupAsync called\", validRequest.correlationId);\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, validRequest);\n } else {\n this.eventHandler.emitEvent(EventType.LOGIN_START, InteractionType.Popup, validRequest);\n }\n\n const browserRequestLogger = this.logger.clone(name, version, validRequest.correlationId);\n const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenPopup, validRequest.correlationId);\n\n try {\n // Create auth code request and generate PKCE params\n const authCodeRequest: CommonAuthorizationCodeRequest = await this.initializeAuthorizationCodeRequest(validRequest);\n\n // Initialize the client\n const authClient: AuthorizationCodeClient = await this.createAuthCodeClient(serverTelemetryManager, validRequest.authority, validRequest.correlationId);\n browserRequestLogger.verbose(\"Auth code client created\");\n\n // Create acquire token url.\n const navigateUrl = await authClient.getAuthCodeUrl(validRequest);\n\n // Create popup interaction handler.\n const interactionHandler = new PopupHandler(authClient, this.browserStorage, authCodeRequest, browserRequestLogger);\n\n // Show the UI once the url has been created. Get the window handle for the popup.\n const popupParameters: PopupParams = {\n popup,\n popupName\n };\n const popupWindow: Window = interactionHandler.initiateAuthRequest(navigateUrl, popupParameters);\n this.eventHandler.emitEvent(EventType.POPUP_OPENED, InteractionType.Popup, {popupWindow}, null);\n\n // Monitor the window for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.\n const hash = await interactionHandler.monitorPopupForHash(popupWindow);\n const state = this.validateAndExtractStateFromHash(hash, InteractionType.Popup, validRequest.correlationId);\n\n // Remove throttle if it exists\n ThrottlingUtils.removeThrottle(this.browserStorage, this.config.auth.clientId, authCodeRequest.authority, authCodeRequest.scopes);\n\n // Handle response from hash string.\n const result = await interactionHandler.handleCodeResponse(hash, state, authClient.authority, this.networkClient);\n\n // If logged in, emit acquire token events\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 return result;\n } catch (e) {\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 if (popup) {\n // Close the synchronous popup if an error is thrown before the window unload event is registered\n popup.close();\n }\n\n serverTelemetryManager.cacheFailedRequest(e);\n this.browserStorage.cleanRequestByState(validRequest.state);\n throw 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<AuthenticationResult> {\n this.preflightBrowserEnvironmentCheck(InteractionType.Silent);\n this.logger.verbose(\"ssoSilent called\", request.correlationId);\n this.eventHandler.emitEvent(EventType.SSO_SILENT_START, InteractionType.Silent, request);\n\n try {\n const silentTokenResult = await this.acquireTokenByIframe(request, ApiId.ssoSilent);\n this.eventHandler.emitEvent(EventType.SSO_SILENT_SUCCESS, InteractionType.Silent, silentTokenResult);\n return silentTokenResult;\n } catch (e) {\n this.eventHandler.emitEvent(EventType.SSO_SILENT_FAILURE, InteractionType.Silent, null, e);\n throw e;\n }\n }\n\n /**\n * This function uses a hidden iframe to fetch an authorization code from the eSTS. To be used for silent refresh token acquisition and renewal.\n * @param request\n * @param apiId - ApiId of the calling function. Used for telemetry.\n */\n private async acquireTokenByIframe(request: SsoSilentRequest, apiId: ApiId): Promise<AuthenticationResult> {\n this.logger.verbose(\"acquireTokenByIframe called\", request.correlationId);\n // Check that we have some SSO data\n if (StringUtils.isEmpty(request.loginHint) && StringUtils.isEmpty(request.sid) && (!request.account || StringUtils.isEmpty(request.account.username))) {\n throw BrowserAuthError.createSilentSSOInsufficientInfoError();\n }\n\n // Check that prompt is set to none, throw error if it is set to anything else.\n if (request.prompt && request.prompt !== PromptValue.NONE) {\n throw BrowserAuthError.createSilentPromptValueError(request.prompt);\n }\n\n // Create silent request\n const silentRequest: AuthorizationUrlRequest = this.initializeAuthorizationRequest({\n ...request,\n prompt: PromptValue.NONE\n }, InteractionType.Silent);\n\n const browserRequestLogger = this.logger.clone(name, version, silentRequest.correlationId);\n const serverTelemetryManager = this.initializeServerTelemetryManager(apiId, silentRequest.correlationId);\n\n try {\n // Create auth code request and generate PKCE params\n const authCodeRequest: CommonAuthorizationCodeRequest = await this.initializeAuthorizationCodeRequest(silentRequest);\n\n // Initialize the client\n const authClient: AuthorizationCodeClient = await this.createAuthCodeClient(serverTelemetryManager, silentRequest.authority, silentRequest.correlationId);\n browserRequestLogger.verbose(\"Auth code client created\");\n\n // Create authorize request url\n const navigateUrl = await authClient.getAuthCodeUrl(silentRequest);\n\n return await this.silentTokenHelper(navigateUrl, authCodeRequest, authClient, browserRequestLogger);\n } catch (e) {\n serverTelemetryManager.cacheFailedRequest(e);\n this.browserStorage.cleanRequestByState(silentRequest.state);\n throw e;\n }\n }\n\n /**\n * Use this function to obtain a token before every call to the API / resource provider\n *\n * MSAL return's a cached token when available\n * Or it send's a request to the STS to obtain a new token using a refresh token.\n *\n * @param {@link SilentRequest}\n *\n * To renew idToken, please pass clientId as the only scope in the Authentication Parameters\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\n */\n protected async acquireTokenByRefreshToken(request: CommonSilentFlowRequest): Promise<AuthenticationResult> {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_NETWORK_START, InteractionType.Silent, request);\n // block the reload if it occurred inside a hidden iframe\n BrowserUtils.blockReloadInHiddenIframes();\n const silentRequest: CommonSilentFlowRequest = {\n ...request,\n ...this.initializeBaseRequest(request)\n };\n const browserRequestLogger = this.logger.clone(name, version, silentRequest.correlationId);\n const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenSilent_silentFlow, silentRequest.correlationId);\n try {\n const refreshTokenClient = await this.createRefreshTokenClient(serverTelemetryManager, silentRequest.authority, silentRequest.correlationId);\n browserRequestLogger.verbose(\"Refresh token client created\");\n \n // Send request to renew token. Auth module will throw errors if token cannot be renewed.\n return await refreshTokenClient.acquireTokenByRefreshToken(silentRequest);\n } catch (e) {\n serverTelemetryManager.cacheFailedRequest(e);\n const isServerError = e instanceof ServerError;\n const isInteractionRequiredError = e instanceof InteractionRequiredAuthError;\n const isInvalidGrantError = (e.errorCode === BrowserConstants.INVALID_GRANT_ERROR);\n if (isServerError && isInvalidGrantError && !isInteractionRequiredError) {\n browserRequestLogger.verbose(\"Refresh token expired or invalid, attempting acquire token by iframe\");\n return await this.acquireTokenByIframe(request, ApiId.acquireTokenSilent_authCode);\n }\n throw e;\n }\n }\n\n /**\n * Helper which acquires an authorization code silently using a hidden iframe from given url\n * using the scopes requested as part of the id, and exchanges the code for a set of OAuth tokens.\n * @param navigateUrl\n * @param userRequestScopes\n */\n private async silentTokenHelper(navigateUrl: string, authCodeRequest: CommonAuthorizationCodeRequest, authClient: AuthorizationCodeClient, browserRequestLogger: Logger): Promise<AuthenticationResult> {\n // Create silent handler\n const silentHandler = new SilentHandler(authClient, this.browserStorage, authCodeRequest, browserRequestLogger, this.config.system.navigateFrameWait);\n // Get the frame handle for the silent request\n const msalFrame = await silentHandler.initiateAuthRequest(navigateUrl);\n // Monitor the window for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.\n const hash = await silentHandler.monitorIframeForHash(msalFrame, this.config.system.iframeHashTimeout);\n const state = this.validateAndExtractStateFromHash(hash, InteractionType.Silent, authCodeRequest.correlationId);\n\n // Handle response from hash string\n return silentHandler.handleCodeResponse(hash, state, authClient.authority, this.networkClient);\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<void> {\n this.logger.warning(\"logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.\");\n return this.logoutRedirect(logoutRequest);\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<void> {\n this.preflightBrowserEnvironmentCheck(InteractionType.Redirect);\n this.logger.verbose(\"logoutRedirect called\", logoutRequest?.correlationId);\n const validLogoutRequest = this.initializeLogoutRequest(logoutRequest);\n const browserRequestLogger = this.logger.clone(name, version, validLogoutRequest.correlationId);\n const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.logout, validLogoutRequest.correlationId);\n\n try {\n this.eventHandler.emitEvent(EventType.LOGOUT_START, InteractionType.Redirect, logoutRequest);\n const authClient = await this.createAuthCodeClient(serverTelemetryManager, logoutRequest && logoutRequest.authority, validLogoutRequest?.correlationId);\n browserRequestLogger.verbose(\"Auth code client created\");\n\n // create logout string and navigate user window to logout. Auth module will clear cache.\n const logoutUri: string = authClient.getLogoutUri(validLogoutRequest);\n \n if (!validLogoutRequest.account || AccountEntity.accountInfoIsEqual(validLogoutRequest.account, this.getActiveAccount(), false)) {\n browserRequestLogger.verbose(\"Setting active account to null\");\n this.setActiveAccount(null);\n }\n \n const navigationOptions: NavigationOptions = {\n apiId: ApiId.logout,\n timeout: this.config.system.redirectNavigationTimeout,\n noHistory: false\n };\n \n this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS, InteractionType.Redirect, validLogoutRequest);\n // Check if onRedirectNavigate is implemented, and invoke it if so\n if (logoutRequest && typeof logoutRequest.onRedirectNavigate === \"function\") {\n const navigate = logoutRequest.onRedirectNavigate(logoutUri);\n\n if (navigate !== false) {\n browserRequestLogger.verbose(\"Logout onRedirectNavigate did not return false, navigating\");\n await this.navigationClient.navigateExternal(logoutUri, navigationOptions);\n return;\n } else {\n browserRequestLogger.verbose(\"Logout onRedirectNavigate returned false, stopping navigation\");\n }\n } else {\n await this.navigationClient.navigateExternal(logoutUri, navigationOptions);\n return;\n }\n } catch(e) {\n serverTelemetryManager.cacheFailedRequest(e);\n this.eventHandler.emitEvent(EventType.LOGOUT_FAILURE, InteractionType.Redirect, null, e);\n throw e;\n }\n\n this.eventHandler.emitEvent(EventType.LOGOUT_END, InteractionType.Redirect);\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<void> {\n let validLogoutRequest: CommonEndSessionRequest;\n try {\n this.preflightBrowserEnvironmentCheck(InteractionType.Popup);\n this.logger.verbose(\"logoutPopup called\", logoutRequest?.correlationId);\n validLogoutRequest = this.initializeLogoutRequest(logoutRequest);\n } catch (e) {\n // Since this function is synchronous we need to reject\n return Promise.reject(e);\n }\n\n const popupName = PopupUtils.generateLogoutPopupName(this.config.auth.clientId, validLogoutRequest);\n let popup;\n\n // asyncPopups flag is true. Acquires token without first opening popup. Popup will be opened later asynchronously.\n if (this.config.system.asyncPopups) {\n this.logger.verbose(\"asyncPopups set to true\", validLogoutRequest.correlationId);\n } else {\n // asyncPopups flag is set to false. Opens popup before logging out.\n this.logger.verbose(\"asyncPopup set to false, opening popup\", validLogoutRequest.correlationId);\n popup = PopupUtils.openSizedPopup(\"about:blank\", popupName);\n }\n\n const authority = logoutRequest && logoutRequest.authority;\n const mainWindowRedirectUri = logoutRequest && logoutRequest.mainWindowRedirectUri;\n return this.logoutPopupAsync(validLogoutRequest, popupName, authority, popup, mainWindowRedirectUri);\n }\n\n /**\n * \n * @param request \n * @param popupName \n * @param requestAuthority\n * @param popup \n */\n private async logoutPopupAsync(validRequest: CommonEndSessionRequest, popupName: string, requestAuthority?: string, popup?: Window|null, mainWindowRedirectUri?: string): Promise<void> {\n this.logger.verbose(\"logoutPopupAsync called\", validRequest.correlationId);\n this.eventHandler.emitEvent(EventType.LOGOUT_START, InteractionType.Popup, validRequest);\n\n const browserRequestLogger = this.logger.clone(name, version, validRequest.correlationId);\n const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.logoutPopup, validRequest.correlationId);\n \n try {\n this.browserStorage.setTemporaryCache(TemporaryCacheKeys.INTERACTION_STATUS_KEY, BrowserConstants.INTERACTION_IN_PROGRESS_VALUE, true);\n // Initialize the client\n const authClient = await this.createAuthCodeClient(serverTelemetryManager, requestAuthority, validRequest.correlationId);\n browserRequestLogger.verbose(\"Auth code client created\");\n\n // create logout string and navigate user window to logout. Auth module will clear cache.\n const logoutUri: string = authClient.getLogoutUri(validRequest);\n if (!validRequest.account || AccountEntity.accountInfoIsEqual(validRequest.account, this.getActiveAccount(), false)) {\n browserRequestLogger.verbose(\"Setting active account to null\");\n this.setActiveAccount(null);\n }\n\n this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS, InteractionType.Popup, validRequest);\n\n const popupUtils = new PopupUtils(this.browserStorage, this.logger);\n // Open the popup window to requestUrl.\n const popupWindow = popupUtils.openPopup(logoutUri, popupName, popup);\n this.eventHandler.emitEvent(EventType.POPUP_OPENED, InteractionType.Popup, {popupWindow}, null);\n\n try {\n // Don't care if this throws an error (User Cancelled)\n await popupUtils.monitorPopupForSameOrigin(popupWindow);\n browserRequestLogger.verbose(\"Popup successfully redirected to postLogoutRedirectUri\");\n } catch (e) {\n browserRequestLogger.verbose(`Error occurred while monitoring popup for same origin. Session on server may remain active. Error: ${e}`);\n }\n\n popupUtils.cleanPopup(popupWindow);\n\n if (mainWindowRedirectUri) {\n const navigationOptions: NavigationOptions = {\n apiId: ApiId.logoutPopup,\n timeout: this.config.system.redirectNavigationTimeout,\n noHistory: false\n };\n const absoluteUrl = UrlString.getAbsoluteUrl(mainWindowRedirectUri, BrowserUtils.getCurrentUri());\n\n browserRequestLogger.verbose(\"Redirecting main window to url specified in the request\");\n browserRequestLogger.verbosePii(`Redirecing main window to: ${absoluteUrl}`);\n this.navigationClient.navigateInternal(absoluteUrl, navigationOptions);\n } else {\n browserRequestLogger.verbose(\"No main window navigation requested\");\n }\n\n } catch (e) {\n if (popup) {\n // Close the synchronous popup if an error is thrown before the window unload event is registered\n popup.close();\n }\n \n this.browserStorage.removeItem(this.browserStorage.generateCacheKey(TemporaryCacheKeys.INTERACTION_STATUS_KEY));\n this.eventHandler.emitEvent(EventType.LOGOUT_FAILURE, InteractionType.Popup, null, e);\n serverTelemetryManager.cacheFailedRequest(e);\n throw e;\n }\n\n this.eventHandler.emitEvent(EventType.LOGOUT_END, InteractionType.Popup);\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 *\n * Use to get the redirect uri configured in MSAL or null.\n * @param requestRedirectUri\n * @returns Redirect URL\n *\n */\n protected getRedirectUri(requestRedirectUri?: string): string {\n this.logger.verbose(\"getRedirectUri called\");\n const redirectUri = requestRedirectUri || this.config.auth.redirectUri || BrowserUtils.getCurrentUri();\n return UrlString.getAbsoluteUrl(redirectUri, BrowserUtils.getCurrentUri());\n }\n\n /**\n * Use to get the redirectStartPage either from request or use current window\n * @param requestStartPage\n */\n protected getRedirectStartPage(requestStartPage?: string): string {\n const redirectStartPage = requestStartPage || window.location.href;\n return UrlString.getAbsoluteUrl(redirectStartPage, BrowserUtils.getCurrentUri());\n }\n\n /**\n * Used to get a discovered version of the default authority.\n * @param requestAuthority\n * @param requestCorrelationId\n */\n async getDiscoveredAuthority(requestAuthority?: string, requestCorrelationId?: string): Promise<Authority> {\n this.logger.verbose(\"getDiscoveredAuthority called\", requestCorrelationId);\n const authorityOptions: AuthorityOptions = {\n protocolMode: this.config.auth.protocolMode,\n knownAuthorities: this.config.auth.knownAuthorities,\n cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,\n authorityMetadata: this.config.auth.authorityMetadata\n };\n\n if (requestAuthority) {\n this.logger.verbose(\"Creating discovered authority with request authority\", requestCorrelationId);\n return await AuthorityFactory.createDiscoveredInstance(requestAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions);\n }\n\n this.logger.verbose(\"Creating discovered authority with configured authority\", requestCorrelationId);\n return await AuthorityFactory.createDiscoveredInstance(this.config.auth.authority, this.config.system.networkClient, this.browserStorage, authorityOptions);\n }\n\n /**\n * Helper to check whether interaction is in progress.\n */\n protected interactionInProgress(): boolean {\n // Check whether value in cache is present and equal to expected value\n return (this.browserStorage.getTemporaryCache(TemporaryCacheKeys.INTERACTION_STATUS_KEY, true)) === BrowserConstants.INTERACTION_IN_PROGRESS_VALUE;\n }\n\n /**\n * Creates an Authorization Code Client with the given authority, or the default authority.\n * @param serverTelemetryManager\n * @param authorityUrl\n */\n protected async createAuthCodeClient(serverTelemetryManager: ServerTelemetryManager, authorityUrl?: string, correlationId?: string): Promise<AuthorizationCodeClient> {\n // Create auth module.\n const clientConfig = await this.getClientConfiguration(serverTelemetryManager, authorityUrl, correlationId);\n return new AuthorizationCodeClient(clientConfig);\n }\n\n /**\n * Creates an Silent Flow Client with the given authority, or the default authority.\n * @param serverTelemetryManager\n * @param authorityUrl\n */\n protected async createSilentFlowClient(serverTelemetryManager: ServerTelemetryManager, authorityUrl?: string, correlationId?: string): Promise<SilentFlowClient> {\n // Create auth module.\n const clientConfig = await this.getClientConfiguration(serverTelemetryManager, authorityUrl, correlationId);\n return new SilentFlowClient(clientConfig);\n }\n\n /**\n * Creates a Refresh Client with the given authority, or the default authority.\n * @param serverTelemetryManager\n * @param authorityUrl\n */\n protected async createRefreshTokenClient(serverTelemetryManager: ServerTelemetryManager, authorityUrl?: string, correlationId?: string): Promise<RefreshTokenClient> {\n // Create auth module.\n const clientConfig = await this.getClientConfiguration(serverTelemetryManager, authorityUrl, correlationId);\n return new RefreshTokenClient(clientConfig);\n }\n\n /**\n * Creates a Client Configuration object with the given request authority, or the default authority.\n * @param serverTelemetryManager\n * @param requestAuthority\n * @param requestCorrelationId\n */\n protected async getClientConfiguration(serverTelemetryManager: ServerTelemetryManager, requestAuthority?: string, requestCorrelationId?: string): Promise<ClientConfiguration> {\n this.logger.verbose(\"getClientConfiguration called\", requestCorrelationId);\n const discoveredAuthority = await this.getDiscoveredAuthority(requestAuthority, requestCorrelationId);\n\n return {\n authOptions: {\n clientId: this.config.auth.clientId,\n authority: discoveredAuthority,\n clientCapabilities: this.config.auth.clientCapabilities\n },\n systemOptions: {\n tokenRenewalOffsetSeconds: this.config.system.tokenRenewalOffsetSeconds,\n preventCorsPreflight: true\n },\n loggerOptions: {\n loggerCallback: this.config.system.loggerOptions.loggerCallback,\n piiLoggingEnabled: this.config.system.loggerOptions.piiLoggingEnabled,\n logLevel: this.config.system.loggerOptions.logLevel,\n correlationId: requestCorrelationId\n },\n cryptoInterface: this.browserCrypto,\n networkInterface: this.networkClient,\n storageInterface: this.browserStorage,\n serverTelemetryManager: serverTelemetryManager,\n libraryInfo: {\n sku: BrowserConstants.MSAL_SKU,\n version: version,\n cpu: \"\",\n os: \"\"\n }\n };\n }\n\n /**\n * Helper to validate app environment before making a request.\n * @param request\n * @param interactionType\n */\n protected preflightInteractiveRequest(request: RedirectRequest|PopupRequest, interactionType: InteractionType): AuthorizationUrlRequest {\n this.logger.verbose(\"preflightInteractiveRequest called, validating app environment\", request?.correlationId);\n // block the reload if it occurred inside a hidden iframe\n BrowserUtils.blockReloadInHiddenIframes();\n\n // Check if interaction is in progress. Throw error if true.\n if (this.interactionInProgress()) {\n throw BrowserAuthError.createInteractionInProgressError();\n }\n\n return this.initializeAuthorizationRequest(request, interactionType);\n }\n\n /**\n * Helper to validate app environment before making an auth request\n * * @param interactionType\n */\n protected preflightBrowserEnvironmentCheck(interactionType: InteractionType): 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 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\n /**\n * Initializer function for all request APIs\n * @param request\n */\n protected initializeBaseRequest(request: Partial<BaseAuthRequest>): BaseAuthRequest {\n this.logger.verbose(\"Initializing BaseAuthRequest\", request.correlationId);\n const authority = request.authority || this.config.auth.authority;\n\n const scopes = [...((request && request.scopes) || [])];\n const correlationId = (request && request.correlationId) || this.browserCrypto.createNewGuid();\n\n // Set authenticationScheme to BEARER if not explicitly set in the request\n if (!request.authenticationScheme) {\n request.authenticationScheme = AuthenticationScheme.BEARER;\n this.logger.verbose(\"Authentication Scheme wasn't explicitly set in request, defaulting to \\\"Bearer\\\" request\", request.correlationId);\n } else {\n this.logger.verbose(`Authentication Scheme set to \"${request.authenticationScheme}\" as configured in Auth request`, request.correlationId);\n }\n\n const validatedRequest: BaseAuthRequest = {\n ...request,\n correlationId,\n authority,\n scopes\n };\n\n return validatedRequest;\n }\n\n /**\n *\n * @param apiId\n * @param correlationId\n * @param forceRefresh\n */\n protected initializeServerTelemetryManager(apiId: number, correlationId: string, forceRefresh?: boolean): ServerTelemetryManager {\n this.logger.verbose(\"initializeServerTelemetryManager called\", correlationId);\n const telemetryPayload: ServerTelemetryRequest = {\n clientId: this.config.auth.clientId,\n correlationId: correlationId,\n apiId: apiId,\n forceRefresh: forceRefresh || false,\n wrapperSKU: this.wrapperSKU,\n wrapperVer: this.wrapperVer\n };\n\n return new ServerTelemetryManager(telemetryPayload, this.browserStorage);\n }\n\n /**\n * Helper to initialize required request parameters for interactive APIs and ssoSilent()\n * @param request\n * @param interactionType\n */\n protected initializeAuthorizationRequest(request: RedirectRequest|PopupRequest|SsoSilentRequest, interactionType: InteractionType): AuthorizationUrlRequest {\n this.logger.verbose(\"initializeAuthorizationRequest called\", request.correlationId);\n const redirectUri = this.getRedirectUri(request.redirectUri);\n const browserState: BrowserStateObject = {\n interactionType: interactionType\n };\n\n const state = ProtocolUtils.setRequestState(\n this.browserCrypto,\n (request && request.state) || \"\",\n browserState\n );\n\n const validatedRequest: AuthorizationUrlRequest = {\n ...this.initializeBaseRequest(request),\n redirectUri: redirectUri,\n state: state,\n nonce: request.nonce || this.browserCrypto.createNewGuid(),\n responseMode: ResponseMode.FRAGMENT\n };\n\n const account = request.account || this.getActiveAccount();\n if (account) {\n this.logger.verbose(\"Setting validated request account\");\n this.logger.verbosePii(`Setting validated request account: ${account}`);\n validatedRequest.account = account;\n }\n\n // Check for ADAL SSO\n if (StringUtils.isEmpty(validatedRequest.loginHint)) {\n // Only check for adal token if no SSO params are being used\n const adalIdTokenString = this.browserStorage.getTemporaryCache(PersistentCacheKeys.ADAL_ID_TOKEN);\n if (adalIdTokenString) {\n const adalIdToken = new IdToken(adalIdTokenString, this.browserCrypto);\n this.browserStorage.removeItem(PersistentCacheKeys.ADAL_ID_TOKEN);\n if (adalIdToken.claims && adalIdToken.claims.upn) {\n this.logger.verbose(\"No SSO params used and ADAL token retrieved, setting ADAL upn as loginHint\");\n validatedRequest.loginHint = adalIdToken.claims.upn;\n }\n }\n }\n\n this.browserStorage.updateCacheEntries(validatedRequest.state, validatedRequest.nonce, validatedRequest.authority, validatedRequest.loginHint || \"\", validatedRequest.account || null);\n\n return validatedRequest;\n }\n\n /**\n * Generates an auth code request tied to the url request.\n * @param request\n */\n protected async initializeAuthorizationCodeRequest(request: AuthorizationUrlRequest): Promise<CommonAuthorizationCodeRequest> {\n this.logger.verbose(\"initializeAuthorizationRequest called\", request.correlationId);\n const generatedPkceParams = await this.browserCrypto.generatePkceCodes();\n\n const authCodeRequest: CommonAuthorizationCodeRequest = {\n ...request,\n redirectUri: request.redirectUri,\n code: \"\",\n codeVerifier: generatedPkceParams.verifier\n };\n\n request.codeChallenge = generatedPkceParams.challenge;\n request.codeChallengeMethod = Constants.S256_CODE_CHALLENGE_METHOD;\n\n return authCodeRequest;\n }\n\n /**\n * Initializer for the logout request.\n * @param logoutRequest\n */\n protected initializeLogoutRequest(logoutRequest?: EndSessionRequest): CommonEndSessionRequest {\n this.logger.verbose(\"initializeLogoutRequest called\", logoutRequest?.correlationId);\n\n // Check if interaction is in progress. Throw error if true.\n if (this.interactionInProgress()) {\n throw BrowserAuthError.createInteractionInProgressError();\n }\n\n const validLogoutRequest: CommonEndSessionRequest = {\n correlationId: this.browserCrypto.createNewGuid(),\n ...logoutRequest\n };\n\n /*\n * Only set redirect uri if logout request isn't provided or the set uri isn't null.\n * Otherwise, use passed uri, config, or current page.\n */\n if (!logoutRequest || logoutRequest.postLogoutRedirectUri !== null) {\n if (logoutRequest && logoutRequest.postLogoutRedirectUri) {\n this.logger.verbose(\"Setting postLogoutRedirectUri to uri set on logout request\", validLogoutRequest.correlationId);\n validLogoutRequest.postLogoutRedirectUri = UrlString.getAbsoluteUrl(logoutRequest.postLogoutRedirectUri, BrowserUtils.getCurrentUri());\n } else if (this.config.auth.postLogoutRedirectUri === null) {\n this.logger.verbose(\"postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect\", validLogoutRequest.correlationId);\n } else if (this.config.auth.postLogoutRedirectUri) {\n this.logger.verbose(\"Setting postLogoutRedirectUri to configured uri\", validLogoutRequest.correlationId);\n validLogoutRequest.postLogoutRedirectUri = UrlString.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri, BrowserUtils.getCurrentUri());\n } else {\n this.logger.verbose(\"Setting postLogoutRedirectUri to current page\", validLogoutRequest.correlationId);\n validLogoutRequest.postLogoutRedirectUri = UrlString.getAbsoluteUrl(BrowserUtils.getCurrentUri(), BrowserUtils.getCurrentUri());\n }\n } else {\n this.logger.verbose(\"postLogoutRedirectUri passed as null, not setting post logout redirect uri\", validLogoutRequest.correlationId);\n }\n\n return validLogoutRequest;\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 * 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.wrapperSKU = sku;\n this.wrapperVer = version;\n }\n\n /**\n * Sets navigation client\n * @param navigationClient\n */\n setNavigationClient(navigationClient: INavigationClient): void {\n this.navigationClient = navigationClient;\n }\n // #endregion\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;IAoFI,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;;QAG3E,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;;QAG1E,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC;;QAGtD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC;;QAG5D,IAAI,CAAC,gBAAgB,GAAG,IAAI,GAAG,EAAE,CAAC;;QAGlC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,oBAAoB,GAAG,IAAI,SAAS,EAAE,GAAG,6BAA6B,CAAC;QAEjG,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;;QAGtE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,oBAAoB;YAC3C,IAAI,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CA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OAAO,CAAC,4EAA4E,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;SACvI;QAED,OAAO,kBAAkB,CAAC;KAC7B;;;;;IAMD,4CAAgB,GAAhB,UAAiB,QAA+B;QAC5C,OAAO,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;KACvD;;;;;IAMD,+CAAmB,GAAnB,UAAoB,UAAkB;QAClC,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;KACrD;;;;IAKD,qCAAS,GAAT;QACI,OAAO,IAAI,CAAC,MAAM,CAAC;KACtB;;;;;IAMD,qCAAS,GAAT,UAAU,MAAc;QACpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;KACxB;;;;;;IAOD,oDAAwB,GAAxB,UAAyB,GAAe,EAAE,OAAe;;QAErD,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC;KAC7B;;;;;IAMD,+CAAmB,GAAnB,UAAoB,gBAAmC;QACnD,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;KAC5C;IAEL,wBAAC;AAAD,CAAC;;;;"}
|
|
1
|
+
{"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, ServerError, InteractionRequiredAuthError, AccountInfo, Constants, INetworkModule, AuthenticationResult, Logger, CommonSilentFlowRequest, ICrypto, DEFAULT_CRYPTO_IMPLEMENTATION } from \"@azure/msal-common\";\nimport { BrowserCacheManager, DEFAULT_BROWSER_CACHE_MANAGER } from \"../cache/BrowserCacheManager\";\nimport { BrowserConfiguration, buildConfiguration, Configuration } from \"../config/Configuration\";\nimport { InteractionType, ApiId, BrowserConstants, BrowserCacheLocation, WrapperSKU, TemporaryCacheKeys } 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 { SilentAuthCodeClient } from \"../interaction_client/SilentAuthCodeClient\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { AuthorizationCodeRequest } from \"../request/AuthorizationCodeRequest\";\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 // 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 private redirectResponse: Map<string, Promise<AuthenticationResult | null>>;\n\n // Hybrid auth code responses\n private hybridAuthCodeResponses: Map<string, Promise<AuthenticationResult>>;\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\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 the crypto class.\n this.browserCrypto = this.isBrowserEnvironment ? new CryptoOps(this.logger) : 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 the token cache\n this.tokenCache = new TokenCache(this.config, this.browserStorage, this.logger, this.browserCrypto);\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<AuthenticationResult | null> {\n this.logger.verbose(\"handleRedirectPromise called\");\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 const correlationId = this.browserStorage.getTemporaryCache(TemporaryCacheKeys.CORRELATION_ID, true) || \"\";\n const redirectClient = new RedirectClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, correlationId);\n response = redirectClient.handleRedirectPromise(hash)\n .then((result: AuthenticationResult | null) => {\n if (result) {\n // Emit login event if number of accounts change\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 })\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<void> {\n // Preflight request\n this.preflightBrowserEnvironmentCheck(InteractionType.Redirect);\n this.logger.verbose(\"acquireTokenRedirect called\");\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 const redirectClient = new RedirectClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, request.correlationId);\n return redirectClient.acquireToken(request).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<AuthenticationResult> {\n try {\n this.preflightBrowserEnvironmentCheck(InteractionType.Popup);\n this.logger.verbose(\"acquireTokenPopup called\", request.correlationId);\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 const popupClient = new PopupClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, request.correlationId);\n\n return popupClient.acquireToken(request).then((result) => {\n // If logged in, emit acquire token events\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 return result;\n }).catch((e) => {\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 // 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<AuthenticationResult> {\n this.preflightBrowserEnvironmentCheck(InteractionType.Silent);\n this.logger.verbose(\"ssoSilent called\", request.correlationId);\n this.eventHandler.emitEvent(EventType.SSO_SILENT_START, InteractionType.Silent, request);\n\n try {\n const silentIframeClient = new SilentIframeClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.ssoSilent, request.correlationId);\n const silentTokenResult = await silentIframeClient.acquireToken(request);\n this.eventHandler.emitEvent(EventType.SSO_SILENT_SUCCESS, InteractionType.Silent, silentTokenResult);\n return silentTokenResult;\n } catch (e) {\n this.eventHandler.emitEvent(EventType.SSO_SILENT_FAILURE, InteractionType.Silent, null, e);\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<AuthenticationResult> {\n this.preflightBrowserEnvironmentCheck(InteractionType.Silent);\n this.logger.trace(\"acquireTokenByCode called\", request.correlationId);\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_BY_CODE_START, InteractionType.Silent, request);\n\n try {\n if (!request.code) {\n throw BrowserAuthError.createAuthCodeRequiredError();\n }\n\n let response = this.hybridAuthCodeResponses.get(request.code);\n if (!response) {\n this.logger.verbose(\"Initiating new acquireTokenByCode request\", request.correlationId);\n response = this.acquireTokenByCodeAsync(request)\n .then((result: AuthenticationResult) => {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_BY_CODE_SUCCESS, InteractionType.Silent, result);\n this.hybridAuthCodeResponses.delete(request.code);\n return result;\n })\n .catch((error: Error) => {\n this.hybridAuthCodeResponses.delete(request.code);\n throw error;\n });\n\n this.hybridAuthCodeResponses.set(request.code, response);\n } else {\n this.logger.verbose(\"Existing acquireTokenByCode request found\", request.correlationId);\n }\n \n return response;\n } catch (e) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_BY_CODE_FAILURE, InteractionType.Silent, null, e);\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<AuthenticationResult> {\n this.logger.trace(\"acquireTokenByCodeAsync called\", request.correlationId);\n const silentAuthCodeClient = new SilentAuthCodeClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.acquireTokenByCode, request.correlationId);\n const silentTokenResult = await silentAuthCodeClient.acquireToken(request);\n return silentTokenResult;\n }\n\n /**\n * Use this function to obtain a token before every call to the API / resource provider\n *\n * MSAL return's a cached token when available\n * Or it send's a request to the STS to obtain a new token using a refresh token.\n *\n * @param {@link SilentRequest}\n *\n * To renew idToken, please pass clientId as the only scope in the Authentication Parameters\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\n */\n protected async acquireTokenByRefreshToken(request: CommonSilentFlowRequest): Promise<AuthenticationResult> {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_NETWORK_START, InteractionType.Silent, request);\n // block the reload if it occurred inside a hidden iframe\n BrowserUtils.blockReloadInHiddenIframes();\n\n const silentRefreshClient = new SilentRefreshClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, request.correlationId);\n\n return silentRefreshClient.acquireToken(request).catch(e => {\n const isServerError = e instanceof ServerError;\n const isInteractionRequiredError = e instanceof InteractionRequiredAuthError;\n const isInvalidGrantError = (e.errorCode === BrowserConstants.INVALID_GRANT_ERROR);\n if (isServerError && isInvalidGrantError && !isInteractionRequiredError) {\n this.logger.verbose(\"Refresh token expired or invalid, attempting acquire token by iframe\", request.correlationId);\n\n const silentIframeClient = new SilentIframeClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.acquireTokenSilent_authCode, request.correlationId);\n return silentIframeClient.acquireToken(request);\n }\n throw e;\n });\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<void> {\n this.logger.warning(\"logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.\");\n return this.logoutRedirect(logoutRequest);\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<void> {\n this.preflightBrowserEnvironmentCheck(InteractionType.Redirect);\n const redirectClient = new RedirectClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, logoutRequest?.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<void> {\n try{\n this.preflightBrowserEnvironmentCheck(InteractionType.Popup);\n const popupClient = new PopupClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, logoutRequest?.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 * * @param interactionType\n */\n protected preflightBrowserEnvironmentCheck(interactionType: InteractionType): 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 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\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 * 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 // #endregion\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;IAuFI,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;;QAG3E,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;;QAG1E,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC;;QAGtD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC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ACI,OAAO,IAAI,CAAC,MAAM,CAAC;KACtB;;;;;IAMD,qCAAS,GAAT,UAAU,MAAc;QACpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;KACxB;;;;;;IAOD,oDAAwB,GAAxB,UAAyB,GAAe,EAAE,OAAe;;QAErD,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;KACxD;;;;;IAMD,+CAAmB,GAAnB,UAAoB,gBAAmC;QACnD,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;KAC5C;;;;IAKD,4CAAgB,GAAhB;QACI,OAAO,IAAI,CAAC,MAAM,CAAC;KACtB;IAGL,wBAAC;AAAD,CAAC;;;;"}
|
|
@@ -7,12 +7,18 @@ import { EndSessionRequest } from "../request/EndSessionRequest";
|
|
|
7
7
|
import { WrapperSKU } from "../utils/BrowserConstants";
|
|
8
8
|
import { INavigationClient } from "../navigation/INavigationClient";
|
|
9
9
|
import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest";
|
|
10
|
+
import { ITokenCache } from "../cache/ITokenCache";
|
|
11
|
+
import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest";
|
|
12
|
+
import { BrowserConfiguration } from "../config/Configuration";
|
|
10
13
|
export interface IPublicClientApplication {
|
|
11
14
|
acquireTokenPopup(request: PopupRequest): Promise<AuthenticationResult>;
|
|
12
15
|
acquireTokenRedirect(request: RedirectRequest): Promise<void>;
|
|
13
16
|
acquireTokenSilent(silentRequest: SilentRequest): Promise<AuthenticationResult>;
|
|
17
|
+
acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult>;
|
|
14
18
|
addEventCallback(callback: Function): string | null;
|
|
15
19
|
removeEventCallback(callbackId: string): void;
|
|
20
|
+
enableAccountStorageEvents(): void;
|
|
21
|
+
disableAccountStorageEvents(): void;
|
|
16
22
|
getAccountByHomeId(homeAccountId: string): AccountInfo | null;
|
|
17
23
|
getAccountByLocalId(localId: string): AccountInfo | null;
|
|
18
24
|
getAccountByUsername(userName: string): AccountInfo | null;
|
|
@@ -24,12 +30,14 @@ export interface IPublicClientApplication {
|
|
|
24
30
|
logoutRedirect(logoutRequest?: EndSessionRequest): Promise<void>;
|
|
25
31
|
logoutPopup(logoutRequest?: EndSessionPopupRequest): Promise<void>;
|
|
26
32
|
ssoSilent(request: SsoSilentRequest): Promise<AuthenticationResult>;
|
|
33
|
+
getTokenCache(): ITokenCache;
|
|
27
34
|
getLogger(): Logger;
|
|
28
35
|
setLogger(logger: Logger): void;
|
|
29
36
|
setActiveAccount(account: AccountInfo | null): void;
|
|
30
37
|
getActiveAccount(): AccountInfo | null;
|
|
31
38
|
initializeWrapperLibrary(sku: WrapperSKU, version: string): void;
|
|
32
39
|
setNavigationClient(navigationClient: INavigationClient): void;
|
|
40
|
+
getConfiguration(): BrowserConfiguration;
|
|
33
41
|
}
|
|
34
42
|
export declare const stubbedPublicClientApplication: IPublicClientApplication;
|
|
35
43
|
//# sourceMappingURL=IPublicClientApplication.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPublicClientApplication.d.ts","sourceRoot":"","sources":["../../src/app/IPublicClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EA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AAE,iBAAiB,GAAG,IAAI,CAAC;IAC/D,gBAAgB,IAAI,oBAAoB,CAAC;CAC5C;AAED,eAAO,MAAM,8BAA8B,EAAE,wBAkF5C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v2.
|
|
1
|
+
/*! @azure/msal-browser v2.20.0 2021-12-07 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { BrowserConfigurationAuthError } from '../error/BrowserConfigurationAuthError.js';
|
|
4
4
|
|
|
@@ -16,6 +16,9 @@ var stubbedPublicClientApplication = {
|
|
|
16
16
|
acquireTokenSilent: function () {
|
|
17
17
|
return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());
|
|
18
18
|
},
|
|
19
|
+
acquireTokenByCode: function () {
|
|
20
|
+
return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());
|
|
21
|
+
},
|
|
19
22
|
getAllAccounts: function () {
|
|
20
23
|
return [];
|
|
21
24
|
},
|
|
@@ -55,6 +58,15 @@ var stubbedPublicClientApplication = {
|
|
|
55
58
|
removeEventCallback: function () {
|
|
56
59
|
return;
|
|
57
60
|
},
|
|
61
|
+
enableAccountStorageEvents: function () {
|
|
62
|
+
return;
|
|
63
|
+
},
|
|
64
|
+
disableAccountStorageEvents: function () {
|
|
65
|
+
return;
|
|
66
|
+
},
|
|
67
|
+
getTokenCache: function () {
|
|
68
|
+
throw BrowserConfigurationAuthError.createStubPcaInstanceCalledError();
|
|
69
|
+
},
|
|
58
70
|
getLogger: function () {
|
|
59
71
|
throw BrowserConfigurationAuthError.createStubPcaInstanceCalledError();
|
|
60
72
|
},
|
|
@@ -72,6 +84,9 @@ var stubbedPublicClientApplication = {
|
|
|
72
84
|
},
|
|
73
85
|
setNavigationClient: function () {
|
|
74
86
|
return;
|
|
87
|
+
},
|
|
88
|
+
getConfiguration: function () {
|
|
89
|
+
throw BrowserConfigurationAuthError.createStubPcaInstanceCalledError();
|
|
75
90
|
}
|
|
76
91
|
};
|
|
77
92
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPublicClientApplication.js","sources":["../../src/app/IPublicClientApplication.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthenticationResult, AccountInfo, Logger } from \"@azure/msal-common\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { SilentRequest } from \"../request/SilentRequest\";\nimport { SsoSilentRequest } from \"../request/SsoSilentRequest\";\nimport { EndSessionRequest } from \"../request/EndSessionRequest\";\nimport { BrowserConfigurationAuthError } from \"../error/BrowserConfigurationAuthError\";\nimport { WrapperSKU } from \"../utils/BrowserConstants\";\nimport { INavigationClient } from \"../navigation/INavigationClient\";\nimport { EndSessionPopupRequest } from \"../request/EndSessionPopupRequest\";\n\nexport interface IPublicClientApplication {\n acquireTokenPopup(request: PopupRequest): Promise<AuthenticationResult>;\n acquireTokenRedirect(request: RedirectRequest): Promise<void>;\n acquireTokenSilent(silentRequest: SilentRequest): Promise<AuthenticationResult>;\n addEventCallback(callback: Function): string | null;\n removeEventCallback(callbackId: string): void;\n getAccountByHomeId(homeAccountId: string): AccountInfo | null;\n getAccountByLocalId(localId: string): AccountInfo | null;\n getAccountByUsername(userName: string): AccountInfo | null;\n getAllAccounts(): AccountInfo[];\n handleRedirectPromise(hash?: string): Promise<AuthenticationResult | null>;\n loginPopup(request?: PopupRequest): Promise<AuthenticationResult>;\n loginRedirect(request?: RedirectRequest): Promise<void>;\n logout(logoutRequest?: EndSessionRequest): Promise<void>;\n logoutRedirect(logoutRequest?: EndSessionRequest): Promise<void>;\n logoutPopup(logoutRequest?: EndSessionPopupRequest): Promise<void>;\n ssoSilent(request: SsoSilentRequest): Promise<AuthenticationResult>;\n getLogger(): Logger;\n setLogger(logger: Logger): void;\n setActiveAccount(account: AccountInfo | null): void;\n getActiveAccount(): AccountInfo | null;\n initializeWrapperLibrary(sku: WrapperSKU, version: string): void;\n setNavigationClient(navigationClient: INavigationClient): void;\n}\n\nexport const stubbedPublicClientApplication: IPublicClientApplication = {\n acquireTokenPopup: () => {\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\n },\n acquireTokenRedirect: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\t\n acquireTokenSilent: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\
|
|
1
|
+
{"version":3,"file":"IPublicClientApplication.js","sources":["../../src/app/IPublicClientApplication.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthenticationResult, AccountInfo, Logger } from \"@azure/msal-common\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { SilentRequest } from \"../request/SilentRequest\";\nimport { SsoSilentRequest } from \"../request/SsoSilentRequest\";\nimport { EndSessionRequest } from \"../request/EndSessionRequest\";\nimport { BrowserConfigurationAuthError } from \"../error/BrowserConfigurationAuthError\";\nimport { WrapperSKU } from \"../utils/BrowserConstants\";\nimport { INavigationClient } from \"../navigation/INavigationClient\";\nimport { EndSessionPopupRequest } from \"../request/EndSessionPopupRequest\";\nimport { ITokenCache } from \"../cache/ITokenCache\";\nimport { AuthorizationCodeRequest } from \"../request/AuthorizationCodeRequest\";\nimport { BrowserConfiguration } from \"../config/Configuration\";\n\nexport interface IPublicClientApplication {\n acquireTokenPopup(request: PopupRequest): Promise<AuthenticationResult>;\n acquireTokenRedirect(request: RedirectRequest): Promise<void>;\n acquireTokenSilent(silentRequest: SilentRequest): Promise<AuthenticationResult>;\n acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult>;\n addEventCallback(callback: Function): string | null;\n removeEventCallback(callbackId: string): void;\n enableAccountStorageEvents(): void;\n disableAccountStorageEvents(): void;\n getAccountByHomeId(homeAccountId: string): AccountInfo | null;\n getAccountByLocalId(localId: string): AccountInfo | null;\n getAccountByUsername(userName: string): AccountInfo | null;\n getAllAccounts(): AccountInfo[];\n handleRedirectPromise(hash?: string): Promise<AuthenticationResult | null>;\n loginPopup(request?: PopupRequest): Promise<AuthenticationResult>;\n loginRedirect(request?: RedirectRequest): Promise<void>;\n logout(logoutRequest?: EndSessionRequest): Promise<void>;\n logoutRedirect(logoutRequest?: EndSessionRequest): Promise<void>;\n logoutPopup(logoutRequest?: EndSessionPopupRequest): Promise<void>;\n ssoSilent(request: SsoSilentRequest): Promise<AuthenticationResult>;\n getTokenCache(): ITokenCache;\n getLogger(): Logger;\n setLogger(logger: Logger): void;\n setActiveAccount(account: AccountInfo | null): void;\n getActiveAccount(): AccountInfo | null;\n initializeWrapperLibrary(sku: WrapperSKU, version: string): void;\n setNavigationClient(navigationClient: INavigationClient): void;\n getConfiguration(): BrowserConfiguration;\n}\n\nexport const stubbedPublicClientApplication: IPublicClientApplication = {\n acquireTokenPopup: () => {\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\n },\n acquireTokenRedirect: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\t\n acquireTokenSilent: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\n acquireTokenByCode: () => {\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\n },\n getAllAccounts: () => {\n return [];\t\n },\t\n getAccountByHomeId: () => {\n return null;\n },\n getAccountByUsername: () => {\t\n return null;\t\n },\t\n getAccountByLocalId: () => {\n return null;\n },\n handleRedirectPromise: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\t\n loginPopup: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\t\n loginRedirect: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\t\n logout: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\t\n logoutRedirect: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\n logoutPopup: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\n ssoSilent: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\n addEventCallback: () => {\n return null;\n },\n removeEventCallback: () => {\n return;\n },\n enableAccountStorageEvents: () => {\n return;\n },\n disableAccountStorageEvents: () => {\n return;\n },\n getTokenCache: () => {\n throw BrowserConfigurationAuthError.createStubPcaInstanceCalledError();\n },\n getLogger: () => {\n throw BrowserConfigurationAuthError.createStubPcaInstanceCalledError();\n },\n setLogger: () => {\n return;\n },\n setActiveAccount: () => {\n return;\n },\n getActiveAccount: () => {\n return null;\n },\n initializeWrapperLibrary: () => {\n return;\n },\n setNavigationClient: () => {\n return;\n },\n getConfiguration: () => {\n throw BrowserConfigurationAuthError.createStubPcaInstanceCalledError();\n }\n};\n"],"names":[],"mappings":";;;;AAAA;;;;IAiDa,8BAA8B,GAA6B;IACpE,iBAAiB,EAAE;QACf,OAAO,OAAO,CAAC,MAAM,CAAC,6BAA6B,CAAC,gCAAgC,EAAE,CAAC,CAAC;KAC3F;IACD,oBAAoB,EAAE;QAClB,OAAO,OAAO,CAAC,MAAM,CAAC,6BAA6B,CAAC,gCAAgC,EAAE,CAAC,CAAC;KAC3F;IACD,kBAAkB,EAAE;QAChB,OAAO,OAAO,CAAC,MAAM,CAAC,6BAA6B,CAAC,gCAAgC,EAAE,CAAC,CAAC;KAC3F;IACD,kBAAkB,EAAE;QAChB,OAAO,OAAO,CAAC,MAAM,CAAC,6BAA6B,CAAC,gCAAgC,EAAE,CAAC,CAAC;KAC3F;IACD,cAAc,EAAE;QACZ,OAAO,EAAE,CAAC;KACb;IACD,kBA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,IAAI,CAAC;KACf;IACD,wBAAwB,EAAE;QACtB,OAAO;KACV;IACD,mBAAmB,EAAE;QACjB,OAAO;KACV;IACD,gBAAgB,EAAE;QACd,MAAM,6BAA6B,CAAC,gCAAgC,EAAE,CAAC;KAC1E;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicClientApplication.d.ts","sourceRoot":"","sources":["../../src/app/PublicClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAAe,oBAAoB,
|
|
1
|
+
{"version":3,"file":"PublicClientApplication.d.ts","sourceRoot":"","sources":["../../src/app/PublicClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAAe,oBAAoB,EAAqB,MAAM,oBAAoB,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAKzD;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,iBAAkB,YAAW,wBAAwB;IAG9F,OAAO,CAAC,yBAAyB,CAA6C;IAE9E;;;;;;;;;;;;;;;;;;;;OAoBG;gBACS,aAAa,EAAE,aAAa;IAMxC;;;;;;;;OAQG;IACG,aAAa,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAK7D;;;;;;OAMG;IACH,UAAU,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAKjE;;;;;OAKG;IACG,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAwC/E;;;;;OAKG;YACW,uBAAuB;CAgBxC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*! @azure/msal-browser v2.
|
|
1
|
+
/*! @azure/msal-browser v2.20.0 2021-12-07 */
|
|
2
2
|
'use strict';
|
|
3
|
-
import { __extends, __awaiter, __generator
|
|
4
|
-
import { DEFAULT_REQUEST, InteractionType
|
|
3
|
+
import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';
|
|
4
|
+
import { DEFAULT_REQUEST, InteractionType } from '../utils/BrowserConstants.js';
|
|
5
5
|
import { ClientApplication } from './ClientApplication.js';
|
|
6
6
|
import { EventType } from '../event/EventType.js';
|
|
7
7
|
import { BrowserAuthError } from '../error/BrowserAuthError.js';
|
|
8
|
-
import {
|
|
8
|
+
import { SilentCacheClient } from '../interaction_client/SilentCacheClient.js';
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
11
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -92,7 +92,13 @@ var PublicClientApplication = /** @class */ (function (_super) {
|
|
|
92
92
|
clientId: this.config.auth.clientId,
|
|
93
93
|
authority: request.authority || "",
|
|
94
94
|
scopes: request.scopes,
|
|
95
|
-
homeAccountIdentifier: account.homeAccountId
|
|
95
|
+
homeAccountIdentifier: account.homeAccountId,
|
|
96
|
+
authenticationScheme: request.authenticationScheme,
|
|
97
|
+
resourceRequestMethod: request.resourceRequestMethod,
|
|
98
|
+
resourceRequestUri: request.resourceRequestUri,
|
|
99
|
+
shrClaims: request.shrClaims,
|
|
100
|
+
sshJwk: request.sshJwk,
|
|
101
|
+
sshKid: request.sshKid
|
|
96
102
|
};
|
|
97
103
|
silentRequestKey = JSON.stringify(thumbprint);
|
|
98
104
|
cachedResponse = this.activeSilentTokenRequests.get(silentRequestKey);
|
|
@@ -125,43 +131,31 @@ var PublicClientApplication = /** @class */ (function (_super) {
|
|
|
125
131
|
*/
|
|
126
132
|
PublicClientApplication.prototype.acquireTokenSilentAsync = function (request, account) {
|
|
127
133
|
return __awaiter(this, void 0, void 0, function () {
|
|
128
|
-
var
|
|
134
|
+
var silentCacheClient, silentRequest;
|
|
135
|
+
var _this = this;
|
|
129
136
|
return __generator(this, function (_a) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
_a
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
_a.trys.push([5, 7, , 8]);
|
|
153
|
-
return [4 /*yield*/, this.acquireTokenByRefreshToken(silentRequest)];
|
|
154
|
-
case 6:
|
|
155
|
-
tokenRenewalResult = _a.sent();
|
|
156
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Silent, tokenRenewalResult);
|
|
157
|
-
return [2 /*return*/, tokenRenewalResult];
|
|
158
|
-
case 7:
|
|
159
|
-
tokenRenewalError_1 = _a.sent();
|
|
160
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Silent, null, tokenRenewalError_1);
|
|
161
|
-
throw tokenRenewalError_1;
|
|
162
|
-
case 8: return [3 /*break*/, 9];
|
|
163
|
-
case 9: return [2 /*return*/];
|
|
164
|
-
}
|
|
137
|
+
silentCacheClient = new SilentCacheClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, request.correlationId);
|
|
138
|
+
silentRequest = silentCacheClient.initializeSilentRequest(request, account);
|
|
139
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Silent, request);
|
|
140
|
+
return [2 /*return*/, silentCacheClient.acquireToken(silentRequest).catch(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
141
|
+
var tokenRenewalResult, tokenRenewalError_1;
|
|
142
|
+
return __generator(this, function (_a) {
|
|
143
|
+
switch (_a.label) {
|
|
144
|
+
case 0:
|
|
145
|
+
_a.trys.push([0, 2, , 3]);
|
|
146
|
+
return [4 /*yield*/, this.acquireTokenByRefreshToken(silentRequest)];
|
|
147
|
+
case 1:
|
|
148
|
+
tokenRenewalResult = _a.sent();
|
|
149
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Silent, tokenRenewalResult);
|
|
150
|
+
return [2 /*return*/, tokenRenewalResult];
|
|
151
|
+
case 2:
|
|
152
|
+
tokenRenewalError_1 = _a.sent();
|
|
153
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Silent, null, tokenRenewalError_1);
|
|
154
|
+
throw tokenRenewalError_1;
|
|
155
|
+
case 3: return [2 /*return*/];
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
}); })];
|
|
165
159
|
});
|
|
166
160
|
});
|
|
167
161
|
};
|