@azure/msal-browser 2.38.0 → 2.38.1

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.
Files changed (67) hide show
  1. package/README.md +1 -1
  2. package/dist/_virtual/_tslib.js +1 -1
  3. package/dist/app/ClientApplication.js +1 -1
  4. package/dist/app/IPublicClientApplication.js +1 -1
  5. package/dist/app/PublicClientApplication.d.ts.map +1 -1
  6. package/dist/app/PublicClientApplication.js +5 -3
  7. package/dist/app/PublicClientApplication.js.map +1 -1
  8. package/dist/broker/nativeBroker/NativeMessageHandler.js +1 -1
  9. package/dist/cache/AsyncMemoryStorage.js +1 -1
  10. package/dist/cache/BrowserCacheManager.js +1 -1
  11. package/dist/cache/BrowserStorage.js +1 -1
  12. package/dist/cache/CryptoKeyStore.js +1 -1
  13. package/dist/cache/DatabaseStorage.js +1 -1
  14. package/dist/cache/MemoryStorage.js +1 -1
  15. package/dist/cache/TokenCache.js +1 -1
  16. package/dist/config/Configuration.js +1 -1
  17. package/dist/config/Configuration.js.map +1 -1
  18. package/dist/crypto/BrowserCrypto.js +1 -1
  19. package/dist/crypto/CryptoOps.js +1 -1
  20. package/dist/crypto/GuidGenerator.js +1 -1
  21. package/dist/crypto/ModernBrowserCrypto.js +1 -1
  22. package/dist/crypto/MsBrowserCrypto.js +1 -1
  23. package/dist/crypto/MsrBrowserCrypto.js +1 -1
  24. package/dist/crypto/PkceGenerator.js +1 -1
  25. package/dist/crypto/SignedHttpRequest.js +1 -1
  26. package/dist/encode/Base64Decode.js +1 -1
  27. package/dist/encode/Base64Encode.js +1 -1
  28. package/dist/error/BrowserAuthError.js +1 -1
  29. package/dist/error/BrowserConfigurationAuthError.js +1 -1
  30. package/dist/error/NativeAuthError.js +1 -1
  31. package/dist/event/EventHandler.js +1 -1
  32. package/dist/event/EventMessage.js +1 -1
  33. package/dist/event/EventType.js +1 -1
  34. package/dist/index.cjs.js +65 -63
  35. package/dist/index.cjs.js.map +1 -1
  36. package/dist/index.js +1 -1
  37. package/dist/interaction_client/BaseInteractionClient.js +1 -1
  38. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +1 -1
  39. package/dist/interaction_client/NativeInteractionClient.js +1 -1
  40. package/dist/interaction_client/PopupClient.js +1 -1
  41. package/dist/interaction_client/RedirectClient.js +1 -1
  42. package/dist/interaction_client/SilentAuthCodeClient.js +1 -1
  43. package/dist/interaction_client/SilentCacheClient.js +1 -1
  44. package/dist/interaction_client/SilentIframeClient.js +1 -1
  45. package/dist/interaction_client/SilentRefreshClient.js +1 -1
  46. package/dist/interaction_client/StandardInteractionClient.js +1 -1
  47. package/dist/interaction_handler/InteractionHandler.js +1 -1
  48. package/dist/interaction_handler/RedirectHandler.js +1 -1
  49. package/dist/interaction_handler/SilentHandler.js +1 -1
  50. package/dist/internals.js +1 -1
  51. package/dist/navigation/NavigationClient.js +1 -1
  52. package/dist/network/FetchClient.js +1 -1
  53. package/dist/network/XhrClient.js +1 -1
  54. package/dist/packageMetadata.d.ts +1 -1
  55. package/dist/packageMetadata.js +2 -2
  56. package/dist/packageMetadata.js.map +1 -1
  57. package/dist/telemetry/BrowserPerformanceClient.js +1 -1
  58. package/dist/telemetry/BrowserPerformanceMeasurement.js +1 -1
  59. package/dist/utils/BrowserConstants.js +1 -1
  60. package/dist/utils/BrowserProtocolUtils.js +1 -1
  61. package/dist/utils/BrowserStringUtils.js +1 -1
  62. package/dist/utils/BrowserUtils.js +1 -1
  63. package/dist/utils/MathUtils.js +1 -1
  64. package/lib/msal-browser.js +65 -63
  65. package/lib/msal-browser.js.map +1 -1
  66. package/lib/msal-browser.min.js +28 -28
  67. package/package.json +3 -3
package/README.md CHANGED
@@ -59,7 +59,7 @@ npm install @azure/msal-browser
59
59
 
60
60
  <!-- CDN_LATEST -->
61
61
  ```html
62
- <script type="text/javascript" src="https://alcdn.msauth.net/browser/2.37.1/js/msal-browser.min.js"></script>
62
+ <script type="text/javascript" src="https://alcdn.msauth.net/browser/2.38.0/js/msal-browser.min.js"></script>
63
63
  ```
64
64
 
