@azure/msal-browser 2.32.1 → 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 (110) 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 +39 -11
  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.d.ts.map +1 -1
  15. package/dist/cache/BrowserCacheManager.js +8 -7
  16. package/dist/cache/BrowserCacheManager.js.map +1 -1
  17. package/dist/cache/BrowserStorage.js +1 -1
  18. package/dist/cache/CryptoKeyStore.js +1 -1
  19. package/dist/cache/DatabaseStorage.js +1 -1
  20. package/dist/cache/MemoryStorage.js +1 -1
  21. package/dist/cache/TokenCache.js +1 -1
  22. package/dist/config/Configuration.d.ts.map +1 -1
  23. package/dist/config/Configuration.js +6 -3
  24. package/dist/config/Configuration.js.map +1 -1
  25. package/dist/crypto/BrowserCrypto.js +1 -1
  26. package/dist/crypto/CryptoOps.js +1 -1
  27. package/dist/crypto/GuidGenerator.js +1 -1
  28. package/dist/crypto/ModernBrowserCrypto.js +1 -1
  29. package/dist/crypto/MsBrowserCrypto.js +1 -1
  30. package/dist/crypto/MsrBrowserCrypto.js +1 -1
  31. package/dist/crypto/PkceGenerator.js +1 -1
  32. package/dist/crypto/SignedHttpRequest.js +1 -1
  33. package/dist/encode/Base64Decode.js +1 -1
  34. package/dist/encode/Base64Encode.js +1 -1
  35. package/dist/error/BrowserAuthError.js +1 -1
  36. package/dist/error/BrowserConfigurationAuthError.js +1 -1
  37. package/dist/error/NativeAuthError.js +1 -1
  38. package/dist/event/EventHandler.js +1 -1
  39. package/dist/event/EventMessage.js +1 -1
  40. package/dist/event/EventType.js +1 -1
  41. package/dist/index.cjs.js +1519 -886
  42. package/dist/index.cjs.js.map +1 -1
  43. package/dist/index.js +1 -1
  44. package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
  45. package/dist/interaction_client/BaseInteractionClient.js +3 -2
  46. package/dist/interaction_client/BaseInteractionClient.js.map +1 -1
  47. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +1 -1
  48. package/dist/interaction_client/NativeInteractionClient.js +1 -1
  49. package/dist/interaction_client/NativeInteractionClient.js.map +1 -1
  50. package/dist/interaction_client/PopupClient.d.ts.map +1 -1
  51. package/dist/interaction_client/PopupClient.js +9 -2
  52. package/dist/interaction_client/PopupClient.js.map +1 -1
  53. package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
  54. package/dist/interaction_client/RedirectClient.js +13 -5
  55. package/dist/interaction_client/RedirectClient.js.map +1 -1
  56. package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
  57. package/dist/interaction_client/SilentAuthCodeClient.js +7 -3
  58. package/dist/interaction_client/SilentAuthCodeClient.js.map +1 -1
  59. package/dist/interaction_client/SilentCacheClient.d.ts.map +1 -1
  60. package/dist/interaction_client/SilentCacheClient.js +7 -2
  61. package/dist/interaction_client/SilentCacheClient.js.map +1 -1
  62. package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
  63. package/dist/interaction_client/SilentIframeClient.js +21 -4
  64. package/dist/interaction_client/SilentIframeClient.js.map +1 -1
  65. package/dist/interaction_client/SilentRefreshClient.d.ts.map +1 -1
  66. package/dist/interaction_client/SilentRefreshClient.js +9 -3
  67. package/dist/interaction_client/SilentRefreshClient.js.map +1 -1
  68. package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  69. package/dist/interaction_client/StandardInteractionClient.js +27 -14
  70. package/dist/interaction_client/StandardInteractionClient.js.map +1 -1
  71. package/dist/interaction_handler/InteractionHandler.d.ts +3 -2
  72. package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
  73. package/dist/interaction_handler/InteractionHandler.js +12 -4
  74. package/dist/interaction_handler/InteractionHandler.js.map +1 -1
  75. package/dist/interaction_handler/RedirectHandler.d.ts +2 -2
  76. package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
  77. package/dist/interaction_handler/RedirectHandler.js +3 -3
  78. package/dist/interaction_handler/RedirectHandler.js.map +1 -1
  79. package/dist/interaction_handler/SilentHandler.d.ts +2 -2
  80. package/dist/interaction_handler/SilentHandler.d.ts.map +1 -1
  81. package/dist/interaction_handler/SilentHandler.js +13 -15
  82. package/dist/interaction_handler/SilentHandler.js.map +1 -1
  83. package/dist/internals.d.ts +4 -0
  84. package/dist/internals.d.ts.map +1 -1
  85. package/dist/internals.js +5 -1
  86. package/dist/internals.js.map +1 -1
  87. package/dist/navigation/NavigationClient.js +1 -1
  88. package/dist/network/FetchClient.js +1 -1
  89. package/dist/network/XhrClient.js +1 -1
  90. package/dist/packageMetadata.d.ts +1 -1
  91. package/dist/packageMetadata.js +2 -2
  92. package/dist/packageMetadata.js.map +1 -1
  93. package/dist/request/EndSessionPopupRequest.d.ts +1 -1
  94. package/dist/request/EndSessionPopupRequest.d.ts.map +1 -1
  95. package/dist/request/EndSessionRequest.d.ts +1 -1
  96. package/dist/request/EndSessionRequest.d.ts.map +1 -1
  97. package/dist/telemetry/BrowserPerformanceClient.d.ts +17 -0
  98. package/dist/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
  99. package/dist/telemetry/BrowserPerformanceClient.js +57 -1
  100. package/dist/telemetry/BrowserPerformanceClient.js.map +1 -1
  101. package/dist/telemetry/BrowserPerformanceMeasurement.js +1 -1
  102. package/dist/utils/BrowserConstants.js +1 -1
  103. package/dist/utils/BrowserProtocolUtils.js +1 -1
  104. package/dist/utils/BrowserStringUtils.js +1 -1
  105. package/dist/utils/BrowserUtils.js +1 -1
  106. package/dist/utils/MathUtils.js +1 -1
  107. package/lib/msal-browser.js +1519 -886
  108. package/lib/msal-browser.js.map +1 -1
  109. package/lib/msal-browser.min.js +43 -44
  110. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.32.1 2022-12-07 */
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,O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;IAG9F,OAAO,CAAC,yBAAyB,CAA6C;IAC9E,OAAO,CAAC,oBAAoB,CAAC,CAAyC;IAEtE;;;;;;;;;;;;;;;;;;;;OAoBG;gBACS,aAAa,EAAE,aAAa;IAQxC;;;;;;;;OAQG;IACG,aAAa,CAAC,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.1 2022-12-07 */
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);
@@ -126,7 +130,8 @@ var PublicClientApplication = /** @class */ (function (_super) {
126
130
  success: true,
127
131
  fromCache: result.fromCache,
128
132
  isNativeBroker: result.fromNativeBroker,
129
- requestId: result.requestId
133
+ cacheLookupPolicy: request.cacheLookupPolicy,
134
+ requestId: result.requestId,
130
135
  });
