@azure/msal-browser 2.32.2 → 2.33.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.
Files changed (105) hide show
  1. package/README.md +1 -1
  2. package/dist/_virtual/_tslib.js +1 -1
  3. package/dist/app/ClientApplication.d.ts +3 -0
  4. package/dist/app/ClientApplication.d.ts.map +1 -1
  5. package/dist/app/ClientApplication.js +65 -13
  6. package/dist/app/ClientApplication.js.map +1 -1
  7. package/dist/app/IPublicClientApplication.js +1 -1
  8. package/dist/app/PublicClientApplication.d.ts +2 -0
  9. package/dist/app/PublicClientApplication.d.ts.map +1 -1
  10. package/dist/app/PublicClientApplication.js +37 -10
  11. package/dist/app/PublicClientApplication.js.map +1 -1
  12. package/dist/broker/nativeBroker/NativeMessageHandler.js +1 -1
  13. package/dist/cache/AsyncMemoryStorage.js +1 -1
  14. package/dist/cache/BrowserCacheManager.js +1 -1
  15. package/dist/cache/BrowserStorage.js +1 -1
  16. package/dist/cache/CryptoKeyStore.js +1 -1
  17. package/dist/cache/DatabaseStorage.js +1 -1
  18. package/dist/cache/MemoryStorage.js +1 -1
  19. package/dist/cache/TokenCache.js +1 -1
  20. package/dist/config/Configuration.js +1 -1
  21. package/dist/crypto/BrowserCrypto.js +1 -1
  22. package/dist/crypto/CryptoOps.js +1 -1
  23. package/dist/crypto/GuidGenerator.js +1 -1
  24. package/dist/crypto/ModernBrowserCrypto.js +1 -1
  25. package/dist/crypto/MsBrowserCrypto.js +1 -1
  26. package/dist/crypto/MsrBrowserCrypto.js +1 -1
  27. package/dist/crypto/PkceGenerator.js +1 -1
  28. package/dist/crypto/SignedHttpRequest.js +1 -1
  29. package/dist/encode/Base64Decode.js +1 -1
  30. package/dist/encode/Base64Encode.js +1 -1
  31. package/dist/error/BrowserAuthError.js +1 -1
  32. package/dist/error/BrowserConfigurationAuthError.js +1 -1
  33. package/dist/error/NativeAuthError.js +1 -1
  34. package/dist/event/EventHandler.js +1 -1
  35. package/dist/event/EventMessage.js +1 -1
  36. package/dist/event/EventType.js +1 -1
  37. package/dist/index.cjs.js +1345 -761
  38. package/dist/index.cjs.js.map +1 -1
  39. package/dist/index.js +1 -1
  40. package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
  41. package/dist/interaction_client/BaseInteractionClient.js +3 -2
  42. package/dist/interaction_client/BaseInteractionClient.js.map +1 -1
  43. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +1 -1
  44. package/dist/interaction_client/NativeInteractionClient.js +1 -1
  45. package/dist/interaction_client/PopupClient.d.ts.map +1 -1
  46. package/dist/interaction_client/PopupClient.js +9 -2
  47. package/dist/interaction_client/PopupClient.js.map +1 -1
  48. package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
  49. package/dist/interaction_client/RedirectClient.js +13 -5
  50. package/dist/interaction_client/RedirectClient.js.map +1 -1
  51. package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
  52. package/dist/interaction_client/SilentAuthCodeClient.js +7 -3
  53. package/dist/interaction_client/SilentAuthCodeClient.js.map +1 -1
  54. package/dist/interaction_client/SilentCacheClient.d.ts.map +1 -1
  55. package/dist/interaction_client/SilentCacheClient.js +7 -2
  56. package/dist/interaction_client/SilentCacheClient.js.map +1 -1
  57. package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
  58. package/dist/interaction_client/SilentIframeClient.js +21 -4
  59. package/dist/interaction_client/SilentIframeClient.js.map +1 -1
  60. package/dist/interaction_client/SilentRefreshClient.d.ts.map +1 -1
  61. package/dist/interaction_client/SilentRefreshClient.js +9 -3
  62. package/dist/interaction_client/SilentRefreshClient.js.map +1 -1
  63. package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  64. package/dist/interaction_client/StandardInteractionClient.js +16 -5
  65. package/dist/interaction_client/StandardInteractionClient.js.map +1 -1
  66. package/dist/interaction_handler/InteractionHandler.d.ts +3 -2
  67. package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
  68. package/dist/interaction_handler/InteractionHandler.js +12 -4
  69. package/dist/interaction_handler/InteractionHandler.js.map +1 -1
  70. package/dist/interaction_handler/RedirectHandler.d.ts +2 -2
  71. package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
  72. package/dist/interaction_handler/RedirectHandler.js +3 -3
  73. package/dist/interaction_handler/RedirectHandler.js.map +1 -1
  74. package/dist/interaction_handler/SilentHandler.d.ts +2 -2
  75. package/dist/interaction_handler/SilentHandler.d.ts.map +1 -1
  76. package/dist/interaction_handler/SilentHandler.js +13 -15
  77. package/dist/interaction_handler/SilentHandler.js.map +1 -1
  78. package/dist/internals.d.ts +2 -0
  79. package/dist/internals.d.ts.map +1 -1
  80. package/dist/internals.js +3 -1
  81. package/dist/internals.js.map +1 -1
  82. package/dist/navigation/NavigationClient.js +1 -1
  83. package/dist/network/FetchClient.js +1 -1
  84. package/dist/network/XhrClient.js +1 -1
  85. package/dist/packageMetadata.d.ts +1 -1
  86. package/dist/packageMetadata.js +2 -2
  87. package/dist/packageMetadata.js.map +1 -1
  88. package/dist/request/EndSessionPopupRequest.d.ts +1 -1
  89. package/dist/request/EndSessionPopupRequest.d.ts.map +1 -1
  90. package/dist/request/EndSessionRequest.d.ts +1 -1
  91. package/dist/request/EndSessionRequest.d.ts.map +1 -1
  92. package/dist/telemetry/BrowserPerformanceClient.d.ts +18 -1
  93. package/dist/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
  94. package/dist/telemetry/BrowserPerformanceClient.js +58 -2
  95. package/dist/telemetry/BrowserPerformanceClient.js.map +1 -1
  96. package/dist/telemetry/BrowserPerformanceMeasurement.js +1 -1
  97. package/dist/utils/BrowserConstants.js +1 -1
  98. package/dist/utils/BrowserProtocolUtils.js +1 -1
  99. package/dist/utils/BrowserStringUtils.js +1 -1
  100. package/dist/utils/BrowserUtils.js +1 -1
  101. package/dist/utils/MathUtils.js +1 -1
  102. package/lib/msal-browser.js +1345 -761
  103. package/lib/msal-browser.js.map +1 -1
  104. package/lib/msal-browser.min.js +43 -44
  105. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