65
65
  See [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/cdn-usage.md) for more info on how to use this package from the Microsoft CDN.
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  /*! *****************************************************************************
4
4
  Copyright (c) Microsoft Corporation.
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
4
  import { CryptoOps } from '../crypto/CryptoOps.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { BrowserConfigurationAuthError } from '../error/BrowserConfigurationAuthError.js';
4
4
 
@@ -1 +1 @@
1
- {"version":3,"file":"PublicClientApplication.d.ts","sourceRoot":"","sources":["../../src/app/PublicClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAqI,MAAM,oBAAoB,CAAC;AAC1M,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;AAOzD;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,iBAAkB,YAAW,wBAAwB;IAG9F,OAAO,CAAC,yBAAyB,CAA6C;IAC9E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AC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAS7D;;;;;;OAMG;IACH,UAAU,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,oBAAoB,CAAC;IASjE;;;;;OAKG;IACG,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAwE/E,OAAO,CAAC,mBAAmB;IAU3B;;;;;OAKG;cACa,uBAAuB,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC;CAkGvH"}
@@ -1,7 +1,7 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
- import { PerformanceEvents, Constants, ServerError, InteractionRequiredAuthError } from '@azure/msal-common';
4
+ import { PerformanceEvents, Constants, ServerError, InteractionRequiredAuthError, InteractionRequiredAuthErrorMessage } from '@azure/msal-common';
5
5
  import { DEFAULT_REQUEST, InteractionType, CacheLookupPolicy, ApiId, BrowserConstants } from '../utils/BrowserConstants.js';
6
6
  import { ClientApplication } from './ClientApplication.js';
7
7
  import { EventType } from '../event/EventType.js';
@@ -225,13 +225,15 @@ var PublicClientApplication = /** @class */ (function (_super) {
225
225
  return _this.acquireTokenByRefreshToken(silentRequest_1, requestWithCLP_1).catch(function (refreshTokenError) {
226
226
  var isServerError = refreshTokenError instanceof ServerError;
227
227
  var isInteractionRequiredError = refreshTokenError instanceof InteractionRequiredAuthError;
228
+ var rtNotFound = (refreshTokenError.errorCode === InteractionRequiredAuthErrorMessage.noTokensFoundError.code);
228
229
  var isInvalidGrantError = (refreshTokenError.errorCode === BrowserConstants.INVALID_GRANT_ERROR);
229
230
  if ((!isServerError ||
230
231
  !isInvalidGrantError ||
231
232
  isInteractionRequiredError ||
232
233
  requestWithCLP_1.cacheLookupPolicy === CacheLookupPolicy.AccessTokenAndRefreshToken ||
233
234
  requestWithCLP_1.cacheLookupPolicy === CacheLookupPolicy.RefreshToken)
234
- && (requestWithCLP_1.cacheLookupPolicy !== CacheLookupPolicy.Skip)) {
235
+ && (requestWithCLP_1.cacheLookupPolicy !== CacheLookupPolicy.Skip)
236
+ && !rtNotFound) {
235
237
  throw refreshTokenError;
236
238
  }
237
239
  _this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.", request.correlationId);
@@ -1 +1 @@
1
- {"version":3,"file":"PublicClientApplication.js","sources":["../../src/app/PublicClientApplication.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { AccountInfo, AuthenticationResult, Constants, RequestThumbprint, AuthError, PerformanceEvents, ServerError, InteractionRequiredAuthError, InProgressPerformanceEvent } from \"@azure/msal-common\";\r\nimport { Configuration } from \"../config/Configuration\";\r\nimport { DEFAULT_REQUEST, InteractionType, ApiId, CacheLookupPolicy, BrowserConstants } from \"../utils/BrowserConstants\";\r\nimport { IPublicClientApplication } from \"./IPublicClientApplication\";\r\nimport { RedirectRequest } from \"../request/RedirectRequest\";\r\nimport { PopupRequest } from \"../request/PopupRequest\";\r\nimport { ClientApplication } from \"./ClientApplication\";\r\nimport { SilentRequest } from \"../request/SilentRequest\";\r\nimport { EventType } from \"../event/EventType\";\r\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\r\nimport { NativeAuthError } from \"../error/NativeAuthError\";\r\nimport { NativeMessageHandler } from \"../broker/nativeBroker/NativeMessageHandler\";\r\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\r\n\r\n/**\r\n * The PublicClientApplication class is the object exposed by the library to perform authentication and authorization functions in Single Page Applications\r\n * to obtain JWT tokens as described in the OAuth 2.0 Authorization Code Flow with PKCE specification.\r\n */\r\nexport class PublicClientApplication extends ClientApplication implements IPublicClientApplication {\r\n\r\n // Active requests\r\n private activeSilentTokenRequests: Map<string, Promise<AuthenticationResult>>;\r\n private astsAsyncMeasurement?: InProgressPerformanceEvent = undefined;\r\n\r\n /**\r\n * @constructor\r\n * Constructor for the PublicClientApplication used to instantiate the PublicClientApplication object\r\n *\r\n * Important attributes in the Configuration object for auth are:\r\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\r\n * - authority: the authority URL for your application.\r\n * - redirect_uri: the uri of your application registered in the portal.\r\n *\r\n * In Azure AD, authority is a URL indicating the Azure active directory that MSAL uses to obtain tokens.\r\n * It is of the form https://login.microsoftonline.com/{Enter_the_Tenant_Info_Here}\r\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).\r\n * If your application supports Accounts in any organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with organizations.\r\n * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace \"Enter_the_Tenant_Info_Here\" value with common.\r\n * To restrict support to Personal Microsoft accounts only, replace \"Enter_the_Tenant_Info_Here\" value with consumers.\r\n *\r\n * In Azure B2C, authority is of the form https://{instance}/tfp/{tenant}/{policyName}/\r\n * Full B2C functionality will be available in this library in future versions.\r\n *\r\n * @param configuration object for the MSAL PublicClientApplication instance\r\n */\r\n constructor(configuration: Configuration) {\r\n super(configuration);\r\n\r\n this.activeSilentTokenRequests = new Map();\r\n // Register listener functions\r\n this.trackPageVisibility = this.trackPageVisibility.bind(this);\r\n }\r\n\r\n /**\r\n * Use when initiating the login process by redirecting the user's browser to the authorization endpoint. This function redirects the page, so\r\n * any code that follows this function will not execute.\r\n *\r\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\r\n * browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.\r\n *\r\n * @param request\r\n */\r\n async loginRedirect(request?: RedirectRequest): Promise<void> {\r\n const correlationId: string = this.getRequestCorrelationId(request);\r\n this.logger.verbose(\"loginRedirect called\", correlationId);\r\n return this.acquireTokenRedirect({\r\n correlationId,\r\n ...(request || DEFAULT_REQUEST)\r\n });\r\n }\r\n\r\n /**\r\n * Use when initiating the login process via opening a popup window in the user's browser\r\n *\r\n * @param request\r\n *\r\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\r\n */\r\n loginPopup(request?: PopupRequest): Promise<AuthenticationResult> {\r\n const correlationId: string = this.getRequestCorrelationId(request);\r\n this.logger.verbose(\"loginPopup called\", correlationId);\r\n return this.acquireTokenPopup({\r\n correlationId,\r\n ...(request || DEFAULT_REQUEST)\r\n });\r\n }\r\n\r\n /**\r\n * Silently acquire an access token for a given set of scopes. Returns currently processing promise if parallel requests are made.\r\n *\r\n * @param {@link (SilentRequest:type)}\r\n * @returns {Promise.<AuthenticationResult>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse} object\r\n */\r\n async acquireTokenSilent(request: SilentRequest): Promise<AuthenticationResult> {\r\n const correlationId = this.getRequestCorrelationId(request);\r\n const atsMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenSilent, correlationId);\r\n atsMeasurement.addStaticFields({\r\n cacheLookupPolicy: request.cacheLookupPolicy\r\n });\r\n\r\n this.preflightBrowserEnvironmentCheck(InteractionType.Silent);\r\n this.logger.verbose(\"acquireTokenSilent called\", correlationId);\r\n\r\n const account = request.account || this.getActiveAccount();\r\n if (!account) {\r\n throw BrowserAuthError.createNoAccountError();\r\n }\r\n\r\n const thumbprint: RequestThumbprint = {\r\n clientId: this.config.auth.clientId,\r\n authority: request.authority || Constants.EMPTY_STRING,\r\n scopes: request.scopes,\r\n homeAccountIdentifier: account.homeAccountId,\r\n claims: request.claims,\r\n authenticationScheme: request.authenticationScheme,\r\n resourceRequestMethod: request.resourceRequestMethod,\r\n resourceRequestUri: request.resourceRequestUri,\r\n shrClaims: request.shrClaims,\r\n sshKid: request.sshKid\r\n };\r\n const silentRequestKey = JSON.stringify(thumbprint);\r\n\r\n const cachedResponse = this.activeSilentTokenRequests.get(silentRequestKey);\r\n if (typeof cachedResponse === \"undefined\") {\r\n this.logger.verbose(\"acquireTokenSilent called for the first time, storing active request\", correlationId);\r\n\r\n this.performanceClient.setPreQueueTime(PerformanceEvents.AcquireTokenSilentAsync, correlationId);\r\n const response = this.acquireTokenSilentAsync({\r\n ...request,\r\n correlationId\r\n }, account)\r\n .then((result) => {\r\n this.activeSilentTokenRequests.delete(silentRequestKey);\r\n atsMeasurement.addStaticFields({\r\n accessTokenSize: result.accessToken.length,\r\n idTokenSize: result.idToken.length\r\n });\r\n atsMeasurement.endMeasurement({\r\n success: true,\r\n fromCache: result.fromCache,\r\n isNativeBroker: result.fromNativeBroker,\r\n cacheLookupPolicy: request.cacheLookupPolicy,\r\n requestId: result.requestId,\r\n });\r\n return result;\r\n })\r\n .catch((error: AuthError) => {\r\n this.activeSilentTokenRequests.delete(silentRequestKey);\r\n atsMeasurement.endMeasurement({\r\n errorCode: error.errorCode,\r\n subErrorCode: error.subError,\r\n success: false\r\n });\r\n throw error;\r\n });\r\n this.activeSilentTokenRequests.set(silentRequestKey, response);\r\n return response;\r\n } else {\r\n this.logger.verbose(\"acquireTokenSilent has been called previously, returning the result from the first call\", correlationId);\r\n // Discard measurements for memoized calls, as they are usually only a couple of ms and will artificially deflate metrics\r\n atsMeasurement.discardMeasurement();\r\n return cachedResponse;\r\n }\r\n }\r\n\r\n private trackPageVisibility():void {\r\n if (!this.astsAsyncMeasurement) {\r\n return;\r\n }\r\n this.logger.info(\"Perf: Visibility change detected\");\r\n this.astsAsyncMeasurement.increment({\r\n visibilityChangeCount: 1,\r\n });\r\n }\r\n\r\n /**\r\n * Silently acquire an access token for a given set of scopes. Will use cached token if available, otherwise will attempt to acquire a new token from the network via refresh token.\r\n * @param {@link (SilentRequest:type)}\r\n * @param {@link (AccountInfo:type)}\r\n * @returns {Promise.<AuthenticationResult>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse}\r\n */\r\n protected async acquireTokenSilentAsync(request: SilentRequest, account: AccountInfo): Promise<AuthenticationResult>{\r\n this.performanceClient.addQueueMeasurement(PerformanceEvents.AcquireTokenSilentAsync, request.correlationId);\r\n\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Silent, request);\r\n this.astsAsyncMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenSilentAsync, request.correlationId);\r\n this.astsAsyncMeasurement?.increment({\r\n visibilityChangeCount: 0\r\n });\r\n document.addEventListener(\"visibilitychange\",this.trackPageVisibility);\r\n let result: Promise<AuthenticationResult>;\r\n if (NativeMessageHandler.isNativeAvailable(this.config, this.logger, this.nativeExtensionProvider, request.authenticationScheme) && account.nativeAccountId) {\r\n this.logger.verbose(\"acquireTokenSilent - attempting to acquire token from native platform\");\r\n const silentRequest: SilentRequest = {\r\n ...request,\r\n account\r\n };\r\n result = this.acquireTokenNative(silentRequest, ApiId.acquireTokenSilent_silentFlow).catch(async (e: AuthError) => {\r\n // If native token acquisition fails for availability reasons fallback to web flow\r\n if (e instanceof NativeAuthError && e.isFatal()) {\r\n this.logger.verbose(\"acquireTokenSilent - native platform unavailable, falling back to web flow\");\r\n this.nativeExtensionProvider = undefined; // Prevent future requests from continuing to attempt\r\n\r\n // Cache will not contain tokens, given that previous WAM requests succeeded. Skip cache and RT renewal and go straight to iframe renewal\r\n const silentIframeClient = this.createSilentIframeClient(request.correlationId);\r\n return silentIframeClient.acquireToken(request);\r\n }\r\n throw e;\r\n });\r\n } else {\r\n this.logger.verbose(\"acquireTokenSilent - attempting to acquire token from web flow\");\r\n\r\n const silentCacheClient = this.createSilentCacheClient(request.correlationId);\r\n\r\n this.performanceClient.setPreQueueTime(PerformanceEvents.InitializeSilentRequest, request.correlationId);\r\n const silentRequest = await silentCacheClient.initializeSilentRequest(request, account);\r\n\r\n const requestWithCLP = {\r\n ...request,\r\n // set the request's CacheLookupPolicy to Default if it was not optionally passed in\r\n cacheLookupPolicy: request.cacheLookupPolicy || CacheLookupPolicy.Default\r\n };\r\n\r\n this.performanceClient.setPreQueueTime(PerformanceEvents.AcquireTokenFromCache, silentRequest.correlationId);\r\n result = this.acquireTokenFromCache(silentCacheClient, silentRequest, requestWithCLP).catch((cacheError: AuthError) => {\r\n if (requestWithCLP.cacheLookupPolicy === CacheLookupPolicy.AccessToken) {\r\n throw cacheError;\r\n }\r\n\r\n // block the reload if it occurred inside a hidden iframe\r\n BrowserUtils.blockReloadInHiddenIframes();\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_NETWORK_START, InteractionType.Silent, silentRequest);\r\n\r\n this.performanceClient.setPreQueueTime(PerformanceEvents.AcquireTokenByRefreshToken, silentRequest.correlationId);\r\n return this.acquireTokenByRefreshToken(silentRequest, requestWithCLP).catch((refreshTokenError: AuthError) => {\r\n const isServerError = refreshTokenError instanceof ServerError;\r\n const isInteractionRequiredError = refreshTokenError instanceof InteractionRequiredAuthError;\r\n const isInvalidGrantError = (refreshTokenError.errorCode === BrowserConstants.INVALID_GRANT_ERROR);\r\n\r\n if ((!isServerError ||\r\n !isInvalidGrantError ||\r\n isInteractionRequiredError ||\r\n requestWithCLP.cacheLookupPolicy === CacheLookupPolicy.AccessTokenAndRefreshToken ||\r\n requestWithCLP.cacheLookupPolicy === CacheLookupPolicy.RefreshToken)\r\n && (requestWithCLP.cacheLookupPolicy !== CacheLookupPolicy.Skip)\r\n ) {\r\n throw refreshTokenError;\r\n }\r\n\r\n this.logger.verbose(\"Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.\", request.correlationId);\r\n this.performanceClient.setPreQueueTime(PerformanceEvents.AcquireTokenBySilentIframe, silentRequest.correlationId);\r\n return this.acquireTokenBySilentIframe(silentRequest);\r\n });\r\n });\r\n }\r\n\r\n return result.then((response) => {\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Silent, response);\r\n this.astsAsyncMeasurement?.endMeasurement({\r\n success: true,\r\n fromCache: response.fromCache,\r\n isNativeBroker: response.fromNativeBroker,\r\n requestId: response.requestId\r\n });\r\n return response;\r\n }).catch((tokenRenewalError: AuthError) => {\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Silent, null, tokenRenewalError);\r\n this.astsAsyncMeasurement?.endMeasurement({\r\n errorCode: tokenRenewalError.errorCode,\r\n subErrorCode: tokenRenewalError.subError,\r\n success: false\r\n });\r\n throw tokenRenewalError;\r\n }).finally(() => {\r\n document.removeEventListener(\"visibilitychange\",this.trackPageVisibility);\r\n });\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;AAmBA;;;;;IAI6C,2CAAiB;;;;;;;;;;;;;;;;;;;;;;IA2B1D,iCAAY,aAA4B;QAAxC,YACI,kBAAM,aAAa,CAAC,SAKvB;QA7BO,0BAAoB,GAAgC,SAAS,CAAC;QA0BlE,KAAI,CAAC,yBAAyB,GAAG,IAAI,GAAG,EAAE,CAAC;;QAE3C,KAAI,CAAC,mBAAmB,GAAG,KAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,KAAI,CAAC,CAAC;;KAClE;;;;;;;;;;IAWK,+CAAa,GAAnB,UAAoB,OAAyB;;;;gBACnC,aAAa,GAAW,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;gBACpE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,sBAAsB,EAAE,aAAa,CAAC,CAAC;gBAC3D,sBAAO,IAAI,CAAC,oBAAoB,YAC5B,aAAa,eAAA,KACT,OAAO,IAAI,eAAe,GAChC,EAAC;;;KACN;;;;;;;;IASD,4CAAU,GAAV,UAAW,OAAsB;QAC7B,IAAM,aAAa,GAAW,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;QACpE,IAAI,CAAC,MAAM,C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,CAAC,0BAA0B,EAAE,eAAa,CAAC,aAAa,CAAC,CAAC;gCAClH,OAAO,KAAI,CAAC,0BAA0B,CAAC,eAAa,CAAC,CAAC;6BACzD,CAAC,CAAC;yBACN,CAAC,CAAC;;4BAGP,sBAAO,MAAM,CAAC,IAAI,CAAC,UAAC,QAAQ;;4BACxB,KAAI,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,qBAAqB,EAAE,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;4BAC/F,MAAA,KAAI,CAAC,oBAAoB,0CAAE,cAAc,CAAC;gCACtC,OAAO,EAAE,IAAI;gCACb,SAAS,EAAE,QAAQ,CAAC,SAAS;gCAC7B,cAAc,EAAE,QAAQ,CAAC,gBAAgB;gCACzC,SAAS,EAAE,QAAQ,CAAC,SAAS;6BAChC,EAAE;4BACH,OAAO,QAAQ,CAAC;yBACnB,CAAC,CAAC,KAAK,CAAC,UAAC,iBAA4B;;4BAClC,KAAI,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,qBAAqB,EAAE,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC;4BAC9G,MAAA,KAAI,CAAC,oBAAoB,0CAAE,cAAc,CAAC;gCACtC,SAAS,EAAE,iBAAiB,CAAC,SAAS;gCACtC,YAAY,EAAE,iBAAiB,CAAC,QAAQ;gCACxC,OAAO,EAAE,KAAK;6BACjB,EAAE;4BACH,MAAM,iBAAiB,CAAC;yBAC3B,CAAC,CAAC,OAAO,CAAC;4BACP,QAAQ,CAAC,mBAAmB,CAAC,kBAAkB,EAAC,KAAI,CAAC,mBAAmB,CAAC,CAAC;yBAC7E,CAAC,EAAC;;;;KACN;IACL,8BAAC;AAAD,CAnQA,CAA6C,iBAAiB;;;;"}
1
+ {"version":3,"file":"PublicClientApplication.js","sources":["../../src/app/PublicClientApplication.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { AccountInfo, AuthenticationResult, Constants, RequestThumbprint, AuthError, PerformanceEvents, ServerError, InteractionRequiredAuthError, InProgressPerformanceEvent, InteractionRequiredAuthErrorMessage } from \"@azure/msal-common\";\r\nimport { Configuration } from \"../config/Configuration\";\r\nimport { DEFAULT_REQUEST, InteractionType, ApiId, CacheLookupPolicy, BrowserConstants } from \"../utils/BrowserConstants\";\r\nimport { IPublicClientApplication } from \"./IPublicClientApplication\";\r\nimport { RedirectRequest } from \"../request/RedirectRequest\";\r\nimport { PopupRequest } from \"../request/PopupRequest\";\r\nimport { ClientApplication } from \"./ClientApplication\";\r\nimport { SilentRequest } from \"../request/SilentRequest\";\r\nimport { EventType } from \"../event/EventType\";\r\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\r\nimport { NativeAuthError } from \"../error/NativeAuthError\";\r\nimport { NativeMessageHandler } from \"../broker/nativeBroker/NativeMessageHandler\";\r\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\r\n\r\n/**\r\n * The PublicClientApplication class is the object exposed by the library to perform authentication and authorization functions in Single Page Applications\r\n * to obtain JWT tokens as described in the OAuth 2.0 Authorization Code Flow with PKCE specification.\r\n */\r\nexport class PublicClientApplication extends ClientApplication implements IPublicClientApplication {\r\n\r\n // Active requests\r\n private activeSilentTokenRequests: Map<string, Promise<AuthenticationResult>>;\r\n private astsAsyncMeasurement?: InProgressPerformanceEvent = undefined;\r\n\r\n /**\r\n * @constructor\r\n * Constructor for the PublicClientApplication used to instantiate the PublicClientApplication object\r\n *\r\n * Important attributes in the Configuration object for auth are:\r\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\r\n * - authority: the authority URL for your application.\r\n * - redirect_uri: the uri of your application registered in the portal.\r\n *\r\n * In Azure AD, authority is a URL indicating the Azure active directory that MSAL uses to obtain tokens.\r\n * It is of the form https://login.microsoftonline.com/{Enter_the_Tenant_Info_Here}\r\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).\r\n * If your application supports Accounts in any organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with organizations.\r\n * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace \"Enter_the_Tenant_Info_Here\" value with common.\r\n * To restrict support to Personal Microsoft accounts only, replace \"Enter_the_Tenant_Info_Here\" value with consumers.\r\n *\r\n * In Azure B2C, authority is of the form https://{instance}/tfp/{tenant}/{policyName}/\r\n * Full B2C functionality will be available in this library in future versions.\r\n *\r\n * @param configuration object for the MSAL PublicClientApplication instance\r\n */\r\n constructor(configuration: Configuration) {\r\n super(configuration);\r\n\r\n this.activeSilentTokenRequests = new Map();\r\n // Register listener functions\r\n this.trackPageVisibility = this.trackPageVisibility.bind(this);\r\n }\r\n\r\n /**\r\n * Use when initiating the login process by redirecting the user's browser to the authorization endpoint. This function redirects the page, so\r\n * any code that follows this function will not execute.\r\n *\r\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\r\n * browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.\r\n *\r\n * @param request\r\n */\r\n async loginRedirect(request?: RedirectRequest): Promise<void> {\r\n const correlationId: string = this.getRequestCorrelationId(request);\r\n this.logger.verbose(\"loginRedirect called\", correlationId);\r\n return this.acquireTokenRedirect({\r\n correlationId,\r\n ...(request || DEFAULT_REQUEST)\r\n });\r\n }\r\n\r\n /**\r\n * Use when initiating the login process via opening a popup window in the user's browser\r\n *\r\n * @param request\r\n *\r\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\r\n */\r\n loginPopup(request?: PopupRequest): Promise<AuthenticationResult> {\r\n const correlationId: string = this.getRequestCorrelationId(request);\r\n this.logger.verbose(\"loginPopup called\", correlationId);\r\n return this.acquireTokenPopup({\r\n correlationId,\r\n ...(request || DEFAULT_REQUEST)\r\n });\r\n }\r\n\r\n /**\r\n * Silently acquire an access token for a given set of scopes. Returns currently processing promise if parallel requests are made.\r\n *\r\n * @param {@link (SilentRequest:type)}\r\n * @returns {Promise.<AuthenticationResult>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse} object\r\n */\r\n async acquireTokenSilent(request: SilentRequest): Promise<AuthenticationResult> {\r\n const correlationId = this.getRequestCorrelationId(request);\r\n const atsMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenSilent, correlationId);\r\n atsMeasurement.addStaticFields({\r\n cacheLookupPolicy: request.cacheLookupPolicy\r\n });\r\n\r\n this.preflightBrowserEnvironmentCheck(InteractionType.Silent);\r\n this.logger.verbose(\"acquireTokenSilent called\", correlationId);\r\n\r\n const account = request.account || this.getActiveAccount();\r\n if (!account) {\r\n throw BrowserAuthError.createNoAccountError();\r\n }\r\n\r\n const thumbprint: RequestThumbprint = {\r\n clientId: this.config.auth.clientId,\r\n authority: request.authority || Constants.EMPTY_STRING,\r\n scopes: request.scopes,\r\n homeAccountIdentifier: account.homeAccountId,\r\n claims: request.claims,\r\n authenticationScheme: request.authenticationScheme,\r\n resourceRequestMethod: request.resourceRequestMethod,\r\n resourceRequestUri: request.resourceRequestUri,\r\n shrClaims: request.shrClaims,\r\n sshKid: request.sshKid\r\n };\r\n const silentRequestKey = JSON.stringify(thumbprint);\r\n\r\n const cachedResponse = this.activeSilentTokenRequests.get(silentRequestKey);\r\n if (typeof cachedResponse === \"undefined\") {\r\n this.logger.verbose(\"acquireTokenSilent called for the first time, storing active request\", correlationId);\r\n\r\n this.performanceClient.setPreQueueTime(PerformanceEvents.AcquireTokenSilentAsync, correlationId);\r\n const response = this.acquireTokenSilentAsync({\r\n ...request,\r\n correlationId\r\n }, account)\r\n .then((result) => {\r\n this.activeSilentTokenRequests.delete(silentRequestKey);\r\n atsMeasurement.addStaticFields({\r\n accessTokenSize: result.accessToken.length,\r\n idTokenSize: result.idToken.length\r\n });\r\n atsMeasurement.endMeasurement({\r\n success: true,\r\n fromCache: result.fromCache,\r\n isNativeBroker: result.fromNativeBroker,\r\n cacheLookupPolicy: request.cacheLookupPolicy,\r\n requestId: result.requestId,\r\n });\r\n return result;\r\n })\r\n .catch((error: AuthError) => {\r\n this.activeSilentTokenRequests.delete(silentRequestKey);\r\n atsMeasurement.endMeasurement({\r\n errorCode: error.errorCode,\r\n subErrorCode: error.subError,\r\n success: false\r\n });\r\n throw error;\r\n });\r\n this.activeSilentTokenRequests.set(silentRequestKey, response);\r\n return response;\r\n } else {\r\n this.logger.verbose(\"acquireTokenSilent has been called previously, returning the result from the first call\", correlationId);\r\n // Discard measurements for memoized calls, as they are usually only a couple of ms and will artificially deflate metrics\r\n atsMeasurement.discardMeasurement();\r\n return cachedResponse;\r\n }\r\n }\r\n\r\n private trackPageVisibility():void {\r\n if (!this.astsAsyncMeasurement) {\r\n return;\r\n }\r\n this.logger.info(\"Perf: Visibility change detected\");\r\n this.astsAsyncMeasurement.increment({\r\n visibilityChangeCount: 1,\r\n });\r\n }\r\n\r\n /**\r\n * Silently acquire an access token for a given set of scopes. Will use cached token if available, otherwise will attempt to acquire a new token from the network via refresh token.\r\n * @param {@link (SilentRequest:type)}\r\n * @param {@link (AccountInfo:type)}\r\n * @returns {Promise.<AuthenticationResult>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse}\r\n */\r\n protected async acquireTokenSilentAsync(request: SilentRequest, account: AccountInfo): Promise<AuthenticationResult>{\r\n this.performanceClient.addQueueMeasurement(PerformanceEvents.AcquireTokenSilentAsync, request.correlationId);\r\n\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Silent, request);\r\n this.astsAsyncMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenSilentAsync, request.correlationId);\r\n this.astsAsyncMeasurement?.increment({\r\n visibilityChangeCount: 0\r\n });\r\n document.addEventListener(\"visibilitychange\",this.trackPageVisibility);\r\n let result: Promise<AuthenticationResult>;\r\n if (NativeMessageHandler.isNativeAvailable(this.config, this.logger, this.nativeExtensionProvider, request.authenticationScheme) && account.nativeAccountId) {\r\n this.logger.verbose(\"acquireTokenSilent - attempting to acquire token from native platform\");\r\n const silentRequest: SilentRequest = {\r\n ...request,\r\n account\r\n };\r\n result = this.acquireTokenNative(silentRequest, ApiId.acquireTokenSilent_silentFlow).catch(async (e: AuthError) => {\r\n // If native token acquisition fails for availability reasons fallback to web flow\r\n if (e instanceof NativeAuthError && e.isFatal()) {\r\n this.logger.verbose(\"acquireTokenSilent - native platform unavailable, falling back to web flow\");\r\n this.nativeExtensionProvider = undefined; // Prevent future requests from continuing to attempt\r\n\r\n // Cache will not contain tokens, given that previous WAM requests succeeded. Skip cache and RT renewal and go straight to iframe renewal\r\n const silentIframeClient = this.createSilentIframeClient(request.correlationId);\r\n return silentIframeClient.acquireToken(request);\r\n }\r\n throw e;\r\n });\r\n } else {\r\n this.logger.verbose(\"acquireTokenSilent - attempting to acquire token from web flow\");\r\n\r\n const silentCacheClient = this.createSilentCacheClient(request.correlationId);\r\n\r\n this.performanceClient.setPreQueueTime(PerformanceEvents.InitializeSilentRequest, request.correlationId);\r\n const silentRequest = await silentCacheClient.initializeSilentRequest(request, account);\r\n\r\n const requestWithCLP = {\r\n ...request,\r\n // set the request's CacheLookupPolicy to Default if it was not optionally passed in\r\n cacheLookupPolicy: request.cacheLookupPolicy || CacheLookupPolicy.Default\r\n };\r\n\r\n this.performanceClient.setPreQueueTime(PerformanceEvents.AcquireTokenFromCache, silentRequest.correlationId);\r\n result = this.acquireTokenFromCache(silentCacheClient, silentRequest, requestWithCLP).catch((cacheError: AuthError) => {\r\n if (requestWithCLP.cacheLookupPolicy === CacheLookupPolicy.AccessToken) {\r\n throw cacheError;\r\n }\r\n\r\n // block the reload if it occurred inside a hidden iframe\r\n BrowserUtils.blockReloadInHiddenIframes();\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_NETWORK_START, InteractionType.Silent, silentRequest);\r\n\r\n this.performanceClient.setPreQueueTime(PerformanceEvents.AcquireTokenByRefreshToken, silentRequest.correlationId);\r\n return this.acquireTokenByRefreshToken(silentRequest, requestWithCLP).catch((refreshTokenError: AuthError) => {\r\n const isServerError = refreshTokenError instanceof ServerError;\r\n const isInteractionRequiredError = refreshTokenError instanceof InteractionRequiredAuthError;\r\n const rtNotFound = (refreshTokenError.errorCode === InteractionRequiredAuthErrorMessage.noTokensFoundError.code);\r\n const isInvalidGrantError = (refreshTokenError.errorCode === BrowserConstants.INVALID_GRANT_ERROR);\r\n\r\n if ((!isServerError ||\r\n !isInvalidGrantError ||\r\n isInteractionRequiredError ||\r\n requestWithCLP.cacheLookupPolicy === CacheLookupPolicy.AccessTokenAndRefreshToken ||\r\n requestWithCLP.cacheLookupPolicy === CacheLookupPolicy.RefreshToken)\r\n && (requestWithCLP.cacheLookupPolicy !== CacheLookupPolicy.Skip)\r\n && !rtNotFound\r\n ) {\r\n throw refreshTokenError;\r\n }\r\n\r\n this.logger.verbose(\"Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.\", request.correlationId);\r\n this.performanceClient.setPreQueueTime(PerformanceEvents.AcquireTokenBySilentIframe, silentRequest.correlationId);\r\n return this.acquireTokenBySilentIframe(silentRequest);\r\n });\r\n });\r\n }\r\n\r\n return result.then((response) => {\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Silent, response);\r\n this.astsAsyncMeasurement?.endMeasurement({\r\n success: true,\r\n fromCache: response.fromCache,\r\n isNativeBroker: response.fromNativeBroker,\r\n requestId: response.requestId\r\n });\r\n return response;\r\n }).catch((tokenRenewalError: AuthError) => {\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Silent, null, tokenRenewalError);\r\n this.astsAsyncMeasurement?.endMeasurement({\r\n errorCode: tokenRenewalError.errorCode,\r\n subErrorCode: tokenRenewalError.subError,\r\n success: false\r\n });\r\n throw tokenRenewalError;\r\n }).finally(() => {\r\n document.removeEventListener(\"visibilitychange\",this.trackPageVisibility);\r\n });\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;AAmBA;;;;;IAI6C,2CAAiB;;;;;;;;;;;;;;;;;;;;;;IA2B1D,iCAAY,aAA4B;QAAxC,YACI,kBAAM,aAAa,CAAC,SAKvB;QA7BO,0BAAoB,GAAgC,SAAS,CAAC;QA0BlE,KAAI,CAAC,yBAAyB,GAAG,IAAI,GAAG,EAAE,CAAC;;QAE3C,KAAI,CAAC,mBAAmB,GAAG,KAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,KAAI,CAAC,CAAC;;KAClE;;;;;;;;;;IAWK,+CAAa,GAAnB,UAAoB,OAAyB;;;;gBACnC,aAAa,GAAW,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;gBACpE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,sBAAsB,EAAE,aAAa,CAAC,CAAC;gBAC3D,sBAAO,IAAI,CAAC,oBAAoB,YAC5B,aAAa,eAAA,KACT,OAAO,IAAI,eAAe,GAChC,EAAC;;;KACN;;;;;;;;IASD,4CAAU,GAAV,UAAW,OAAsB;QAC7B,IAAM,aAAa,GAAW,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;QACpE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,mBAAmB,EAAE,aAAa,CAAC,CAAC;QACxD,OAAO,IAAI,CAAC,iBAAiB,YACzB,aAAa,eAAA,KACT,OAAO,IAAI,eAAe,GAChC,CAAC;KACN;;;;;;;IAQK,oDAAkB,GAAxB,UAAyB,OAAsB;;;;;gBACrC,aAAa,GAAG,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;gBACtD,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,kBAAkB,EAAE,aAAa,CAAC,CA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S,CAAC,SAAS,CAAC,qBAAqB,EAAE,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;4BAC/F,MAAA,KAAI,CAAC,oBAAoB,0CAAE,cAAc,CAAC;gCACtC,OAAO,EAAE,IAAI;gCACb,SAAS,EAAE,QAAQ,CAAC,SAAS;gCAC7B,cAAc,EAAE,QAAQ,CAAC,gBAAgB;gCACzC,SAAS,EAAE,QAAQ,CAAC,SAAS;6BAChC,EAAE;4BACH,OAAO,QAAQ,CAAC;yBACnB,CAAC,CAAC,KAAK,CAAC,UAAC,iBAA4B;;4BAClC,KAAI,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,qBAAqB,EAAE,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC;4BAC9G,MAAA,KAAI,CAAC,oBAAoB,0CAAE,cAAc,CAAC;gCACtC,SAAS,EAAE,iBAAiB,CAAC,SAAS;gCACtC,YAAY,EAAE,iBAAiB,CAAC,QAAQ;gCACxC,OAAO,EAAE,KAAK;6BACjB,EAAE;4BACH,MAAM,iBAAiB,CAAC;yBAC3B,CAAC,CAAC,OAAO,CAAC;4BACP,QAAQ,CAAC,mBAAmB,CAAC,kBAAkB,EAAC,KAAI,CAAC,mBAAmB,CAAC,CAAC;yBAC7E,CAAC,EAAC;;;;KACN;IACL,8BAAC;AAAD,CArQA,CAA6C,iBAAiB;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../../_virtual/_tslib.js';
4
4
  import { NativeConstants, NativeExtensionMethod } from '../../utils/BrowserConstants.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { BrowserAuthError, BrowserAuthErrorMessage } from '../error/BrowserAuthError.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __spread } from '../_virtual/_tslib.js';
4
4
  import { CredentialType, RefreshTokenEntity, CacheManager, AccessTokenEntity, IdTokenEntity, AccountEntity, ClientAuthError, AppMetadataEntity, ServerTelemetryEntity, AuthorityMetadataEntity, Constants, PersistentCacheKeys, ThrottlingEntity, StringUtils, ProtocolUtils, CcsCredentialType, IdToken, DEFAULT_CRYPTO_IMPLEMENTATION } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { BrowserConfigurationAuthError } from '../error/BrowserConfigurationAuthError.js';
4
4
  import { BrowserCacheLocation } from '../utils/BrowserConstants.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { AsyncMemoryStorage } from './AsyncMemoryStorage.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { BrowserAuthError } from '../error/BrowserAuthError.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  /*
4
4
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { AuthToken, CacheRecord, Authority, AccountEntity, IdTokenEntity, ScopeSet, AccessTokenEntity, RefreshTokenEntity, Constants } from '@azure/msal-common';
4
4
  import { BrowserAuthError } from '../error/BrowserAuthError.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { __assign } from '../_virtual/_tslib.js';
4
4
  import { DEFAULT_SYSTEM_OPTIONS, StubbedNetworkModule, Constants, ProtocolMode, AzureCloudInstance, LogLevel } from '@azure/msal-common';
@@ -1 +1 @@
1
- {"version":3,"file":"Configuration.js","sources":["../../src/config/Configuration.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { SystemOptions, LoggerOptions, INetworkModule, DEFAULT_SYSTEM_OPTIONS, Constants, ProtocolMode, LogLevel, StubbedNetworkModule, AzureCloudInstance, AzureCloudOptions, ApplicationTelemetry } from \"@azure/msal-common\";\r\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\r\nimport { BrowserCacheLocation, BrowserConstants } from \"../utils/BrowserConstants\";\r\nimport { INavigationClient } from \"../navigation/INavigationClient\";\r\nimport { NavigationClient } from \"../navigation/NavigationClient\";\r\n\r\n// Default timeout for popup windows and iframes in milliseconds\r\nexport const DEFAULT_POPUP_TIMEOUT_MS = 60000;\r\nexport const DEFAULT_IFRAME_TIMEOUT_MS = 6000;\r\nexport const DEFAULT_REDIRECT_TIMEOUT_MS = 30000;\r\nexport const DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS = 2000;\r\n\r\n/**\r\n * Use this to configure the auth options in the Configuration object\r\n */\r\nexport type BrowserAuthOptions = {\r\n /**\r\n * Client ID of your app registered with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview in Microsoft Identity Platform\r\n */\r\n clientId: string;\r\n /**\r\n * You can configure a specific authority, defaults to \" \" or \"https://login.microsoftonline.com/common\"\r\n */\r\n authority?: string;\r\n /**\r\n * An array of URIs that are known to be valid. Used in B2C scenarios.\r\n */\r\n knownAuthorities?: Array<string>;\r\n /**\r\n * A string containing the cloud discovery response. Used in AAD scenarios.\r\n */\r\n cloudDiscoveryMetadata?: string;\r\n /**\r\n * A string containing the .well-known/openid-configuration endpoint response\r\n */\r\n authorityMetadata?: string;\r\n /**\r\n * The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal.\r\n */\r\n redirectUri?: string;\r\n /**\r\n * The redirect URI where the window navigates after a successful logout.\r\n */\r\n postLogoutRedirectUri?: string | null;\r\n /**\r\n * Boolean indicating whether to navigate to the original request URL after the auth server navigates to the redirect URL.\r\n */\r\n navigateToLoginRequestUrl?: boolean;\r\n /**\r\n * Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request.\r\n */\r\n clientCapabilities?: Array<string>;\r\n /**\r\n * Enum that represents the protocol that msal follows. Used for configuring proper endpoints.\r\n */\r\n protocolMode?: ProtocolMode;\r\n /**\r\n * Enum that represents the Azure Cloud to use.\r\n */\r\n azureCloudOptions?: AzureCloudOptions;\r\n /**\r\n * Flag of whether to use the local metadata cache\r\n */\r\n skipAuthorityMetadataCache?: boolean;\r\n};\r\n\r\n/**\r\n * Use this to configure the below cache configuration options:\r\n */\r\nexport type CacheOptions = {\r\n /**\r\n * Used to specify the cacheLocation user wants to set. Valid values are \"localStorage\", \"sessionStorage\" and \"memoryStorage\".\r\n */\r\n cacheLocation?: BrowserCacheLocation | string;\r\n /**\r\n * Used to specify the temporaryCacheLocation user wants to set. Valid values are \"localStorage\", \"sessionStorage\" and \"memoryStorage\".\r\n */\r\n temporaryCacheLocation?: BrowserCacheLocation | string;\r\n /**\r\n * If set, MSAL stores the auth request state required for validation of the auth flows in the browser cookies. By default this flag is set to false.\r\n */\r\n storeAuthStateInCookie?: boolean;\r\n /**\r\n * If set, MSAL sets the \"Secure\" flag on cookies so they can only be sent over HTTPS. By default this flag is set to false.\r\n */\r\n secureCookies?: boolean;\r\n /**\r\n * If set, MSAL will attempt to migrate cache entries from older versions on initialization. By default this flag is set to true if cacheLocation is localStorage, otherwise false.\r\n */\r\n cacheMigrationEnabled?: boolean;\r\n /**\r\n * Flag that determines whether access tokens are stored based on requested claims\r\n */\r\n claimsBasedCachingEnabled?: boolean;\r\n};\r\n\r\nexport type BrowserSystemOptions = SystemOptions & {\r\n /**\r\n * Used to initialize the Logger object (See ClientConfiguration.ts)\r\n */\r\n loggerOptions?: LoggerOptions;\r\n /**\r\n * Network interface implementation\r\n */\r\n networkClient?: INetworkModule;\r\n /**\r\n * Override the methods used to navigate to other webpages. Particularly useful if you are using a client-side router\r\n */\r\n navigationClient?: INavigationClient;\r\n /**\r\n * Sets the timeout for waiting for a response hash in a popup. Will take precedence over loadFrameTimeout if both are set.\r\n */\r\n windowHashTimeout?: number;\r\n /**\r\n * Sets the timeout for waiting for a response hash in an iframe. Will take precedence over loadFrameTimeout if both are set.\r\n */\r\n iframeHashTimeout?: number;\r\n /**\r\n * Sets the timeout for waiting for a response hash in an iframe or popup\r\n */\r\n loadFrameTimeout?: number;\r\n /**\r\n * Maximum time the library should wait for a frame to load\r\n */\r\n navigateFrameWait?: number;\r\n /**\r\n * Time to wait for redirection to occur before resolving promise\r\n */\r\n redirectNavigationTimeout?: number;\r\n /**\r\n * Sets whether popups are opened asynchronously. By default, this flag is set to false. When set to false, blank popups are opened before anything else happens. When set to true, popups are opened when making the network request.\r\n */\r\n asyncPopups?: boolean;\r\n /**\r\n * Flag to enable redirect opertaions when the app is rendered in an iframe (to support scenarios such as embedded B2C login).\r\n */\r\n allowRedirectInIframe?: boolean;\r\n /**\r\n * Flag to enable native broker support (e.g. acquiring tokens from WAM on Windows)\r\n */\r\n allowNativeBroker?: boolean;\r\n /**\r\n * Sets the timeout for waiting for the native broker handshake to resolve\r\n */\r\n nativeBrokerHandshakeTimeout?: number;\r\n /**\r\n * Options related to browser crypto APIs\r\n */\r\n cryptoOptions?: CryptoOptions;\r\n /**\r\n * Sets the interval length in milliseconds for polling the location attribute in popup windows (default is 30ms)\r\n */\r\n pollIntervalMilliseconds?: number;\r\n};\r\n\r\nexport type CryptoOptions = {\r\n\r\n /**\r\n * Enables the application to use the MSR Crypto interface, if available (and other interfaces are not)\r\n * @type {?boolean}\r\n */\r\n useMsrCrypto?: boolean;\r\n\r\n /**\r\n * Entropy to seed browser crypto API (needed for MSR Crypto). Must be cryptographically strong random numbers (e.g. crypto.randomBytes(48) from Node)\r\n * @type {?Uint8Array}\r\n */\r\n entropy?: Uint8Array;\r\n};\r\n\r\n/**\r\n * Telemetry Options\r\n */\r\nexport type BrowserTelemetryOptions = {\r\n /**\r\n * Telemetry information sent on request\r\n * - appName: Unique string name of an application\r\n * - appVersion: Version of the application using MSAL\r\n */\r\n application?: ApplicationTelemetry;\r\n};\r\n\r\n/**\r\n * This object allows you to configure important elements of MSAL functionality and is passed into the constructor of PublicClientApplication\r\n */\r\nexport type Configuration = {\r\n /**\r\n * This is where you configure auth elements like clientID, authority used for authenticating against the Microsoft Identity Platform\r\n */\r\n auth: BrowserAuthOptions,\r\n /**\r\n * This is where you configure cache location and whether to store cache in cookies\r\n */\r\n cache?: CacheOptions,\r\n /**\r\n * This is where you can configure the network client, logger, token renewal offset\r\n */\r\n system?: BrowserSystemOptions,\r\n /**\r\n * This is where you can configure telemetry data and options\r\n */\r\n telemetry?: BrowserTelemetryOptions\r\n};\r\n\r\nexport type BrowserConfiguration = {\r\n auth: Required<BrowserAuthOptions>,\r\n cache: Required<CacheOptions>,\r\n system: Required<BrowserSystemOptions>,\r\n telemetry: Required<BrowserTelemetryOptions>\r\n};\r\n\r\n/**\r\n * MSAL function that sets the default options when not explicitly configured from app developer\r\n *\r\n * @param auth\r\n * @param cache\r\n * @param system\r\n *\r\n * @returns Configuration object\r\n */\r\nexport function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system: userInputSystem, telemetry: userInputTelemetry }: Configuration, isBrowserEnvironment: boolean): BrowserConfiguration {\r\n\r\n // Default auth options for browser\r\n const DEFAULT_AUTH_OPTIONS: Required<BrowserAuthOptions> = {\r\n clientId: Constants.EMPTY_STRING,\r\n authority: `${Constants.DEFAULT_AUTHORITY}`,\r\n knownAuthorities: [],\r\n cloudDiscoveryMetadata: Constants.EMPTY_STRING,\r\n authorityMetadata: Constants.EMPTY_STRING,\r\n redirectUri: Constants.EMPTY_STRING,\r\n postLogoutRedirectUri: Constants.EMPTY_STRING,\r\n navigateToLoginRequestUrl: true,\r\n clientCapabilities: [],\r\n protocolMode: ProtocolMode.AAD,\r\n azureCloudOptions: {\r\n azureCloudInstance: AzureCloudInstance.None,\r\n tenant: Constants.EMPTY_STRING\r\n },\r\n skipAuthorityMetadataCache: false,\r\n };\r\n\r\n // Default cache options for browser\r\n const DEFAULT_CACHE_OPTIONS: Required<CacheOptions> = {\r\n cacheLocation: BrowserCacheLocation.SessionStorage,\r\n temporaryCacheLocation: BrowserCacheLocation.SessionStorage,\r\n storeAuthStateInCookie: false,\r\n secureCookies: false,\r\n // Default cache migration to true if cache location is localStorage since entries are preserved across tabs/windows. Migration has little to no benefit in sessionStorage and memoryStorage\r\n cacheMigrationEnabled: userInputCache && userInputCache.cacheLocation === BrowserCacheLocation.LocalStorage ? true : false,\r\n claimsBasedCachingEnabled: true\r\n };\r\n\r\n // Default logger options for browser\r\n const DEFAULT_LOGGER_OPTIONS: LoggerOptions = {\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n loggerCallback: (): void => {\r\n // allow users to not set logger call back \r\n },\r\n logLevel: LogLevel.Info,\r\n piiLoggingEnabled: false\r\n };\r\n\r\n // Default system options for browser\r\n const DEFAULT_BROWSER_SYSTEM_OPTIONS: Required<BrowserSystemOptions> = {\r\n ...DEFAULT_SYSTEM_OPTIONS,\r\n loggerOptions: DEFAULT_LOGGER_OPTIONS,\r\n networkClient: isBrowserEnvironment ? BrowserUtils.getBrowserNetworkClient() : StubbedNetworkModule,\r\n navigationClient: new NavigationClient(),\r\n loadFrameTimeout: 0,\r\n // If loadFrameTimeout is provided, use that as default.\r\n windowHashTimeout: userInputSystem?.loadFrameTimeout || DEFAULT_POPUP_TIMEOUT_MS,\r\n iframeHashTimeout: userInputSystem?.loadFrameTimeout || DEFAULT_IFRAME_TIMEOUT_MS,\r\n navigateFrameWait: isBrowserEnvironment && BrowserUtils.detectIEOrEdge() ? 500 : 0,\r\n redirectNavigationTimeout: DEFAULT_REDIRECT_TIMEOUT_MS,\r\n asyncPopups: false,\r\n allowRedirectInIframe: false,\r\n allowNativeBroker: false,\r\n nativeBrokerHandshakeTimeout: userInputSystem?.nativeBrokerHandshakeTimeout || DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS,\r\n pollIntervalMilliseconds: BrowserConstants.DEFAULT_POLL_INTERVAL_MS,\r\n cryptoOptions: {\r\n useMsrCrypto: false,\r\n entropy: undefined\r\n }\r\n };\r\n\r\n const providedSystemOptions: BrowserSystemOptions = {\r\n ...userInputSystem,\r\n loggerOptions: userInputSystem?.loggerOptions || DEFAULT_LOGGER_OPTIONS\r\n };\r\n\r\n const DEFAULT_TELEMETRY_OPTIONS: Required<BrowserTelemetryOptions> = {\r\n application: {\r\n appName: Constants.EMPTY_STRING,\r\n appVersion: Constants.EMPTY_STRING\r\n }\r\n };\r\n\r\n const overlayedConfig: BrowserConfiguration = {\r\n auth: { ...DEFAULT_AUTH_OPTIONS, ...userInputAuth },\r\n cache: { ...DEFAULT_CACHE_OPTIONS, ...userInputCache },\r\n system: { ...DEFAULT_BROWSER_SYSTEM_OPTIONS, ...providedSystemOptions },\r\n telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...userInputTelemetry }\r\n };\r\n return overlayedConfig;\r\n}\r\n\r\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;AAWA;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AE;KACrE,CAAC;IACF,OAAO,eAAe,CAAC;AAC3B;;;;"}
1
+ {"version":3,"file":"Configuration.js","sources":["../../src/config/Configuration.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { SystemOptions, LoggerOptions, INetworkModule, DEFAULT_SYSTEM_OPTIONS, Constants, ProtocolMode, LogLevel, StubbedNetworkModule, AzureCloudInstance, AzureCloudOptions, ApplicationTelemetry } from \"@azure/msal-common\";\r\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\r\nimport { BrowserCacheLocation, BrowserConstants } from \"../utils/BrowserConstants\";\r\nimport { INavigationClient } from \"../navigation/INavigationClient\";\r\nimport { NavigationClient } from \"../navigation/NavigationClient\";\r\n\r\n// Default timeout for popup windows and iframes in milliseconds\r\nexport const DEFAULT_POPUP_TIMEOUT_MS = 60000;\r\nexport const DEFAULT_IFRAME_TIMEOUT_MS = 6000;\r\nexport const DEFAULT_REDIRECT_TIMEOUT_MS = 30000;\r\nexport const DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS = 2000;\r\n\r\n/**\r\n * Use this to configure the auth options in the Configuration object\r\n */\r\nexport type BrowserAuthOptions = {\r\n /**\r\n * Client ID of your app registered with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview in Microsoft Identity Platform\r\n */\r\n clientId: string;\r\n /**\r\n * You can configure a specific authority, defaults to \" \" or \"https://login.microsoftonline.com/common\"\r\n */\r\n authority?: string;\r\n /**\r\n * An array of URIs that are known to be valid. Used in B2C scenarios.\r\n */\r\n knownAuthorities?: Array<string>;\r\n /**\r\n * A string containing the cloud discovery response. Used in AAD scenarios.\r\n */\r\n cloudDiscoveryMetadata?: string;\r\n /**\r\n * A string containing the .well-known/openid-configuration endpoint response\r\n */\r\n authorityMetadata?: string;\r\n /**\r\n * The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal.\r\n */\r\n redirectUri?: string;\r\n /**\r\n * The redirect URI where the window navigates after a successful logout.\r\n */\r\n postLogoutRedirectUri?: string | null;\r\n /**\r\n * Boolean indicating whether to navigate to the original request URL after the auth server navigates to the redirect URL.\r\n */\r\n navigateToLoginRequestUrl?: boolean;\r\n /**\r\n * Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request.\r\n */\r\n clientCapabilities?: Array<string>;\r\n /**\r\n * Enum that represents the protocol that msal follows. Used for configuring proper endpoints.\r\n */\r\n protocolMode?: ProtocolMode;\r\n /**\r\n * Enum that represents the Azure Cloud to use.\r\n */\r\n azureCloudOptions?: AzureCloudOptions;\r\n /**\r\n * Flag of whether to use the local metadata cache\r\n */\r\n skipAuthorityMetadataCache?: boolean;\r\n};\r\n\r\n/**\r\n * Use this to configure the below cache configuration options:\r\n */\r\nexport type CacheOptions = {\r\n /**\r\n * Used to specify the cacheLocation user wants to set. Valid values are \"localStorage\", \"sessionStorage\" and \"memoryStorage\".\r\n */\r\n cacheLocation?: BrowserCacheLocation | string;\r\n /**\r\n * Used to specify the temporaryCacheLocation user wants to set. Valid values are \"localStorage\", \"sessionStorage\" and \"memoryStorage\".\r\n */\r\n temporaryCacheLocation?: BrowserCacheLocation | string;\r\n /**\r\n * If set, MSAL stores the auth request state required for validation of the auth flows in the browser cookies. By default this flag is set to false.\r\n */\r\n storeAuthStateInCookie?: boolean;\r\n /**\r\n * If set, MSAL sets the \"Secure\" flag on cookies so they can only be sent over HTTPS. By default this flag is set to false.\r\n */\r\n secureCookies?: boolean;\r\n /**\r\n * If set, MSAL will attempt to migrate cache entries from older versions on initialization. By default this flag is set to true if cacheLocation is localStorage, otherwise false.\r\n */\r\n cacheMigrationEnabled?: boolean;\r\n /**\r\n * Flag that determines whether access tokens are stored based on requested claims\r\n */\r\n claimsBasedCachingEnabled?: boolean;\r\n};\r\n\r\nexport type BrowserSystemOptions = SystemOptions & {\r\n /**\r\n * Used to initialize the Logger object (See ClientConfiguration.ts)\r\n */\r\n loggerOptions?: LoggerOptions;\r\n /**\r\n * Network interface implementation\r\n */\r\n networkClient?: INetworkModule;\r\n /**\r\n * Override the methods used to navigate to other webpages. Particularly useful if you are using a client-side router\r\n */\r\n navigationClient?: INavigationClient;\r\n /**\r\n * Sets the timeout for waiting for a response hash in a popup. Will take precedence over loadFrameTimeout if both are set.\r\n */\r\n windowHashTimeout?: number;\r\n /**\r\n * Sets the timeout for waiting for a response hash in an iframe. Will take precedence over loadFrameTimeout if both are set.\r\n */\r\n iframeHashTimeout?: number;\r\n /**\r\n * Sets the timeout for waiting for a response hash in an iframe or popup\r\n */\r\n loadFrameTimeout?: number;\r\n /**\r\n * Maximum time the library should wait for a frame to load\r\n */\r\n navigateFrameWait?: number;\r\n /**\r\n * Time to wait for redirection to occur before resolving promise\r\n */\r\n redirectNavigationTimeout?: number;\r\n /**\r\n * Sets whether popups are opened asynchronously. By default, this flag is set to false. When set to false, blank popups are opened before anything else happens. When set to true, popups are opened when making the network request.\r\n */\r\n asyncPopups?: boolean;\r\n /**\r\n * Flag to enable redirect opertaions when the app is rendered in an iframe (to support scenarios such as embedded B2C login).\r\n */\r\n allowRedirectInIframe?: boolean;\r\n /**\r\n * Flag to enable native broker support (e.g. acquiring tokens from WAM on Windows)\r\n */\r\n allowNativeBroker?: boolean;\r\n /**\r\n * Sets the timeout for waiting for the native broker handshake to resolve\r\n */\r\n nativeBrokerHandshakeTimeout?: number;\r\n /**\r\n * Options related to browser crypto APIs\r\n */\r\n cryptoOptions?: CryptoOptions;\r\n /**\r\n * Sets the interval length in milliseconds for polling the location attribute in popup windows (default is 30ms)\r\n */\r\n pollIntervalMilliseconds?: number;\r\n};\r\n\r\nexport type CryptoOptions = {\r\n\r\n /**\r\n * Enables the application to use the MSR Crypto interface, if available (and other interfaces are not)\r\n * @type {?boolean}\r\n */\r\n useMsrCrypto?: boolean;\r\n\r\n /**\r\n * Entropy to seed browser crypto API (needed for MSR Crypto). Must be cryptographically strong random numbers (e.g. crypto.randomBytes(48) from Node)\r\n * @type {?Uint8Array}\r\n */\r\n entropy?: Uint8Array;\r\n};\r\n\r\n/**\r\n * Telemetry Options\r\n */\r\nexport type BrowserTelemetryOptions = {\r\n /**\r\n * Telemetry information sent on request\r\n * - appName: Unique string name of an application\r\n * - appVersion: Version of the application using MSAL\r\n */\r\n application?: ApplicationTelemetry;\r\n};\r\n\r\n/**\r\n * This object allows you to configure important elements of MSAL functionality and is passed into the constructor of PublicClientApplication\r\n */\r\nexport type Configuration = {\r\n /**\r\n * This is where you configure auth elements like clientID, authority used for authenticating against the Microsoft Identity Platform\r\n */\r\n auth: BrowserAuthOptions,\r\n /**\r\n * This is where you configure cache location and whether to store cache in cookies\r\n */\r\n cache?: CacheOptions,\r\n /**\r\n * This is where you can configure the network client, logger, token renewal offset\r\n */\r\n system?: BrowserSystemOptions,\r\n /**\r\n * This is where you can configure telemetry data and options\r\n */\r\n telemetry?: BrowserTelemetryOptions\r\n};\r\n\r\nexport type BrowserConfiguration = {\r\n auth: Required<BrowserAuthOptions>,\r\n cache: Required<CacheOptions>,\r\n system: Required<BrowserSystemOptions>,\r\n telemetry: Required<BrowserTelemetryOptions>\r\n};\r\n\r\n/**\r\n * MSAL function that sets the default options when not explicitly configured from app developer\r\n *\r\n * @param auth\r\n * @param cache\r\n * @param system\r\n *\r\n * @returns Configuration object\r\n */\r\nexport function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system: userInputSystem, telemetry: userInputTelemetry }: Configuration, isBrowserEnvironment: boolean): BrowserConfiguration {\r\n\r\n // Default auth options for browser\r\n const DEFAULT_AUTH_OPTIONS: Required<BrowserAuthOptions> = {\r\n clientId: Constants.EMPTY_STRING,\r\n authority: `${Constants.DEFAULT_AUTHORITY}`,\r\n knownAuthorities: [],\r\n cloudDiscoveryMetadata: Constants.EMPTY_STRING,\r\n authorityMetadata: Constants.EMPTY_STRING,\r\n redirectUri: Constants.EMPTY_STRING,\r\n postLogoutRedirectUri: Constants.EMPTY_STRING,\r\n navigateToLoginRequestUrl: true,\r\n clientCapabilities: [],\r\n protocolMode: ProtocolMode.AAD,\r\n azureCloudOptions: {\r\n azureCloudInstance: AzureCloudInstance.None,\r\n tenant: Constants.EMPTY_STRING\r\n },\r\n skipAuthorityMetadataCache: false, \r\n };\r\n\r\n // Default cache options for browser\r\n const DEFAULT_CACHE_OPTIONS: Required<CacheOptions> = {\r\n cacheLocation: BrowserCacheLocation.SessionStorage,\r\n temporaryCacheLocation: BrowserCacheLocation.SessionStorage,\r\n storeAuthStateInCookie: false,\r\n secureCookies: false,\r\n // Default cache migration to true if cache location is localStorage since entries are preserved across tabs/windows. Migration has little to no benefit in sessionStorage and memoryStorage\r\n cacheMigrationEnabled: userInputCache && userInputCache.cacheLocation === BrowserCacheLocation.LocalStorage ? true : false,\r\n claimsBasedCachingEnabled: true\r\n };\r\n\r\n // Default logger options for browser\r\n const DEFAULT_LOGGER_OPTIONS: LoggerOptions = {\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n loggerCallback: (): void => {\r\n // allow users to not set logger call back \r\n },\r\n logLevel: LogLevel.Info,\r\n piiLoggingEnabled: false\r\n };\r\n\r\n // Default system options for browser\r\n const DEFAULT_BROWSER_SYSTEM_OPTIONS: Required<BrowserSystemOptions> = {\r\n ...DEFAULT_SYSTEM_OPTIONS,\r\n loggerOptions: DEFAULT_LOGGER_OPTIONS,\r\n networkClient: isBrowserEnvironment ? BrowserUtils.getBrowserNetworkClient() : StubbedNetworkModule,\r\n navigationClient: new NavigationClient(),\r\n loadFrameTimeout: 0,\r\n // If loadFrameTimeout is provided, use that as default.\r\n windowHashTimeout: userInputSystem?.loadFrameTimeout || DEFAULT_POPUP_TIMEOUT_MS,\r\n iframeHashTimeout: userInputSystem?.loadFrameTimeout || DEFAULT_IFRAME_TIMEOUT_MS,\r\n navigateFrameWait: isBrowserEnvironment && BrowserUtils.detectIEOrEdge() ? 500 : 0,\r\n redirectNavigationTimeout: DEFAULT_REDIRECT_TIMEOUT_MS,\r\n asyncPopups: false,\r\n allowRedirectInIframe: false,\r\n allowNativeBroker: false,\r\n nativeBrokerHandshakeTimeout: userInputSystem?.nativeBrokerHandshakeTimeout || DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS,\r\n pollIntervalMilliseconds: BrowserConstants.DEFAULT_POLL_INTERVAL_MS,\r\n cryptoOptions: {\r\n useMsrCrypto: false,\r\n entropy: undefined\r\n }\r\n };\r\n\r\n const providedSystemOptions: BrowserSystemOptions = {\r\n ...userInputSystem,\r\n loggerOptions: userInputSystem?.loggerOptions || DEFAULT_LOGGER_OPTIONS\r\n };\r\n\r\n const DEFAULT_TELEMETRY_OPTIONS: Required<BrowserTelemetryOptions> = {\r\n application: {\r\n appName: Constants.EMPTY_STRING,\r\n appVersion: Constants.EMPTY_STRING\r\n }\r\n };\r\n\r\n const overlayedConfig: BrowserConfiguration = {\r\n auth: { ...DEFAULT_AUTH_OPTIONS, ...userInputAuth },\r\n cache: { ...DEFAULT_CACHE_OPTIONS, ...userInputCache },\r\n system: { ...DEFAULT_BROWSER_SYSTEM_OPTIONS, ...providedSystemOptions },\r\n telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...userInputTelemetry }\r\n };\r\n return overlayedConfig;\r\n}\r\n\r\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;AAWA;IACa,wBAAwB,GAAG,MAAM;IACjC,yBAAyB,GAAG,KAAK;IACjC,2BAA2B,GAAG,MAAM;IACpC,0CAA0C,GAAG,KAAK;AAyM/D;;;;;;;;;SASgB,kBAAkB,CAAC,EAAqH,EAAE,oBAA6B;QAA5I,aAAa,UAAA,EAAS,cAAc,WAAA,EAAU,eAAe,YAAA,EAAa,kBAAkB,eAAA;;IAGnI,IAAM,oBAAoB,GAAiC;QACvD,QAAQ,EAAE,SAAS,CAAC,YAAY;QAChC,SAAS,EAAE,KAAG,SAAS,CAAC,iBAAmB;QAC3C,gBAAgB,EAAE,EAAE;QACpB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AI,YAAY,CAAC,cAAc,EAAE,GAAG,GAAG,GAAG,CAAC,EAClF,yBAAyB,EAAE,2BAA2B,EACtD,WAAW,EAAE,KAAK,EAClB,qBAAqB,EAAE,KAAK,EAC5B,iBAAiB,EAAE,KAAK,EACxB,4BAA4B,EAAE,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,4BAA4B,KAAI,0CAA0C,EACzH,wBAAwB,EAAE,gBAAgB,CAAC,wBAAwB,EACnE,aAAa,EAAE;YACX,YAAY,EAAE,KAAK;YACnB,OAAO,EAAE,SAAS;SACrB,GACJ,CAAC;IAEF,IAAM,qBAAqB,yBACpB,eAAe,KAClB,aAAa,EAAE,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,aAAa,KAAI,sBAAsB,GAC1E,CAAC;IAEF,IAAM,yBAAyB,GAAsC;QACjE,WAAW,EAAE;YACT,OAAO,EAAE,SAAS,CAAC,YAAY;YAC/B,UAAU,EAAE,SAAS,CAAC,YAAY;SACrC;KACJ,CAAC;IAEF,IAAM,eAAe,GAAyB;QAC1C,IAAI,wBAAO,oBAAoB,GAAK,aAAa,CAAE;QACnD,KAAK,wBAAO,qBAAqB,GAAK,cAAc,CAAE;QACtD,MAAM,wBAAO,8BAA8B,GAAK,qBAAqB,CAAE;QACvE,SAAS,wBAAO,yBAAyB,GAAK,kBAAkB,CAAE;KACrE,CAAC;IACF,OAAO,eAAe,CAAC;AAC3B;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { BrowserStringUtils } from '../utils/BrowserStringUtils.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { PerformanceEvents, JoseHeader } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { Constants } from '@azure/msal-common';
4
4
  import { MathUtils } from '../utils/MathUtils.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { KEY_FORMAT_JWK } from '../utils/BrowserConstants.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { Constants } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { __spread, __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { KEY_FORMAT_JWK } from '../utils/BrowserConstants.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { BrowserAuthError } from '../error/BrowserAuthError.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { CryptoOps } from './CryptoOps.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { Constants } from '@azure/msal-common';
4
4
  import { BrowserStringUtils } from '../utils/BrowserStringUtils.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { Constants } from '@azure/msal-common';
4
4
  import { BrowserStringUtils } from '../utils/BrowserStringUtils.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { __extends } from '../_virtual/_tslib.js';
4
4
  import { StringUtils, AuthError } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { __extends } from '../_virtual/_tslib.js';
4
4
  import { AuthError } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { __extends } from '../_virtual/_tslib.js';
4
4
  import { InteractionRequiredAuthError, AuthError } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { AccountEntity, CacheManager } from '@azure/msal-common';
4
4
  import { EventType } from './EventType.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  import { EventType } from './EventType.js';
4
4
  import { InteractionType, InteractionStatus } from '../utils/BrowserConstants.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.38.0 2023-07-05 */
1
+ /*! @azure/msal-browser v2.38.1 2023-08-07 */
2
2
  'use strict';
3
3
  /*
4
4
  * Copyright (c) Microsoft Corporation. All rights reserved.