131
136
  atsMeasurement.flushMeasurement();
132
137
  return result;
@@ -156,6 +161,15 @@ var PublicClientApplication = /** @class */ (function (_super) {
156
161
  });
157
162
  });
158
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
+ };
159
173
  /**
160
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.
161
175
  * @param {@link (SilentRequest:type)}
@@ -163,14 +177,20 @@ var PublicClientApplication = /** @class */ (function (_super) {
163
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}
164
178
  */
165
179
  PublicClientApplication.prototype.acquireTokenSilentAsync = function (request, account) {
180
+ var _a;
166
181
  return __awaiter(this, void 0, void 0, function () {
167
- var astsAsyncMeasurement, result, silentRequest, silentCacheClient, silentRequest_1, requestWithCLP_1;
182
+ var result, silentRequest, silentCacheClient, silentRequest_1, requestWithCLP_1;
168
183
  var _this = this;
169
- return __generator(this, function (_a) {
170
- switch (_a.label) {
184
+ return __generator(this, function (_b) {
185
+ switch (_b.label) {
171
186
  case 0:
187
+ this.performanceClient.addQueueMeasurement(PerformanceEvents.AcquireTokenSilentAsync, request.correlationId);
172
188
  this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Silent, request);
173
- astsAsyncMeasurement = 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);
174
194
  if (!(NativeMessageHandler.isNativeAvailable(this.config, this.logger, this.nativeExtensionProvider, request.authenticationScheme) && account.nativeAccountId)) return [3 /*break*/, 1];
175
195
  this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform");
176
196
  silentRequest = __assign(__assign({}, request), { account: account });
@@ -180,7 +200,7 @@ var PublicClientApplication = /** @class */ (function (_super) {
180
200
  // If native token acquisition fails for availability reasons fallback to web flow
181
201
  if (e instanceof NativeAuthError && e.isFatal()) {
182
202
  this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow");
183
- this.nativeExtensionProvider = undefined; // Prevent future requests from continuing to attempt
203
+ this.nativeExtensionProvider = undefined; // Prevent future requests from continuing to attempt
184
204
  silentIframeClient = this.createSilentIframeClient(request.correlationId);
185
205
  return [2 /*return*/, silentIframeClient.acquireToken(request)];
186
206
  }
@@ -191,12 +211,14 @@ var PublicClientApplication = /** @class */ (function (_super) {
191
211
  case 1:
192
212
  this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow");
193
213
  silentCacheClient = this.createSilentCacheClient(request.correlationId);
214
+ this.performanceClient.setPreQueueTime(PerformanceEvents.InitializeSilentRequest, request.correlationId);
194
215
  return [4 /*yield*/, silentCacheClient.initializeSilentRequest(request, account)];
195
216
  case 2:
196
- silentRequest_1 = _a.sent();
217
+ silentRequest_1 = _b.sent();
197
218
  requestWithCLP_1 = __assign(__assign({}, request), {
198
219
  // set the request's CacheLookupPolicy to Default if it was not optionally passed in
199
220
  cacheLookupPolicy: request.cacheLookupPolicy || CacheLookupPolicy.Default });
221
+ this.performanceClient.setPreQueueTime(PerformanceEvents.AcquireTokenFromCache, silentRequest_1.correlationId);
200
222
  result = this.acquireTokenFromCache(silentCacheClient, silentRequest_1, requestWithCLP_1).catch(function (cacheError) {
201
223
  if (requestWithCLP_1.cacheLookupPolicy === CacheLookupPolicy.AccessToken) {
202
224
  throw cacheError;
@@ -204,6 +226,7 @@ var PublicClientApplication = /** @class */ (function (_super) {
204
226
  // block the reload if it occurred inside a hidden iframe
205
227
  BrowserUtils.blockReloadInHiddenIframes();
206
228
  _this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_NETWORK_START, InteractionType.Silent, silentRequest_1);
229
+ _this.performanceClient.setPreQueueTime(PerformanceEvents.AcquireTokenByRefreshToken, silentRequest_1.correlationId);
207
230
  return _this.acquireTokenByRefreshToken(silentRequest_1, requestWithCLP_1).catch(function (refreshTokenError) {
208
231
  var isServerError = refreshTokenError instanceof ServerError;
209
232
  var isInteractionRequiredError = refreshTokenError instanceof InteractionRequiredAuthError;
@@ -217,13 +240,15 @@ var PublicClientApplication = /** @class */ (function (_super) {
217
240
  throw refreshTokenError;
218
241
  }
219
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);
220
244
  return _this.acquireTokenBySilentIframe(silentRequest_1);
221
245
  });
222
246
  });
223
- _a.label = 3;
247
+ _b.label = 3;
224
248
  case 3: return [2 /*return*/, result.then(function (response) {
249
+ var _a;
225
250
  _this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Silent, response);
226
- astsAsyncMeasurement.endMeasurement({
251
+ (_a = _this.astsAsyncMeasurement) === null || _a === void 0 ? void 0 : _a.endMeasurement({
227
252
  success: true,
228
253
  fromCache: response.fromCache,
229
254
  isNativeBroker: response.fromNativeBroker,
@@ -231,13 +256,16 @@ var PublicClientApplication = /** @class */ (function (_super) {
231
256
  });
232
257
  return response;
233
258
  }).catch(function (tokenRenewalError) {
259
+ var _a;
234
260
  _this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Silent, null, tokenRenewalError);
235
- astsAsyncMeasurement.endMeasurement({
261
+ (_a = _this.astsAsyncMeasurement) === null || _a === void 0 ? void 0 : _a.endMeasurement({
236
262
  errorCode: tokenRenewalError.errorCode,
237
263
  subErrorCode: tokenRenewalError.subError,
238
264
  success: false
239
265
  });
240
266
  throw tokenRenewalError;
267
+ }).finally(function () {
268
+ document.removeEventListener("visibilitychange", _this.trackPageVisibility);
241
269
  })];
242
270
  }
243
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 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 astsAsyncMeasurement = 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 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 astsAsyncMeasurement.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,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/*\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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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,CAxQA,CAA6C,iBAAiB;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.32.1 2022-12-07 */
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 { NativeConstants, NativeExtensionMethod } from '../../utils/BrowserConstants.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.32.1 2022-12-07 */
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 +1 @@
1
- {"version":3,"file":"BrowserCacheManager.d.ts","sourceRoot":"","sources":["../../src/cache/BrowserCacheManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAA+C,8BAA8B,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,YAAY,EAAE,qBAAqB,EAAE,gBAAgB,EAAiB,MAAM,EAAE,uBAAuB,EAAiC,WAAW,EAAmE,mBAAmB,EAAmB,MAAM,oBAAoB,CAAC;AAC5c,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAyC,MAAM,2BAA2B,CAAC;AAEzH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAA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OAGG;IACH,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CAGjD;AAED,eAAO,MAAM,6BAA6B,aAAc,MAAM,UAAU,MAAM,KAAG,mBAOhF,CAAC"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.32.1 2022-12-07 */
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';
@@ -355,17 +355,17 @@ var BrowserCacheManager = /** @class */ (function (_super) {
355
355
  var activeAccountValueFilters = this.getItem(activeAccountKeyFilters);
356
356
  if (!activeAccountValueFilters) {
357
357
  // if new active account cache type isn't found, it's an old version, so look for that instead
358
- this.logger.trace("No active account filters cache schema found, looking for legacy schema");
358
+ this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");
359
359
  var activeAccountKeyLocal = this.generateCacheKey(PersistentCacheKeys.ACTIVE_ACCOUNT);
360
360
  var activeAccountValueLocal = this.getItem(activeAccountKeyLocal);
361
361
  if (!activeAccountValueLocal) {
362
- this.logger.trace("No active account found");
362
+ this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found");
363
363
  return null;
364
364
  }
365
365
  var activeAccount = this.getAccountInfoByFilter({ localAccountId: activeAccountValueLocal })[0] || null;
366
366
  if (activeAccount) {
367
- this.logger.trace("Legacy active account cache schema found");
368
- this.logger.trace("Adding active account filters cache schema");
367
+ this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found");
368
+ this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema");
369
369
  this.setActiveAccount(activeAccount);
370
370
  return activeAccount;
371
371
  }
@@ -373,13 +373,13 @@ var BrowserCacheManager = /** @class */ (function (_super) {
373
373
  }
374
374
  var activeAccountValueObj = this.validateAndParseJson(activeAccountValueFilters);
375
375
  if (activeAccountValueObj) {
376
- this.logger.trace("Active account filters schema found");
376
+ this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found");
377
377
  return this.getAccountInfoByFilter({
378
378
  homeAccountId: activeAccountValueObj.homeAccountId,
379
379
  localAccountId: activeAccountValueObj.localAccountId
380
380
  })[0] || null;
381
381
  }
382
- this.logger.trace("No active account found");
382
+ this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found");
383
383
  return null;
384
384
  };
385
385
  /**
@@ -410,6 +410,7 @@ var BrowserCacheManager = /** @class */ (function (_super) {
410
410
  */
411
411
  BrowserCacheManager.prototype.getAccountInfoByFilter = function (accountFilter) {
412
412
  var allAccounts = this.getAllAccounts();
413
+ this.logger.trace("BrowserCacheManager.getAccountInfoByFilter: total " + allAccounts.length + " accounts found");
413
414
  return allAccounts.filter(function (accountObj) {
414
415
  if (accountFilter.username && accountFilter.username.toLowerCase() !== accountObj.username.toLowerCase()) {
415
416
  return false;