2
2
  'use strict';
3
3
  import { BrowserConfigurationAuthError } from '../error/BrowserConfigurationAuthError.js';
4
4
 
@@ -11,6 +11,7 @@ import { SilentRequest } from "../request/SilentRequest";
11
11
  */
12
12
  export declare class PublicClientApplication extends ClientApplication implements IPublicClientApplication {
13
13
  private activeSilentTokenRequests;
14
+ private astsAsyncMeasurement?;
14
15
  /**
15
16
  * @constructor
16
17
  * Constructor for the PublicClientApplication used to instantiate the PublicClientApplication object
@@ -58,6 +59,7 @@ export declare class PublicClientApplication extends ClientApplication implement
58
59
  * @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
59
60
  */
60
61
  acquireTokenSilent(request: SilentRequest): Promise<AuthenticationResult>;
62
+ private trackPageVisibility;
61
63
  /**
62
64
  * 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.
63
65
  * @param {@link (SilentRequest:type)}
@@ -1 +1 @@
1
- {"version":3,"file":"PublicClientApplication.d.ts","sourceRoot":"","sources":["../../src/app/PublicClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAyG,MAAM,oBAAoB,CAAC;AAC9K,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,uB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OAAO,CAAC,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;IA6E/E,OAAO,CAAC,mBAAmB;IAU3B;;;;;OAKG;cACa,uBAAuB,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC;CAgGvH"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
4
  import { PerformanceEvents, Constants, ServerError, InteractionRequiredAuthError } from '@azure/msal-common';
@@ -43,7 +43,10 @@ var PublicClientApplication = /** @class */ (function (_super) {
43
43
  */
44
44
  function PublicClientApplication(configuration) {
45
45
  var _this = _super.call(this, configuration) || this;
46
+ _this.astsAsyncMeasurement = undefined;
46
47
  _this.activeSilentTokenRequests = new Map();
48
+ // Register listener functions
49
+ _this.trackPageVisibility = _this.trackPageVisibility.bind(_this);
47
50
  return _this;
48
51
  }
49
52
  /**
@@ -115,6 +118,7 @@ var PublicClientApplication = /** @class */ (function (_super) {
115
118
  cachedResponse = this.activeSilentTokenRequests.get(silentRequestKey);
116
119
  if (typeof cachedResponse === "undefined") {
117
120
  this.logger.verbose("acquireTokenSilent called for the first time, storing active request", correlationId);
121
+ this.performanceClient.setPreQueueTime(PerformanceEvents.AcquireTokenSilentAsync, correlationId);
118
122
  response = this.acquireTokenSilentAsync(__assign(__assign({}, request), { correlationId: correlationId }), account)
119
123
  .then(function (result) {
120
124
  _this.activeSilentTokenRequests.delete(silentRequestKey);
@@ -157,6 +161,15 @@ var PublicClientApplication = /** @class */ (function (_super) {
157
161
  });
158
162
  });
159
163
  };
164
+ PublicClientApplication.prototype.trackPageVisibility = function () {
165
+ if (!this.astsAsyncMeasurement) {
166
+ return;
167
+ }
168
+ this.logger.info("Perf: Visibility change detected");
169
+ this.astsAsyncMeasurement.increment({
170
+ visibilityChangeCount: 1,
171
+ });
172
+ };
160
173
  /**
161
174
  * 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.
162
175
  * @param {@link (SilentRequest:type)}
@@ -164,14 +177,20 @@ var PublicClientApplication = /** @class */ (function (_super) {
164
177
  * @returns {Promise.<AuthenticationResult>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse}
165
178
  */
166
179
  PublicClientApplication.prototype.acquireTokenSilentAsync = function (request, account) {
180
+ var _a;
167
181
  return __awaiter(this, void 0, void 0, function () {
168
- var atsAsyncMeasurement, result, silentRequest, silentCacheClient, silentRequest_1, requestWithCLP_1;
182
+ var result, silentRequest, silentCacheClient, silentRequest_1, requestWithCLP_1;
169
183
  var _this = this;
170
- return __generator(this, function (_a) {
171
- switch (_a.label) {
184
+ return __generator(this, function (_b) {
185
+ switch (_b.label) {
172
186
  case 0:
187
+ this.performanceClient.addQueueMeasurement(PerformanceEvents.AcquireTokenSilentAsync, request.correlationId);
173
188
  this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Silent, request);
174
- atsAsyncMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenSilentAsync, request.correlationId);
189
+ this.astsAsyncMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenSilentAsync, request.correlationId);
190
+ (_a = this.astsAsyncMeasurement) === null || _a === void 0 ? void 0 : _a.increment({
191
+ visibilityChangeCount: 0
192
+ });
193
+ document.addEventListener("visibilitychange", this.trackPageVisibility);
175
194
  if (!(NativeMessageHandler.isNativeAvailable(this.config, this.logger, this.nativeExtensionProvider, request.authenticationScheme) && account.nativeAccountId)) return [3 /*break*/, 1];
176
195
  this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform");
177
196
  silentRequest = __assign(__assign({}, request), { account: account });
@@ -181,7 +200,7 @@ var PublicClientApplication = /** @class */ (function (_super) {
181
200
  // If native token acquisition fails for availability reasons fallback to web flow
182
201
  if (e instanceof NativeAuthError && e.isFatal()) {
183
202
  this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow");
184
- this.nativeExtensionProvider = undefined; // Prevent future requests from continuing to attempt
203
+ this.nativeExtensionProvider = undefined; // Prevent future requests from continuing to attempt
185
204
  silentIframeClient = this.createSilentIframeClient(request.correlationId);
186
205
  return [2 /*return*/, silentIframeClient.acquireToken(request)];
187
206
  }
@@ -192,12 +211,14 @@ var PublicClientApplication = /** @class */ (function (_super) {
192
211
  case 1:
193
212
  this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow");
194
213
  silentCacheClient = this.createSilentCacheClient(request.correlationId);
214
+ this.performanceClient.setPreQueueTime(PerformanceEvents.InitializeSilentRequest, request.correlationId);
195
215
  return [4 /*yield*/, silentCacheClient.initializeSilentRequest(request, account)];
196
216
  case 2:
197
- silentRequest_1 = _a.sent();
217
+ silentRequest_1 = _b.sent();
198
218
  requestWithCLP_1 = __assign(__assign({}, request), {
199
219
  // set the request's CacheLookupPolicy to Default if it was not optionally passed in
200
220
  cacheLookupPolicy: request.cacheLookupPolicy || CacheLookupPolicy.Default });
221
+ this.performanceClient.setPreQueueTime(PerformanceEvents.AcquireTokenFromCache, silentRequest_1.correlationId);
201
222
  result = this.acquireTokenFromCache(silentCacheClient, silentRequest_1, requestWithCLP_1).catch(function (cacheError) {
202
223
  if (requestWithCLP_1.cacheLookupPolicy === CacheLookupPolicy.AccessToken) {
203
224
  throw cacheError;
@@ -205,6 +226,7 @@ var PublicClientApplication = /** @class */ (function (_super) {
205
226
  // block the reload if it occurred inside a hidden iframe
206
227
  BrowserUtils.blockReloadInHiddenIframes();
207
228
  _this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_NETWORK_START, InteractionType.Silent, silentRequest_1);
229
+ _this.performanceClient.setPreQueueTime(PerformanceEvents.AcquireTokenByRefreshToken, silentRequest_1.correlationId);
208
230
  return _this.acquireTokenByRefreshToken(silentRequest_1, requestWithCLP_1).catch(function (refreshTokenError) {
209
231
  var isServerError = refreshTokenError instanceof ServerError;
210
232
  var isInteractionRequiredError = refreshTokenError instanceof InteractionRequiredAuthError;
@@ -218,13 +240,15 @@ var PublicClientApplication = /** @class */ (function (_super) {
218
240
  throw refreshTokenError;
219
241
  }
220
242
  _this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.", request.correlationId);
243
+ _this.performanceClient.setPreQueueTime(PerformanceEvents.AcquireTokenBySilentIframe, silentRequest_1.correlationId);
221
244
  return _this.acquireTokenBySilentIframe(silentRequest_1);
222
245
  });
223
246
  });
224
- _a.label = 3;
247
+ _b.label = 3;
225
248
  case 3: return [2 /*return*/, result.then(function (response) {
249
+ var _a;
226
250
  _this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Silent, response);
227
- atsAsyncMeasurement.endMeasurement({
251
+ (_a = _this.astsAsyncMeasurement) === null || _a === void 0 ? void 0 : _a.endMeasurement({
228
252
  success: true,
229
253
  fromCache: response.fromCache,
230
254
  isNativeBroker: response.fromNativeBroker,
@@ -232,13 +256,16 @@ var PublicClientApplication = /** @class */ (function (_super) {
232
256
  });
233
257
  return response;
234
258
  }).catch(function (tokenRenewalError) {
259
+ var _a;
235
260
  _this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Silent, null, tokenRenewalError);
236
- atsAsyncMeasurement.endMeasurement({
261
+ (_a = _this.astsAsyncMeasurement) === null || _a === void 0 ? void 0 : _a.endMeasurement({
237
262
  errorCode: tokenRenewalError.errorCode,
238
263
  subErrorCode: tokenRenewalError.subError,
239
264
  success: false
240
265
  });
241
266
  throw tokenRenewalError;
267
+ }).finally(function () {
268
+ document.removeEventListener("visibilitychange", _this.trackPageVisibility);
242
269
  })];
243
270
  }
244
271
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PublicClientApplication.js","sources":["../../src/app/PublicClientApplication.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AccountInfo, AuthenticationResult, Constants, RequestThumbprint, AuthError, PerformanceEvents, ServerError, InteractionRequiredAuthError } from \"@azure/msal-common\";\nimport { Configuration } from \"../config/Configuration\";\nimport { DEFAULT_REQUEST, InteractionType, ApiId, CacheLookupPolicy, BrowserConstants } from \"../utils/BrowserConstants\";\nimport { IPublicClientApplication } from \"./IPublicClientApplication\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { ClientApplication } from \"./ClientApplication\";\nimport { SilentRequest } from \"../request/SilentRequest\";\nimport { EventType } from \"../event/EventType\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { NativeAuthError } from \"../error/NativeAuthError\";\nimport { NativeMessageHandler } from \"../broker/nativeBroker/NativeMessageHandler\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\n\n/**\n * The PublicClientApplication class is the object exposed by the library to perform authentication and authorization functions in Single Page Applications\n * to obtain JWT tokens as described in the OAuth 2.0 Authorization Code Flow with PKCE specification.\n */\nexport class PublicClientApplication extends ClientApplication implements IPublicClientApplication {\n\n // Active requests\n private activeSilentTokenRequests: 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 super(configuration);\n\n this.activeSilentTokenRequests = new Map();\n }\n\n /**\n * Use when initiating the login process by redirecting the user's browser to the authorization endpoint. This function redirects the page, so\n * 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 loginRedirect(request?: RedirectRequest): Promise<void> {\n const correlationId: string = this.getRequestCorrelationId(request);\n this.logger.verbose(\"loginRedirect called\", correlationId);\n return this.acquireTokenRedirect({\n correlationId,\n ...(request || DEFAULT_REQUEST)\n });\n }\n\n /**\n * Use when initiating the login process 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 loginPopup(request?: PopupRequest): Promise<AuthenticationResult> {\n const correlationId: string = this.getRequestCorrelationId(request);\n this.logger.verbose(\"loginPopup called\", correlationId);\n return this.acquireTokenPopup({\n correlationId,\n ...(request || DEFAULT_REQUEST)\n });\n }\n\n /**\n * Silently acquire an access token for a given set of scopes. Returns currently processing promise if parallel requests are made.\n *\n * @param {@link (SilentRequest:type)}\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\n */\n async acquireTokenSilent(request: SilentRequest): Promise<AuthenticationResult> {\n const correlationId = this.getRequestCorrelationId(request);\n const atsMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenSilent, correlationId);\n atsMeasurement.addStaticFields({\n cacheLookupPolicy: request.cacheLookupPolicy\n });\n \n this.preflightBrowserEnvironmentCheck(InteractionType.Silent);\n this.logger.verbose(\"acquireTokenSilent called\", correlationId);\n\n const account = request.account || this.getActiveAccount();\n if (!account) {\n throw BrowserAuthError.createNoAccountError();\n }\n\n const thumbprint: RequestThumbprint = {\n clientId: this.config.auth.clientId,\n authority: request.authority || Constants.EMPTY_STRING,\n scopes: request.scopes,\n homeAccountIdentifier: account.homeAccountId,\n claims: request.claims,\n authenticationScheme: request.authenticationScheme,\n resourceRequestMethod: request.resourceRequestMethod,\n resourceRequestUri: request.resourceRequestUri,\n shrClaims: request.shrClaims,\n sshKid: request.sshKid\n };\n const silentRequestKey = JSON.stringify(thumbprint);\n\n const cachedResponse = this.activeSilentTokenRequests.get(silentRequestKey);\n if (typeof cachedResponse === \"undefined\") {\n this.logger.verbose(\"acquireTokenSilent called for the first time, storing active request\", correlationId);\n\n const response = this.acquireTokenSilentAsync({\n ...request,\n correlationId\n }, account)\n .then((result) => {\n this.activeSilentTokenRequests.delete(silentRequestKey);\n atsMeasurement.addStaticFields({\n accessTokenSize: result.accessToken.length,\n idTokenSize: result.idToken.length\n });\n atsMeasurement.endMeasurement({\n success: true,\n fromCache: result.fromCache,\n isNativeBroker: result.fromNativeBroker,\n cacheLookupPolicy: request.cacheLookupPolicy,\n requestId: result.requestId,\n });\n atsMeasurement.flushMeasurement();\n return result;\n })\n .catch((error: AuthError) => {\n this.activeSilentTokenRequests.delete(silentRequestKey);\n atsMeasurement.endMeasurement({\n errorCode: error.errorCode,\n subErrorCode: error.subError,\n success: false\n });\n atsMeasurement.flushMeasurement();\n throw error;\n });\n this.activeSilentTokenRequests.set(silentRequestKey, response);\n return response;\n } else {\n this.logger.verbose(\"acquireTokenSilent has been called previously, returning the result from the first call\", correlationId);\n atsMeasurement.endMeasurement({\n success: true\n });\n // Discard measurements for memoized calls, as they are usually only a couple of ms and will artificially deflate metrics\n atsMeasurement.discardMeasurement();\n return cachedResponse;\n }\n }\n\n /**\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.\n * @param {@link (SilentRequest:type)}\n * @param {@link (AccountInfo:type)}\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} \n */\n protected async acquireTokenSilentAsync(request: SilentRequest, account: AccountInfo): Promise<AuthenticationResult>{\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Silent, request);\n const atsAsyncMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenSilentAsync, request.correlationId);\n\n let result: Promise<AuthenticationResult>;\n if (NativeMessageHandler.isNativeAvailable(this.config, this.logger, this.nativeExtensionProvider, request.authenticationScheme) && account.nativeAccountId) {\n this.logger.verbose(\"acquireTokenSilent - attempting to acquire token from native platform\");\n const silentRequest: SilentRequest = {\n ...request,\n account\n };\n result = this.acquireTokenNative(silentRequest, ApiId.acquireTokenSilent_silentFlow).catch(async (e: AuthError) => {\n // If native token acquisition fails for availability reasons fallback to web flow\n if (e instanceof NativeAuthError && e.isFatal()) {\n this.logger.verbose(\"acquireTokenSilent - native platform unavailable, falling back to web flow\");\n this.nativeExtensionProvider = undefined; // Prevent future requests from continuing to attempt \n\n // Cache will not contain tokens, given that previous WAM requests succeeded. Skip cache and RT renewal and go straight to iframe renewal\n const silentIframeClient = this.createSilentIframeClient(request.correlationId);\n return silentIframeClient.acquireToken(request);\n }\n throw e;\n });\n } else {\n this.logger.verbose(\"acquireTokenSilent - attempting to acquire token from web flow\");\n\n const silentCacheClient = this.createSilentCacheClient(request.correlationId);\n const silentRequest = await silentCacheClient.initializeSilentRequest(request, account);\n \n const requestWithCLP = {\n ...request,\n // set the request's CacheLookupPolicy to Default if it was not optionally passed in\n cacheLookupPolicy: request.cacheLookupPolicy || CacheLookupPolicy.Default\n };\n\n result = this.acquireTokenFromCache(silentCacheClient, silentRequest, requestWithCLP).catch((cacheError: AuthError) => {\n if (requestWithCLP.cacheLookupPolicy === CacheLookupPolicy.AccessToken) {\n throw cacheError;\n }\n\n // block the reload if it occurred inside a hidden iframe\n BrowserUtils.blockReloadInHiddenIframes();\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_NETWORK_START, InteractionType.Silent, silentRequest);\n\n return this.acquireTokenByRefreshToken(silentRequest, requestWithCLP).catch((refreshTokenError: AuthError) => {\n const isServerError = refreshTokenError instanceof ServerError;\n const isInteractionRequiredError = refreshTokenError instanceof InteractionRequiredAuthError;\n const isInvalidGrantError = (refreshTokenError.errorCode === BrowserConstants.INVALID_GRANT_ERROR);\n\n if ((!isServerError ||\n !isInvalidGrantError ||\n isInteractionRequiredError ||\n requestWithCLP.cacheLookupPolicy === CacheLookupPolicy.AccessTokenAndRefreshToken ||\n requestWithCLP.cacheLookupPolicy === CacheLookupPolicy.RefreshToken)\n && (requestWithCLP.cacheLookupPolicy !== CacheLookupPolicy.Skip)\n ) {\n throw refreshTokenError;\n }\n \n this.logger.verbose(\"Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.\", request.correlationId);\n return this.acquireTokenBySilentIframe(silentRequest);\n });\n });\n }\n\n return result.then((response) => {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Silent, response);\n atsAsyncMeasurement.endMeasurement({\n success: true,\n fromCache: response.fromCache,\n isNativeBroker: response.fromNativeBroker,\n requestId: response.requestId\n });\n return response;\n }).catch((tokenRenewalError: AuthError) => {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Silent, null, tokenRenewalError);\n atsAsyncMeasurement.endMeasurement({\n errorCode: tokenRenewalError.errorCode,\n subErrorCode: tokenRenewalError.subError,\n success: false\n });\n throw tokenRenewalError;\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;AAmBA;;;;;IAI6C,2CAAiB;;;;;;;;;;;;;;;;;;;;;;IA0B1D,iCAAY,aAA4B;QAAxC,YACI,kBAAM,aAAa,CAAC,SAGvB;QADG,KAAI,CAAC,yBAAyB,GAAG,IAAI,GAAG,EAAE,CAAC;;KAC9C;;;;;;;;;;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,CAAC;gBACpH,cAAc,CAAC,eAAe,CAAC;oBAC3B,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;iBAC/C,CAAC,CAAC;gBAEH,IAAI,CAAC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AAC,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,mBAAmB,CAAC,cAAc,CAAC;gCAC/B,OAAO,EAAE,IAAI;gCACb,SAAS,EAAE,QAAQ,CAAC,SAAS;gCAC7B,cAAc,EAAE,QAAQ,CAAC,gBAAgB;gCACzC,SAAS,EAAE,QAAQ,CAAC,SAAS;6BAChC,CAAC,CAAC;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,mBAAmB,CAAC,cAAc,CAAC;gCAC/B,SAAS,EAAE,iBAAiB,CAAC,SAAS;gCACtC,YAAY,EAAE,iBAAiB,CAAC,QAAQ;gCACxC,OAAO,EAAE,KAAK;6BACjB,CAAC,CAAC;4BACH,MAAM,iBAAiB,CAAC;yBAC3B,CAAC,EAAC;;;;KACN;IACL,8BAAC;AAAD,CA9OA,CAA6C,iBAAiB;;;;"}
1
+ {"version":3,"file":"PublicClientApplication.js","sources":["../../src/app/PublicClientApplication.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AccountInfo, AuthenticationResult, Constants, RequestThumbprint, AuthError, PerformanceEvents, ServerError, InteractionRequiredAuthError, InProgressPerformanceEvent } from \"@azure/msal-common\";\nimport { Configuration } from \"../config/Configuration\";\nimport { DEFAULT_REQUEST, InteractionType, ApiId, CacheLookupPolicy, BrowserConstants } from \"../utils/BrowserConstants\";\nimport { IPublicClientApplication } from \"./IPublicClientApplication\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { ClientApplication } from \"./ClientApplication\";\nimport { SilentRequest } from \"../request/SilentRequest\";\nimport { EventType } from \"../event/EventType\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { NativeAuthError } from \"../error/NativeAuthError\";\nimport { NativeMessageHandler } from \"../broker/nativeBroker/NativeMessageHandler\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\n\n/**\n * The PublicClientApplication class is the object exposed by the library to perform authentication and authorization functions in Single Page Applications\n * to obtain JWT tokens as described in the OAuth 2.0 Authorization Code Flow with PKCE specification.\n */\nexport class PublicClientApplication extends ClientApplication implements IPublicClientApplication {\n\n // Active requests\n private activeSilentTokenRequests: Map<string, Promise<AuthenticationResult>>;\n private astsAsyncMeasurement?: InProgressPerformanceEvent = undefined;\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 super(configuration);\n\n this.activeSilentTokenRequests = new Map();\n // Register listener functions\n this.trackPageVisibility = this.trackPageVisibility.bind(this);\n }\n\n /**\n * Use when initiating the login process by redirecting the user's browser to the authorization endpoint. This function redirects the page, so\n * 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 loginRedirect(request?: RedirectRequest): Promise<void> {\n const correlationId: string = this.getRequestCorrelationId(request);\n this.logger.verbose(\"loginRedirect called\", correlationId);\n return this.acquireTokenRedirect({\n correlationId,\n ...(request || DEFAULT_REQUEST)\n });\n }\n\n /**\n * Use when initiating the login process 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 loginPopup(request?: PopupRequest): Promise<AuthenticationResult> {\n const correlationId: string = this.getRequestCorrelationId(request);\n this.logger.verbose(\"loginPopup called\", correlationId);\n return this.acquireTokenPopup({\n correlationId,\n ...(request || DEFAULT_REQUEST)\n });\n }\n\n /**\n * Silently acquire an access token for a given set of scopes. Returns currently processing promise if parallel requests are made.\n *\n * @param {@link (SilentRequest:type)}\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\n */\n async acquireTokenSilent(request: SilentRequest): Promise<AuthenticationResult> {\n const correlationId = this.getRequestCorrelationId(request);\n const atsMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenSilent, correlationId);\n atsMeasurement.addStaticFields({\n cacheLookupPolicy: request.cacheLookupPolicy\n });\n\n this.preflightBrowserEnvironmentCheck(InteractionType.Silent);\n this.logger.verbose(\"acquireTokenSilent called\", correlationId);\n\n const account = request.account || this.getActiveAccount();\n if (!account) {\n throw BrowserAuthError.createNoAccountError();\n }\n\n const thumbprint: RequestThumbprint = {\n clientId: this.config.auth.clientId,\n authority: request.authority || Constants.EMPTY_STRING,\n scopes: request.scopes,\n homeAccountIdentifier: account.homeAccountId,\n claims: request.claims,\n authenticationScheme: request.authenticationScheme,\n resourceRequestMethod: request.resourceRequestMethod,\n resourceRequestUri: request.resourceRequestUri,\n shrClaims: request.shrClaims,\n sshKid: request.sshKid\n };\n const silentRequestKey = JSON.stringify(thumbprint);\n\n const cachedResponse = this.activeSilentTokenRequests.get(silentRequestKey);\n if (typeof cachedResponse === \"undefined\") {\n this.logger.verbose(\"acquireTokenSilent called for the first time, storing active request\", correlationId);\n\n this.performanceClient.setPreQueueTime(PerformanceEvents.AcquireTokenSilentAsync, correlationId);\n const response = this.acquireTokenSilentAsync({\n ...request,\n correlationId\n }, account)\n .then((result) => {\n this.activeSilentTokenRequests.delete(silentRequestKey);\n atsMeasurement.addStaticFields({\n accessTokenSize: result.accessToken.length,\n idTokenSize: result.idToken.length\n });\n atsMeasurement.endMeasurement({\n success: true,\n fromCache: result.fromCache,\n isNativeBroker: result.fromNativeBroker,\n cacheLookupPolicy: request.cacheLookupPolicy,\n requestId: result.requestId,\n });\n atsMeasurement.flushMeasurement();\n return result;\n })\n .catch((error: AuthError) => {\n this.activeSilentTokenRequests.delete(silentRequestKey);\n atsMeasurement.endMeasurement({\n errorCode: error.errorCode,\n subErrorCode: error.subError,\n success: false\n });\n atsMeasurement.flushMeasurement();\n throw error;\n });\n this.activeSilentTokenRequests.set(silentRequestKey, response);\n return response;\n } else {\n this.logger.verbose(\"acquireTokenSilent has been called previously, returning the result from the first call\", correlationId);\n atsMeasurement.endMeasurement({\n success: true\n });\n // Discard measurements for memoized calls, as they are usually only a couple of ms and will artificially deflate metrics\n atsMeasurement.discardMeasurement();\n return cachedResponse;\n }\n }\n\n private trackPageVisibility():void {\n if (!this.astsAsyncMeasurement) {\n return;\n }\n this.logger.info(\"Perf: Visibility change detected\");\n this.astsAsyncMeasurement.increment({\n visibilityChangeCount: 1,\n });\n }\n\n /**\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.\n * @param {@link (SilentRequest:type)}\n * @param {@link (AccountInfo:type)}\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}\n */\n protected async acquireTokenSilentAsync(request: SilentRequest, account: AccountInfo): Promise<AuthenticationResult>{\n this.performanceClient.addQueueMeasurement(PerformanceEvents.AcquireTokenSilentAsync, request.correlationId);\n\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Silent, request);\n this.astsAsyncMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenSilentAsync, request.correlationId);\n this.astsAsyncMeasurement?.increment({\n visibilityChangeCount: 0\n });\n document.addEventListener(\"visibilitychange\",this.trackPageVisibility);\n let result: Promise<AuthenticationResult>;\n if (NativeMessageHandler.isNativeAvailable(this.config, this.logger, this.nativeExtensionProvider, request.authenticationScheme) && account.nativeAccountId) {\n this.logger.verbose(\"acquireTokenSilent - attempting to acquire token from native platform\");\n const silentRequest: SilentRequest = {\n ...request,\n account\n };\n result = this.acquireTokenNative(silentRequest, ApiId.acquireTokenSilent_silentFlow).catch(async (e: AuthError) => {\n // If native token acquisition fails for availability reasons fallback to web flow\n if (e instanceof NativeAuthError && e.isFatal()) {\n this.logger.verbose(\"acquireTokenSilent - native platform unavailable, falling back to web flow\");\n this.nativeExtensionProvider = undefined; // Prevent future requests from continuing to attempt\n\n // Cache will not contain tokens, given that previous WAM requests succeeded. Skip cache and RT renewal and go straight to iframe renewal\n const silentIframeClient = this.createSilentIframeClient(request.correlationId);\n return silentIframeClient.acquireToken(request);\n }\n throw e;\n });\n } else {\n this.logger.verbose(\"acquireTokenSilent - attempting to acquire token from web flow\");\n\n const silentCacheClient = this.createSilentCacheClient(request.correlationId);\n\n this.performanceClient.setPreQueueTime(PerformanceEvents.InitializeSilentRequest, request.correlationId);\n const silentRequest = await silentCacheClient.initializeSilentRequest(request, account);\n\n const requestWithCLP = {\n ...request,\n // set the request's CacheLookupPolicy to Default if it was not optionally passed in\n cacheLookupPolicy: request.cacheLookupPolicy || CacheLookupPolicy.Default\n };\n\n this.performanceClient.setPreQueueTime(PerformanceEvents.AcquireTokenFromCache, silentRequest.correlationId);\n result = this.acquireTokenFromCache(silentCacheClient, silentRequest, requestWithCLP).catch((cacheError: AuthError) => {\n if (requestWithCLP.cacheLookupPolicy === CacheLookupPolicy.AccessToken) {\n throw cacheError;\n }\n\n // block the reload if it occurred inside a hidden iframe\n BrowserUtils.blockReloadInHiddenIframes();\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_NETWORK_START, InteractionType.Silent, silentRequest);\n\n this.performanceClient.setPreQueueTime(PerformanceEvents.AcquireTokenByRefreshToken, silentRequest.correlationId);\n return this.acquireTokenByRefreshToken(silentRequest, requestWithCLP).catch((refreshTokenError: AuthError) => {\n const isServerError = refreshTokenError instanceof ServerError;\n const isInteractionRequiredError = refreshTokenError instanceof InteractionRequiredAuthError;\n const isInvalidGrantError = (refreshTokenError.errorCode === BrowserConstants.INVALID_GRANT_ERROR);\n\n if ((!isServerError ||\n !isInvalidGrantError ||\n isInteractionRequiredError ||\n requestWithCLP.cacheLookupPolicy === CacheLookupPolicy.AccessTokenAndRefreshToken ||\n requestWithCLP.cacheLookupPolicy === CacheLookupPolicy.RefreshToken)\n && (requestWithCLP.cacheLookupPolicy !== CacheLookupPolicy.Skip)\n ) {\n throw refreshTokenError;\n }\n\n this.logger.verbose(\"Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.\", request.correlationId);\n this.performanceClient.setPreQueueTime(PerformanceEvents.AcquireTokenBySilentIframe, silentRequest.correlationId);\n return this.acquireTokenBySilentIframe(silentRequest);\n });\n });\n }\n\n return result.then((response) => {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Silent, response);\n this.astsAsyncMeasurement?.endMeasurement({\n success: true,\n fromCache: response.fromCache,\n isNativeBroker: response.fromNativeBroker,\n requestId: response.requestId\n });\n return response;\n }).catch((tokenRenewalError: AuthError) => {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Silent, null, tokenRenewalError);\n this.astsAsyncMeasurement?.endMeasurement({\n errorCode: tokenRenewalError.errorCode,\n subErrorCode: tokenRenewalError.subError,\n success: false\n });\n throw tokenRenewalError;\n }).finally(() => {\n document.removeEventListener(\"visibilitychange\",this.trackPageVisibility);\n });\n }\n}\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,OAA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al-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
2
2
  'use strict';
3
3
  import { __extends, __spread, __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { AccountEntity, CacheManager, IdTokenEntity, AccessTokenEntity, RefreshTokenEntity, AppMetadataEntity, ServerTelemetryEntity, AuthorityMetadataEntity, Constants, PersistentCacheKeys, ClientAuthError, ThrottlingEntity, StringUtils, ProtocolUtils, CcsCredentialType, IdToken, DEFAULT_CRYPTO_IMPLEMENTATION } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
2
2
  'use strict';
3
3
  /*
4
4
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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,4 +1,4 @@
1
- /*! @azure/msal-browser v2.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
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.32.2 2023-01-10 */
1
+ /*! @azure/msal-browser v2.33.0 2023-02-06 */
2
2
  'use strict';
3
3
  /*
4
4
  * Copyright (c) Microsoft Corporation. All rights reserved.