@azure/msal-browser 3.7.0 → 3.7.2-alpha.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 (117) hide show
  1. package/dist/app/IPublicClientApplication.mjs +1 -1
  2. package/dist/app/PublicClientApplication.mjs +1 -1
  3. package/dist/app/PublicClientNext.mjs +1 -1
  4. package/dist/broker/nativeBroker/NativeMessageHandler.mjs +1 -1
  5. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  6. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  7. package/dist/cache/BrowserCacheManager.mjs +1 -1
  8. package/dist/cache/BrowserStorage.mjs +1 -1
  9. package/dist/cache/CryptoKeyStore.mjs +1 -1
  10. package/dist/cache/DatabaseStorage.mjs +1 -1
  11. package/dist/cache/MemoryStorage.mjs +1 -1
  12. package/dist/cache/TokenCache.d.ts.map +1 -1
  13. package/dist/cache/TokenCache.mjs +3 -2
  14. package/dist/cache/TokenCache.mjs.map +1 -1
  15. package/dist/config/Configuration.mjs +1 -1
  16. package/dist/controllers/ControllerFactory.mjs +1 -1
  17. package/dist/controllers/NestedAppAuthController.mjs +1 -1
  18. package/dist/controllers/StandardController.d.ts.map +1 -1
  19. package/dist/controllers/StandardController.mjs +9 -3
  20. package/dist/controllers/StandardController.mjs.map +1 -1
  21. package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
  22. package/dist/crypto/BrowserCrypto.d.ts +6 -3
  23. package/dist/crypto/BrowserCrypto.d.ts.map +1 -1
  24. package/dist/crypto/BrowserCrypto.mjs +54 -5
  25. package/dist/crypto/BrowserCrypto.mjs.map +1 -1
  26. package/dist/crypto/CryptoOps.mjs +1 -1
  27. package/dist/crypto/PkceGenerator.mjs +1 -1
  28. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  29. package/dist/encode/Base64Decode.mjs +1 -1
  30. package/dist/encode/Base64Encode.mjs +1 -1
  31. package/dist/error/BrowserAuthError.mjs +1 -1
  32. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  33. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  34. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  35. package/dist/error/NativeAuthError.mjs +1 -1
  36. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  37. package/dist/error/NestedAppAuthError.mjs +1 -1
  38. package/dist/event/EventHandler.mjs +1 -1
  39. package/dist/event/EventMessage.mjs +1 -1
  40. package/dist/event/EventType.mjs +1 -1
  41. package/dist/index.mjs +1 -1
  42. package/dist/interaction_client/BaseInteractionClient.d.ts +5 -4
  43. package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
  44. package/dist/interaction_client/BaseInteractionClient.mjs +18 -23
  45. package/dist/interaction_client/BaseInteractionClient.mjs.map +1 -1
  46. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  47. package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
  48. package/dist/interaction_client/NativeInteractionClient.mjs +3 -2
  49. package/dist/interaction_client/NativeInteractionClient.mjs.map +1 -1
  50. package/dist/interaction_client/PopupClient.d.ts.map +1 -1
  51. package/dist/interaction_client/PopupClient.mjs +4 -3
  52. package/dist/interaction_client/PopupClient.mjs.map +1 -1
  53. package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
  54. package/dist/interaction_client/RedirectClient.mjs +4 -3
  55. package/dist/interaction_client/RedirectClient.mjs.map +1 -1
  56. package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
  57. package/dist/interaction_client/SilentAuthCodeClient.mjs +2 -2
  58. package/dist/interaction_client/SilentAuthCodeClient.mjs.map +1 -1
  59. package/dist/interaction_client/SilentCacheClient.d.ts +1 -1
  60. package/dist/interaction_client/SilentCacheClient.d.ts.map +1 -1
  61. package/dist/interaction_client/SilentCacheClient.mjs +5 -5
  62. package/dist/interaction_client/SilentCacheClient.mjs.map +1 -1
  63. package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
  64. package/dist/interaction_client/SilentIframeClient.mjs +2 -2
  65. package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
  66. package/dist/interaction_client/SilentRefreshClient.d.ts +2 -2
  67. package/dist/interaction_client/SilentRefreshClient.d.ts.map +1 -1
  68. package/dist/interaction_client/SilentRefreshClient.mjs +5 -5
  69. package/dist/interaction_client/SilentRefreshClient.mjs.map +1 -1
  70. package/dist/interaction_client/StandardInteractionClient.d.ts +3 -9
  71. package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  72. package/dist/interaction_client/StandardInteractionClient.mjs +6 -29
  73. package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
  74. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  75. package/dist/interaction_handler/RedirectHandler.mjs +1 -1
  76. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  77. package/dist/naa/BridgeError.mjs +1 -1
  78. package/dist/naa/BridgeProxy.mjs +1 -1
  79. package/dist/naa/BridgeStatusCode.mjs +1 -1
  80. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  81. package/dist/navigation/NavigationClient.mjs +1 -1
  82. package/dist/network/FetchClient.mjs +1 -1
  83. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  84. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  85. package/dist/operatingcontext/TeamsAppOperatingContext.mjs +1 -1
  86. package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
  87. package/dist/packageMetadata.d.ts +1 -1
  88. package/dist/packageMetadata.d.ts.map +1 -1
  89. package/dist/packageMetadata.mjs +2 -2
  90. package/dist/request/SilentRequest.d.ts +1 -0
  91. package/dist/request/SilentRequest.d.ts.map +1 -1
  92. package/dist/response/ResponseHandler.mjs +1 -1
  93. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  94. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  95. package/dist/utils/BrowserConstants.mjs +1 -1
  96. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  97. package/dist/utils/BrowserUtils.mjs +1 -1
  98. package/lib/msal-browser.cjs +261 -712
  99. package/lib/msal-browser.cjs.map +1 -1
  100. package/lib/msal-browser.js +261 -712
  101. package/lib/msal-browser.js.map +1 -1
  102. package/lib/msal-browser.min.js +67 -66
  103. package/package.json +4 -4
  104. package/src/cache/TokenCache.ts +3 -1
  105. package/src/controllers/StandardController.ts +8 -2
  106. package/src/crypto/BrowserCrypto.ts +57 -4
  107. package/src/interaction_client/BaseInteractionClient.ts +41 -44
  108. package/src/interaction_client/NativeInteractionClient.ts +6 -1
  109. package/src/interaction_client/PopupClient.ts +8 -2
  110. package/src/interaction_client/RedirectClient.ts +8 -2
  111. package/src/interaction_client/SilentAuthCodeClient.ts +6 -1
  112. package/src/interaction_client/SilentCacheClient.ts +6 -4
  113. package/src/interaction_client/SilentIframeClient.ts +2 -1
  114. package/src/interaction_client/SilentRefreshClient.ts +7 -4
  115. package/src/interaction_client/StandardInteractionClient.ts +11 -57
  116. package/src/packageMetadata.ts +1 -1
  117. package/src/request/SilentRequest.ts +1 -0
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v3.7.0 2024-01-09 */
1
+ /*! @azure/msal-browser v3.7.2-alpha.0 2024-01-30 */
2
2
  'use strict';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -6,7 +6,7 @@
6
6
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.msal = {}));
7
7
  })(this, (function (exports) { 'use strict';
8
8
 
9
- /*! @azure/msal-common v14.6.0 2024-01-09 */
9
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
10
10
  /*
11
11
  * Copyright (c) Microsoft Corporation. All rights reserved.
12
12
  * Licensed under the MIT License.
@@ -301,7 +301,7 @@
301
301
  Pop: "pop",
302
302
  };
303
303
 
304
- /*! @azure/msal-common v14.6.0 2024-01-09 */
304
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
305
305
  /*
306
306
  * Copyright (c) Microsoft Corporation. All rights reserved.
307
307
  * Licensed under the MIT License.
@@ -318,7 +318,7 @@
318
318
  unexpectedError: unexpectedError
319
319
  });
320
320
 
321
- /*! @azure/msal-common v14.6.0 2024-01-09 */
321
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
322
322
 
323
323
  /*
324
324
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -367,7 +367,7 @@
367
367
  : AuthErrorMessages[code]);
368
368
  }
369
369
 
370
- /*! @azure/msal-common v14.6.0 2024-01-09 */
370
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
371
371
  /*
372
372
  * Copyright (c) Microsoft Corporation. All rights reserved.
373
373
  * Licensed under the MIT License.
@@ -465,7 +465,7 @@
465
465
  userTimeoutReached: userTimeoutReached
466
466
  });
467
467
 
468
- /*! @azure/msal-common v14.6.0 2024-01-09 */
468
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
469
469
 
470
470
  /*
471
471
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -717,7 +717,7 @@
717
717
  return new ClientAuthError(errorCode, additionalMessage);
718
718
  }
719
719
 
720
- /*! @azure/msal-common v14.6.0 2024-01-09 */
720
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
721
721
 
722
722
  /*
723
723
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -750,7 +750,7 @@
750
750
  },
751
751
  };
752
752
 
753
- /*! @azure/msal-common v14.6.0 2024-01-09 */
753
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
754
754
 
755
755
  /*
756
756
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -941,12 +941,12 @@
941
941
  }
942
942
  }
943
943
 
944
- /*! @azure/msal-common v14.6.0 2024-01-09 */
944
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
945
945
  /* eslint-disable header/header */
946
946
  const name$1 = "@azure/msal-common";
947
- const version$1 = "14.6.0";
947
+ const version$1 = "14.6.2-alpha.0";
948
948
 
949
- /*! @azure/msal-common v14.6.0 2024-01-09 */
949
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
950
950
  /*
951
951
  * Copyright (c) Microsoft Corporation. All rights reserved.
952
952
  * Licensed under the MIT License.
@@ -966,7 +966,7 @@
966
966
  AzureUsGovernment: "https://login.microsoftonline.us",
967
967
  };
968
968
 
969
- /*! @azure/msal-common v14.6.0 2024-01-09 */
969
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
970
970
 
971
971
  /*
972
972
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1027,54 +1027,44 @@
1027
1027
  }
1028
1028
  }
1029
1029
 
1030
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1030
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
1031
1031
  /*
1032
1032
  * Copyright (c) Microsoft Corporation. All rights reserved.
1033
1033
  * Licensed under the MIT License.
1034
1034
  */
1035
1035
  /**
1036
- * Utility class which exposes functions for managing date and time operations.
1036
+ * Utility functions for managing date and time operations.
1037
1037
  */
1038
- class TimeUtils {
1039
- /**
1040
- * return the current time in Unix time (seconds).
1041
- */
1042
- static nowSeconds() {
1043
- // Date.getTime() returns in milliseconds.
1044
- return Math.round(new Date().getTime() / 1000.0);
1045
- }
1046
- /**
1047
- * check if a token is expired based on given UTC time in seconds.
1048
- * @param expiresOn
1049
- */
1050
- static isTokenExpired(expiresOn, offset) {
1051
- // check for access token expiry
1052
- const expirationSec = Number(expiresOn) || 0;
1053
- const offsetCurrentTimeSec = TimeUtils.nowSeconds() + offset;
1054
- // If current time + offset is greater than token expiration time, then token is expired.
1055
- return offsetCurrentTimeSec > expirationSec;
1056
- }
1057
- /**
1058
- * If the current time is earlier than the time that a token was cached at, we must discard the token
1059
- * i.e. The system clock was turned back after acquiring the cached token
1060
- * @param cachedAt
1061
- * @param offset
1062
- */
1063
- static wasClockTurnedBack(cachedAt) {
1064
- const cachedAtSec = Number(cachedAt);
1065
- return cachedAtSec > TimeUtils.nowSeconds();
1066
- }
1067
- /**
1068
- * Waits for t number of milliseconds
1069
- * @param t number
1070
- * @param value T
1071
- */
1072
- static delay(t, value) {
1073
- return new Promise((resolve) => setTimeout(() => resolve(value), t));
1074
- }
1038
+ /**
1039
+ * return the current time in Unix time (seconds).
1040
+ */
1041
+ function nowSeconds() {
1042
+ // Date.getTime() returns in milliseconds.
1043
+ return Math.round(new Date().getTime() / 1000.0);
1044
+ }
1045
+ /**
1046
+ * check if a token is expired based on given UTC time in seconds.
1047
+ * @param expiresOn
1048
+ */
1049
+ function isTokenExpired(expiresOn, offset) {
1050
+ // check for access token expiry
1051
+ const expirationSec = Number(expiresOn) || 0;
1052
+ const offsetCurrentTimeSec = nowSeconds() + offset;
1053
+ // If current time + offset is greater than token expiration time, then token is expired.
1054
+ return offsetCurrentTimeSec > expirationSec;
1055
+ }
1056
+ /**
1057
+ * If the current time is earlier than the time that a token was cached at, we must discard the token
1058
+ * i.e. The system clock was turned back after acquiring the cached token
1059
+ * @param cachedAt
1060
+ * @param offset
1061
+ */
1062
+ function wasClockTurnedBack(cachedAt) {
1063
+ const cachedAtSec = Number(cachedAt);
1064
+ return cachedAtSec > nowSeconds();
1075
1065
  }
1076
1066
 
1077
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1067
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
1078
1068
 
1079
1069
  /*
1080
1070
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1132,7 +1122,7 @@
1132
1122
  homeAccountId: homeAccountId,
1133
1123
  credentialType: CredentialType.ACCESS_TOKEN,
1134
1124
  secret: accessToken,
1135
- cachedAt: TimeUtils.nowSeconds().toString(),
1125
+ cachedAt: nowSeconds().toString(),
1136
1126
  expiresOn: expiresOn.toString(),
1137
1127
  extendedExpiresOn: extExpiresOn.toString(),
1138
1128
  environment: environment,
@@ -1376,7 +1366,7 @@
1376
1366
  * Reset the exiresAt value
1377
1367
  */
1378
1368
  function generateAuthorityMetadataExpiresAt() {
1379
- return (TimeUtils.nowSeconds() +
1369
+ return (nowSeconds() +
1380
1370
  AUTHORITY_METADATA_CONSTANTS.REFRESH_TIME_SECONDS);
1381
1371
  }
1382
1372
  function updateAuthorityEndpointMetadata(authorityMetadata, updatedValues, fromNetwork) {
@@ -1398,10 +1388,10 @@
1398
1388
  * Returns whether or not the data needs to be refreshed
1399
1389
  */
1400
1390
  function isAuthorityMetadataExpired(metadata) {
1401
- return metadata.expiresAt <= TimeUtils.nowSeconds();
1391
+ return metadata.expiresAt <= nowSeconds();
1402
1392
  }
1403
1393
 
1404
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1394
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
1405
1395
  /*
1406
1396
  * Copyright (c) Microsoft Corporation. All rights reserved.
1407
1397
  * Licensed under the MIT License.
@@ -1455,7 +1445,7 @@
1455
1445
  urlParseError: urlParseError
1456
1446
  });
1457
1447
 
1458
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1448
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
1459
1449
 
1460
1450
  /*
1461
1451
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1593,7 +1583,7 @@
1593
1583
  return new ClientConfigurationError(errorCode);
1594
1584
  }
1595
1585
 
1596
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1586
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
1597
1587
  /*
1598
1588
  * Copyright (c) Microsoft Corporation. All rights reserved.
1599
1589
  * Licensed under the MIT License.
@@ -1690,7 +1680,7 @@
1690
1680
  }
1691
1681
  }
1692
1682
 
1693
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1683
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
1694
1684
 
1695
1685
  /*
1696
1686
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1890,7 +1880,7 @@
1890
1880
  }
1891
1881
  }
1892
1882
 
1893
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1883
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
1894
1884
 
1895
1885
  /*
1896
1886
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1930,7 +1920,7 @@
1930
1920
  };
1931
1921
  }
1932
1922
 
1933
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1923
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
1934
1924
  /*
1935
1925
  * Copyright (c) Microsoft Corporation. All rights reserved.
1936
1926
  * Licensed under the MIT License.
@@ -1991,7 +1981,7 @@
1991
1981
  return updatedAccountInfo;
1992
1982
  }
1993
1983
 
1994
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1984
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
1995
1985
  /*
1996
1986
  * Copyright (c) Microsoft Corporation. All rights reserved.
1997
1987
  * Licensed under the MIT License.
@@ -2006,7 +1996,7 @@
2006
1996
  Ciam: 3,
2007
1997
  };
2008
1998
 
2009
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1999
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
2010
2000
  /*
2011
2001
  * Copyright (c) Microsoft Corporation. All rights reserved.
2012
2002
  * Licensed under the MIT License.
@@ -2028,7 +2018,7 @@
2028
2018
  return null;
2029
2019
  }
2030
2020
 
2031
- /*! @azure/msal-common v14.6.0 2024-01-09 */
2021
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
2032
2022
  /*
2033
2023
  * Copyright (c) Microsoft Corporation. All rights reserved.
2034
2024
  * Licensed under the MIT License.
@@ -2041,7 +2031,7 @@
2041
2031
  OIDC: "OIDC",
2042
2032
  };
2043
2033
 
2044
- /*! @azure/msal-common v14.6.0 2024-01-09 */
2034
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
2045
2035
 
2046
2036
  /*
2047
2037
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2288,7 +2278,7 @@
2288
2278
  }
2289
2279
  }
2290
2280
 
2291
- /*! @azure/msal-common v14.6.0 2024-01-09 */
2281
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
2292
2282
 
2293
2283
  /*
2294
2284
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2335,7 +2325,7 @@
2335
2325
  return null;
2336
2326
  }
2337
2327
 
2338
- /*! @azure/msal-common v14.6.0 2024-01-09 */
2328
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
2339
2329
 
2340
2330
  /*
2341
2331
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2499,7 +2489,7 @@
2499
2489
  }
2500
2490
  }
2501
2491
 
2502
- /*! @azure/msal-common v14.6.0 2024-01-09 */
2492
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
2503
2493
 
2504
2494
  /*
2505
2495
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2507,496 +2497,30 @@
2507
2497
  */
2508
2498
  const rawMetdataJSON = {
2509
2499
  endpointMetadata: {
2510
- "https://login.microsoftonline.com/common/": {
2511
- token_endpoint: "https://login.microsoftonline.com/common/oauth2/v2.0/token",
2512
- token_endpoint_auth_methods_supported: [
2513
- "client_secret_post",
2514
- "private_key_jwt",
2515
- "client_secret_basic",
2516
- ],
2517
- jwks_uri: "https://login.microsoftonline.com/common/discovery/v2.0/keys",
2518
- response_modes_supported: ["query", "fragment", "form_post"],
2519
- subject_types_supported: ["pairwise"],
2520
- id_token_signing_alg_values_supported: ["RS256"],
2521
- response_types_supported: [
2522
- "code",
2523
- "id_token",
2524
- "code id_token",
2525
- "id_token token",
2526
- ],
2527
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2528
- issuer: "https://login.microsoftonline.com/{tenantid}/v2.0",
2529
- request_uri_parameter_supported: false,
2530
- userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo",
2531
- authorization_endpoint: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
2532
- device_authorization_endpoint: "https://login.microsoftonline.com/common/oauth2/v2.0/devicecode",
2533
- http_logout_supported: true,
2534
- frontchannel_logout_supported: true,
2535
- end_session_endpoint: "https://login.microsoftonline.com/common/oauth2/v2.0/logout",
2536
- claims_supported: [
2537
- "sub",
2538
- "iss",
2539
- "cloud_instance_name",
2540
- "cloud_instance_host_name",
2541
- "cloud_graph_host_name",
2542
- "msgraph_host",
2543
- "aud",
2544
- "exp",
2545
- "iat",
2546
- "auth_time",
2547
- "acr",
2548
- "nonce",
2549
- "preferred_username",
2550
- "name",
2551
- "tid",
2552
- "ver",
2553
- "at_hash",
2554
- "c_hash",
2555
- "email",
2556
- ],
2557
- kerberos_endpoint: "https://login.microsoftonline.com/common/kerberos",
2558
- tenant_region_scope: null,
2559
- cloud_instance_name: "microsoftonline.com",
2560
- cloud_graph_host_name: "graph.windows.net",
2561
- msgraph_host: "graph.microsoft.com",
2562
- rbac_url: "https://pas.windows.net",
2563
- },
2564
- "https://login.chinacloudapi.cn/common/": {
2565
- token_endpoint: "https://login.chinacloudapi.cn/common/oauth2/v2.0/token",
2566
- token_endpoint_auth_methods_supported: [
2567
- "client_secret_post",
2568
- "private_key_jwt",
2569
- "client_secret_basic",
2570
- ],
2571
- jwks_uri: "https://login.chinacloudapi.cn/common/discovery/v2.0/keys",
2572
- response_modes_supported: ["query", "fragment", "form_post"],
2573
- subject_types_supported: ["pairwise"],
2574
- id_token_signing_alg_values_supported: ["RS256"],
2575
- response_types_supported: [
2576
- "code",
2577
- "id_token",
2578
- "code id_token",
2579
- "id_token token",
2580
- ],
2581
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2582
- issuer: "https://login.partner.microsoftonline.cn/{tenantid}/v2.0",
2583
- request_uri_parameter_supported: false,
2584
- userinfo_endpoint: "https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",
2585
- authorization_endpoint: "https://login.chinacloudapi.cn/common/oauth2/v2.0/authorize",
2586
- device_authorization_endpoint: "https://login.chinacloudapi.cn/common/oauth2/v2.0/devicecode",
2587
- http_logout_supported: true,
2588
- frontchannel_logout_supported: true,
2589
- end_session_endpoint: "https://login.chinacloudapi.cn/common/oauth2/v2.0/logout",
2590
- claims_supported: [
2591
- "sub",
2592
- "iss",
2593
- "cloud_instance_name",
2594
- "cloud_instance_host_name",
2595
- "cloud_graph_host_name",
2596
- "msgraph_host",
2597
- "aud",
2598
- "exp",
2599
- "iat",
2600
- "auth_time",
2601
- "acr",
2602
- "nonce",
2603
- "preferred_username",
2604
- "name",
2605
- "tid",
2606
- "ver",
2607
- "at_hash",
2608
- "c_hash",
2609
- "email",
2610
- ],
2611
- kerberos_endpoint: "https://login.chinacloudapi.cn/common/kerberos",
2612
- tenant_region_scope: null,
2613
- cloud_instance_name: "partner.microsoftonline.cn",
2614
- cloud_graph_host_name: "graph.chinacloudapi.cn",
2615
- msgraph_host: "microsoftgraph.chinacloudapi.cn",
2616
- rbac_url: "https://pas.chinacloudapi.cn",
2617
- },
2618
- "https://login.microsoftonline.us/common/": {
2619
- token_endpoint: "https://login.microsoftonline.us/common/oauth2/v2.0/token",
2620
- token_endpoint_auth_methods_supported: [
2621
- "client_secret_post",
2622
- "private_key_jwt",
2623
- "client_secret_basic",
2624
- ],
2625
- jwks_uri: "https://login.microsoftonline.us/common/discovery/v2.0/keys",
2626
- response_modes_supported: ["query", "fragment", "form_post"],
2627
- subject_types_supported: ["pairwise"],
2628
- id_token_signing_alg_values_supported: ["RS256"],
2629
- response_types_supported: [
2630
- "code",
2631
- "id_token",
2632
- "code id_token",
2633
- "id_token token",
2634
- ],
2635
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2636
- issuer: "https://login.microsoftonline.us/{tenantid}/v2.0",
2637
- request_uri_parameter_supported: false,
2638
- userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo",
2639
- authorization_endpoint: "https://login.microsoftonline.us/common/oauth2/v2.0/authorize",
2640
- device_authorization_endpoint: "https://login.microsoftonline.us/common/oauth2/v2.0/devicecode",
2641
- http_logout_supported: true,
2642
- frontchannel_logout_supported: true,
2643
- end_session_endpoint: "https://login.microsoftonline.us/common/oauth2/v2.0/logout",
2644
- claims_supported: [
2645
- "sub",
2646
- "iss",
2647
- "cloud_instance_name",
2648
- "cloud_instance_host_name",
2649
- "cloud_graph_host_name",
2650
- "msgraph_host",
2651
- "aud",
2652
- "exp",
2653
- "iat",
2654
- "auth_time",
2655
- "acr",
2656
- "nonce",
2657
- "preferred_username",
2658
- "name",
2659
- "tid",
2660
- "ver",
2661
- "at_hash",
2662
- "c_hash",
2663
- "email",
2664
- ],
2665
- kerberos_endpoint: "https://login.microsoftonline.us/common/kerberos",
2666
- tenant_region_scope: null,
2667
- cloud_instance_name: "microsoftonline.us",
2668
- cloud_graph_host_name: "graph.windows.net",
2669
- msgraph_host: "graph.microsoft.com",
2670
- rbac_url: "https://pasff.usgovcloudapi.net",
2671
- },
2672
- "https://login.microsoftonline.com/consumers/": {
2673
- token_endpoint: "https://login.microsoftonline.com/consumers/oauth2/v2.0/token",
2674
- token_endpoint_auth_methods_supported: [
2675
- "client_secret_post",
2676
- "private_key_jwt",
2677
- "client_secret_basic",
2678
- ],
2679
- jwks_uri: "https://login.microsoftonline.com/consumers/discovery/v2.0/keys",
2680
- response_modes_supported: ["query", "fragment", "form_post"],
2681
- subject_types_supported: ["pairwise"],
2682
- id_token_signing_alg_values_supported: ["RS256"],
2683
- response_types_supported: [
2684
- "code",
2685
- "id_token",
2686
- "code id_token",
2687
- "id_token token",
2688
- ],
2689
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2690
- issuer: "https://login.microsoftonline.com/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",
2691
- request_uri_parameter_supported: false,
2692
- userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo",
2693
- authorization_endpoint: "https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize",
2694
- device_authorization_endpoint: "https://login.microsoftonline.com/consumers/oauth2/v2.0/devicecode",
2695
- http_logout_supported: true,
2696
- frontchannel_logout_supported: true,
2697
- end_session_endpoint: "https://login.microsoftonline.com/consumers/oauth2/v2.0/logout",
2698
- claims_supported: [
2699
- "sub",
2700
- "iss",
2701
- "cloud_instance_name",
2702
- "cloud_instance_host_name",
2703
- "cloud_graph_host_name",
2704
- "msgraph_host",
2705
- "aud",
2706
- "exp",
2707
- "iat",
2708
- "auth_time",
2709
- "acr",
2710
- "nonce",
2711
- "preferred_username",
2712
- "name",
2713
- "tid",
2714
- "ver",
2715
- "at_hash",
2716
- "c_hash",
2717
- "email",
2718
- ],
2719
- kerberos_endpoint: "https://login.microsoftonline.com/consumers/kerberos",
2720
- tenant_region_scope: null,
2721
- cloud_instance_name: "microsoftonline.com",
2722
- cloud_graph_host_name: "graph.windows.net",
2723
- msgraph_host: "graph.microsoft.com",
2724
- rbac_url: "https://pas.windows.net",
2725
- },
2726
- "https://login.chinacloudapi.cn/consumers/": {
2727
- token_endpoint: "https://login.chinacloudapi.cn/consumers/oauth2/v2.0/token",
2728
- token_endpoint_auth_methods_supported: [
2729
- "client_secret_post",
2730
- "private_key_jwt",
2731
- "client_secret_basic",
2732
- ],
2733
- jwks_uri: "https://login.chinacloudapi.cn/consumers/discovery/v2.0/keys",
2734
- response_modes_supported: ["query", "fragment", "form_post"],
2735
- subject_types_supported: ["pairwise"],
2736
- id_token_signing_alg_values_supported: ["RS256"],
2737
- response_types_supported: [
2738
- "code",
2739
- "id_token",
2740
- "code id_token",
2741
- "id_token token",
2742
- ],
2743
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2744
- issuer: "https://login.partner.microsoftonline.cn/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",
2745
- request_uri_parameter_supported: false,
2746
- userinfo_endpoint: "https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",
2747
- authorization_endpoint: "https://login.chinacloudapi.cn/consumers/oauth2/v2.0/authorize",
2748
- device_authorization_endpoint: "https://login.chinacloudapi.cn/consumers/oauth2/v2.0/devicecode",
2749
- http_logout_supported: true,
2750
- frontchannel_logout_supported: true,
2751
- end_session_endpoint: "https://login.chinacloudapi.cn/consumers/oauth2/v2.0/logout",
2752
- claims_supported: [
2753
- "sub",
2754
- "iss",
2755
- "cloud_instance_name",
2756
- "cloud_instance_host_name",
2757
- "cloud_graph_host_name",
2758
- "msgraph_host",
2759
- "aud",
2760
- "exp",
2761
- "iat",
2762
- "auth_time",
2763
- "acr",
2764
- "nonce",
2765
- "preferred_username",
2766
- "name",
2767
- "tid",
2768
- "ver",
2769
- "at_hash",
2770
- "c_hash",
2771
- "email",
2772
- ],
2773
- kerberos_endpoint: "https://login.chinacloudapi.cn/consumers/kerberos",
2774
- tenant_region_scope: null,
2775
- cloud_instance_name: "partner.microsoftonline.cn",
2776
- cloud_graph_host_name: "graph.chinacloudapi.cn",
2777
- msgraph_host: "microsoftgraph.chinacloudapi.cn",
2778
- rbac_url: "https://pas.chinacloudapi.cn",
2779
- },
2780
- "https://login.microsoftonline.us/consumers/": {
2781
- token_endpoint: "https://login.microsoftonline.us/consumers/oauth2/v2.0/token",
2782
- token_endpoint_auth_methods_supported: [
2783
- "client_secret_post",
2784
- "private_key_jwt",
2785
- "client_secret_basic",
2786
- ],
2787
- jwks_uri: "https://login.microsoftonline.us/consumers/discovery/v2.0/keys",
2788
- response_modes_supported: ["query", "fragment", "form_post"],
2789
- subject_types_supported: ["pairwise"],
2790
- id_token_signing_alg_values_supported: ["RS256"],
2791
- response_types_supported: [
2792
- "code",
2793
- "id_token",
2794
- "code id_token",
2795
- "id_token token",
2796
- ],
2797
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2798
- issuer: "https://login.microsoftonline.us/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",
2799
- request_uri_parameter_supported: false,
2800
- userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo",
2801
- authorization_endpoint: "https://login.microsoftonline.us/consumers/oauth2/v2.0/authorize",
2802
- device_authorization_endpoint: "https://login.microsoftonline.us/consumers/oauth2/v2.0/devicecode",
2803
- http_logout_supported: true,
2804
- frontchannel_logout_supported: true,
2805
- end_session_endpoint: "https://login.microsoftonline.us/consumers/oauth2/v2.0/logout",
2806
- claims_supported: [
2807
- "sub",
2808
- "iss",
2809
- "cloud_instance_name",
2810
- "cloud_instance_host_name",
2811
- "cloud_graph_host_name",
2812
- "msgraph_host",
2813
- "aud",
2814
- "exp",
2815
- "iat",
2816
- "auth_time",
2817
- "acr",
2818
- "nonce",
2819
- "preferred_username",
2820
- "name",
2821
- "tid",
2822
- "ver",
2823
- "at_hash",
2824
- "c_hash",
2825
- "email",
2826
- ],
2827
- kerberos_endpoint: "https://login.microsoftonline.us/consumers/kerberos",
2828
- tenant_region_scope: null,
2829
- cloud_instance_name: "microsoftonline.us",
2830
- cloud_graph_host_name: "graph.windows.net",
2831
- msgraph_host: "graph.microsoft.com",
2832
- rbac_url: "https://pasff.usgovcloudapi.net",
2833
- },
2834
- "https://login.microsoftonline.com/organizations/": {
2835
- token_endpoint: "https://login.microsoftonline.com/organizations/oauth2/v2.0/token",
2836
- token_endpoint_auth_methods_supported: [
2837
- "client_secret_post",
2838
- "private_key_jwt",
2839
- "client_secret_basic",
2840
- ],
2841
- jwks_uri: "https://login.microsoftonline.com/organizations/discovery/v2.0/keys",
2842
- response_modes_supported: ["query", "fragment", "form_post"],
2843
- subject_types_supported: ["pairwise"],
2844
- id_token_signing_alg_values_supported: ["RS256"],
2845
- response_types_supported: [
2846
- "code",
2847
- "id_token",
2848
- "code id_token",
2849
- "id_token token",
2850
- ],
2851
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2500
+ "login.microsoftonline.com": {
2501
+ token_endpoint: "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",
2502
+ jwks_uri: "https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",
2852
2503
  issuer: "https://login.microsoftonline.com/{tenantid}/v2.0",
2853
- request_uri_parameter_supported: false,
2854
- userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo",
2855
- authorization_endpoint: "https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize",
2856
- device_authorization_endpoint: "https://login.microsoftonline.com/organizations/oauth2/v2.0/devicecode",
2857
- http_logout_supported: true,
2858
- frontchannel_logout_supported: true,
2859
- end_session_endpoint: "https://login.microsoftonline.com/organizations/oauth2/v2.0/logout",
2860
- claims_supported: [
2861
- "sub",
2862
- "iss",
2863
- "cloud_instance_name",
2864
- "cloud_instance_host_name",
2865
- "cloud_graph_host_name",
2866
- "msgraph_host",
2867
- "aud",
2868
- "exp",
2869
- "iat",
2870
- "auth_time",
2871
- "acr",
2872
- "nonce",
2873
- "preferred_username",
2874
- "name",
2875
- "tid",
2876
- "ver",
2877
- "at_hash",
2878
- "c_hash",
2879
- "email",
2880
- ],
2881
- kerberos_endpoint: "https://login.microsoftonline.com/organizations/kerberos",
2882
- tenant_region_scope: null,
2883
- cloud_instance_name: "microsoftonline.com",
2884
- cloud_graph_host_name: "graph.windows.net",
2885
- msgraph_host: "graph.microsoft.com",
2886
- rbac_url: "https://pas.windows.net",
2504
+ authorization_endpoint: "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",
2505
+ end_session_endpoint: "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout",
2887
2506
  },
2888
- "https://login.chinacloudapi.cn/organizations/": {
2889
- token_endpoint: "https://login.chinacloudapi.cn/organizations/oauth2/v2.0/token",
2890
- token_endpoint_auth_methods_supported: [
2891
- "client_secret_post",
2892
- "private_key_jwt",
2893
- "client_secret_basic",
2894
- ],
2895
- jwks_uri: "https://login.chinacloudapi.cn/organizations/discovery/v2.0/keys",
2896
- response_modes_supported: ["query", "fragment", "form_post"],
2897
- subject_types_supported: ["pairwise"],
2898
- id_token_signing_alg_values_supported: ["RS256"],
2899
- response_types_supported: [
2900
- "code",
2901
- "id_token",
2902
- "code id_token",
2903
- "id_token token",
2904
- ],
2905
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2507
+ "login.chinacloudapi.cn": {
2508
+ token_endpoint: "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",
2509
+ jwks_uri: "https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",
2906
2510
  issuer: "https://login.partner.microsoftonline.cn/{tenantid}/v2.0",
2907
- request_uri_parameter_supported: false,
2908
- userinfo_endpoint: "https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",
2909
- authorization_endpoint: "https://login.chinacloudapi.cn/organizations/oauth2/v2.0/authorize",
2910
- device_authorization_endpoint: "https://login.chinacloudapi.cn/organizations/oauth2/v2.0/devicecode",
2911
- http_logout_supported: true,
2912
- frontchannel_logout_supported: true,
2913
- end_session_endpoint: "https://login.chinacloudapi.cn/organizations/oauth2/v2.0/logout",
2914
- claims_supported: [
2915
- "sub",
2916
- "iss",
2917
- "cloud_instance_name",
2918
- "cloud_instance_host_name",
2919
- "cloud_graph_host_name",
2920
- "msgraph_host",
2921
- "aud",
2922
- "exp",
2923
- "iat",
2924
- "auth_time",
2925
- "acr",
2926
- "nonce",
2927
- "preferred_username",
2928
- "name",
2929
- "tid",
2930
- "ver",
2931
- "at_hash",
2932
- "c_hash",
2933
- "email",
2934
- ],
2935
- kerberos_endpoint: "https://login.chinacloudapi.cn/organizations/kerberos",
2936
- tenant_region_scope: null,
2937
- cloud_instance_name: "partner.microsoftonline.cn",
2938
- cloud_graph_host_name: "graph.chinacloudapi.cn",
2939
- msgraph_host: "microsoftgraph.chinacloudapi.cn",
2940
- rbac_url: "https://pas.chinacloudapi.cn",
2511
+ authorization_endpoint: "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",
2512
+ end_session_endpoint: "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout",
2941
2513
  },
2942
- "https://login.microsoftonline.us/organizations/": {
2943
- token_endpoint: "https://login.microsoftonline.us/organizations/oauth2/v2.0/token",
2944
- token_endpoint_auth_methods_supported: [
2945
- "client_secret_post",
2946
- "private_key_jwt",
2947
- "client_secret_basic",
2948
- ],
2949
- jwks_uri: "https://login.microsoftonline.us/organizations/discovery/v2.0/keys",
2950
- response_modes_supported: ["query", "fragment", "form_post"],
2951
- subject_types_supported: ["pairwise"],
2952
- id_token_signing_alg_values_supported: ["RS256"],
2953
- response_types_supported: [
2954
- "code",
2955
- "id_token",
2956
- "code id_token",
2957
- "id_token token",
2958
- ],
2959
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2514
+ "login.microsoftonline.us": {
2515
+ token_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",
2516
+ jwks_uri: "https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",
2960
2517
  issuer: "https://login.microsoftonline.us/{tenantid}/v2.0",
2961
- request_uri_parameter_supported: false,
2962
- userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo",
2963
- authorization_endpoint: "https://login.microsoftonline.us/organizations/oauth2/v2.0/authorize",
2964
- device_authorization_endpoint: "https://login.microsoftonline.us/organizations/oauth2/v2.0/devicecode",
2965
- http_logout_supported: true,
2966
- frontchannel_logout_supported: true,
2967
- end_session_endpoint: "https://login.microsoftonline.us/organizations/oauth2/v2.0/logout",
2968
- claims_supported: [
2969
- "sub",
2970
- "iss",
2971
- "cloud_instance_name",
2972
- "cloud_instance_host_name",
2973
- "cloud_graph_host_name",
2974
- "msgraph_host",
2975
- "aud",
2976
- "exp",
2977
- "iat",
2978
- "auth_time",
2979
- "acr",
2980
- "nonce",
2981
- "preferred_username",
2982
- "name",
2983
- "tid",
2984
- "ver",
2985
- "at_hash",
2986
- "c_hash",
2987
- "email",
2988
- ],
2989
- kerberos_endpoint: "https://login.microsoftonline.us/organizations/kerberos",
2990
- tenant_region_scope: null,
2991
- cloud_instance_name: "microsoftonline.us",
2992
- cloud_graph_host_name: "graph.windows.net",
2993
- msgraph_host: "graph.microsoft.com",
2994
- rbac_url: "https://pasff.usgovcloudapi.net",
2518
+ authorization_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",
2519
+ end_session_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout",
2995
2520
  },
2996
2521
  },
2997
2522
  instanceDiscoveryMetadata: {
2998
2523
  tenant_discovery_endpoint: "https://{canonicalAuthority}/v2.0/.well-known/openid-configuration",
2999
- "api-version": "1.1",
3000
2524
  metadata: [
3001
2525
  {
3002
2526
  preferred_network: "login.microsoftonline.com",
@@ -3105,7 +2629,7 @@
3105
2629
  return null;
3106
2630
  }
3107
2631
 
3108
- /*! @azure/msal-common v14.6.0 2024-01-09 */
2632
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
3109
2633
 
3110
2634
  /*
3111
2635
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4345,7 +3869,7 @@
4345
3869
  }
4346
3870
  }
4347
3871
 
4348
- /*! @azure/msal-common v14.6.0 2024-01-09 */
3872
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
4349
3873
 
4350
3874
  /*
4351
3875
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4445,7 +3969,7 @@
4445
3969
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
4446
3970
  }
4447
3971
 
4448
- /*! @azure/msal-common v14.6.0 2024-01-09 */
3972
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
4449
3973
 
4450
3974
  /*
4451
3975
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4462,7 +3986,7 @@
4462
3986
  }
4463
3987
  }
4464
3988
 
4465
- /*! @azure/msal-common v14.6.0 2024-01-09 */
3989
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
4466
3990
 
4467
3991
  /*
4468
3992
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4560,7 +4084,7 @@
4560
4084
  }
4561
4085
  }
4562
4086
 
4563
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4087
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
4564
4088
 
4565
4089
  /*
4566
4090
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4597,7 +4121,7 @@
4597
4121
  }
4598
4122
  }
4599
4123
 
4600
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4124
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
4601
4125
  /*
4602
4126
  * Copyright (c) Microsoft Corporation. All rights reserved.
4603
4127
  * Licensed under the MIT License.
@@ -4607,7 +4131,7 @@
4607
4131
  UPN: "UPN",
4608
4132
  };
4609
4133
 
4610
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4134
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
4611
4135
  /*
4612
4136
  * Copyright (c) Microsoft Corporation. All rights reserved.
4613
4137
  * Licensed under the MIT License.
@@ -4654,7 +4178,7 @@
4654
4178
  const LOGIN_HINT = "login_hint";
4655
4179
  const DOMAIN_HINT = "domain_hint";
4656
4180
 
4657
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4181
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
4658
4182
 
4659
4183
  /*
4660
4184
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4738,7 +4262,7 @@
4738
4262
  }
4739
4263
  }
4740
4264
 
4741
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4265
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
4742
4266
 
4743
4267
  /*
4744
4268
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5122,7 +4646,7 @@
5122
4646
  }
5123
4647
  }
5124
4648
 
5125
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4649
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
5126
4650
  /*
5127
4651
  * Copyright (c) Microsoft Corporation. All rights reserved.
5128
4652
  * Licensed under the MIT License.
@@ -5134,7 +4658,7 @@
5134
4658
  response.hasOwnProperty("jwks_uri"));
5135
4659
  }
5136
4660
 
5137
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4661
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
5138
4662
  /*
5139
4663
  * Copyright (c) Microsoft Corporation. All rights reserved.
5140
4664
  * Licensed under the MIT License.
@@ -5144,7 +4668,7 @@
5144
4668
  response.hasOwnProperty("metadata"));
5145
4669
  }
5146
4670
 
5147
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4671
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
5148
4672
  /*
5149
4673
  * Copyright (c) Microsoft Corporation. All rights reserved.
5150
4674
  * Licensed under the MIT License.
@@ -5154,7 +4678,7 @@
5154
4678
  response.hasOwnProperty("error_description"));
5155
4679
  }
5156
4680
 
5157
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4681
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
5158
4682
  /*
5159
4683
  * Copyright (c) Microsoft Corporation. All rights reserved.
5160
4684
  * Licensed under the MIT License.
@@ -5409,7 +4933,7 @@
5409
4933
  "multiMatchedRT",
5410
4934
  ]);
5411
4935
 
5412
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4936
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
5413
4937
  /*
5414
4938
  * Copyright (c) Microsoft Corporation. All rights reserved.
5415
4939
  * Licensed under the MIT License.
@@ -5430,6 +4954,11 @@
5430
4954
  return (...args) => {
5431
4955
  logger.trace(`Executing function ${eventName}`);
5432
4956
  const inProgressEvent = telemetryClient?.startMeasurement(eventName, correlationId);
4957
+ if (correlationId) {
4958
+ // Track number of times this API is called in a single request
4959
+ const eventCount = eventName + "CallCount";
4960
+ telemetryClient?.incrementFields({ [eventCount]: 1 }, correlationId);
4961
+ }
5433
4962
  try {
5434
4963
  const result = callback(...args);
5435
4964
  inProgressEvent?.end({
@@ -5470,6 +4999,11 @@
5470
4999
  return (...args) => {
5471
5000
  logger.trace(`Executing function ${eventName}`);
5472
5001
  const inProgressEvent = telemetryClient?.startMeasurement(eventName, correlationId);
5002
+ if (correlationId) {
5003
+ // Track number of times this API is called in a single request
5004
+ const eventCount = eventName + "CallCount";
5005
+ telemetryClient?.incrementFields({ [eventCount]: 1 }, correlationId);
5006
+ }
5473
5007
  telemetryClient?.setPreQueueTime(eventName, correlationId);
5474
5008
  return callback(...args)
5475
5009
  .then((response) => {
@@ -5495,7 +5029,7 @@
5495
5029
  };
5496
5030
  };
5497
5031
 
5498
- /*! @azure/msal-common v14.6.0 2024-01-09 */
5032
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
5499
5033
 
5500
5034
  /*
5501
5035
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5604,7 +5138,7 @@
5604
5138
  },
5605
5139
  };
5606
5140
 
5607
- /*! @azure/msal-common v14.6.0 2024-01-09 */
5141
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
5608
5142
 
5609
5143
  /*
5610
5144
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5616,7 +5150,7 @@
5616
5150
  * @internal
5617
5151
  */
5618
5152
  class Authority {
5619
- constructor(authority, networkInterface, cacheManager, authorityOptions, logger, performanceClient, correlationId) {
5153
+ constructor(authority, networkInterface, cacheManager, authorityOptions, logger, correlationId, performanceClient) {
5620
5154
  this.canonicalAuthority = authority;
5621
5155
  this._canonicalAuthority.validateAsUri();
5622
5156
  this.networkInterface = networkInterface;
@@ -5853,6 +5387,10 @@
5853
5387
  this.updateCachedMetadata(metadataEntity, cloudDiscoverySource, {
5854
5388
  source: endpointSource,
5855
5389
  });
5390
+ this.performanceClient?.addFields({
5391
+ cloudDiscoverySource: cloudDiscoverySource,
5392
+ authorityEndpointSource: endpointSource,
5393
+ }, this.correlationId);
5856
5394
  }
5857
5395
  /**
5858
5396
  * Returns metadata entity from cache if it exists, otherwiser returns a new metadata entity built
@@ -6044,8 +5582,8 @@
6044
5582
  * Get OAuth endpoints for common authorities.
6045
5583
  */
6046
5584
  getEndpointMetadataFromHardcodedValues() {
6047
- if (this.canonicalAuthority in EndpointMetadata) {
6048
- return EndpointMetadata[this.canonicalAuthority];
5585
+ if (this.hostnameAndPort in EndpointMetadata) {
5586
+ return EndpointMetadata[this.hostnameAndPort];
6049
5587
  }
6050
5588
  return null;
6051
5589
  }
@@ -6433,57 +5971,38 @@
6433
5971
  };
6434
5972
  }
6435
5973
 
6436
- /*! @azure/msal-common v14.6.0 2024-01-09 */
5974
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
6437
5975
 
6438
5976
  /*
6439
5977
  * Copyright (c) Microsoft Corporation. All rights reserved.
6440
5978
  * Licensed under the MIT License.
6441
5979
  */
6442
- /** @internal */
6443
- class AuthorityFactory {
6444
- /**
6445
- * Create an authority object of the correct type based on the url
6446
- * Performs basic authority validation - checks to see if the authority is of a valid type (i.e. aad, b2c, adfs)
6447
- *
6448
- * Also performs endpoint discovery.
6449
- *
6450
- * @param authorityUri
6451
- * @param networkClient
6452
- * @param protocolMode
6453
- */
6454
- static async createDiscoveredInstance(authorityUri, networkClient, cacheManager, authorityOptions, logger, performanceClient, correlationId) {
6455
- performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance, correlationId);
6456
- const authorityUriFinal = Authority.transformCIAMAuthority(formatAuthorityUri(authorityUri));
6457
- // Initialize authority and perform discovery endpoint check.
6458
- const acquireTokenAuthority = AuthorityFactory.createInstance(authorityUriFinal, networkClient, cacheManager, authorityOptions, logger, performanceClient, correlationId);
6459
- try {
6460
- await invokeAsync(acquireTokenAuthority.resolveEndpointsAsync.bind(acquireTokenAuthority), PerformanceEvents.AuthorityResolveEndpointsAsync, logger, performanceClient, correlationId)();
6461
- return acquireTokenAuthority;
6462
- }
6463
- catch (e) {
6464
- throw createClientAuthError(endpointResolutionError);
6465
- }
5980
+ /**
5981
+ * Create an authority object of the correct type based on the url
5982
+ * Performs basic authority validation - checks to see if the authority is of a valid type (i.e. aad, b2c, adfs)
5983
+ *
5984
+ * Also performs endpoint discovery.
5985
+ *
5986
+ * @param authorityUri
5987
+ * @param networkClient
5988
+ * @param protocolMode
5989
+ * @internal
5990
+ */
5991
+ async function createDiscoveredInstance(authorityUri, networkClient, cacheManager, authorityOptions, logger, correlationId, performanceClient) {
5992
+ performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance, correlationId);
5993
+ const authorityUriFinal = Authority.transformCIAMAuthority(formatAuthorityUri(authorityUri));
5994
+ // Initialize authority and perform discovery endpoint check.
5995
+ const acquireTokenAuthority = new Authority(authorityUriFinal, networkClient, cacheManager, authorityOptions, logger, correlationId, performanceClient);
5996
+ try {
5997
+ await invokeAsync(acquireTokenAuthority.resolveEndpointsAsync.bind(acquireTokenAuthority), PerformanceEvents.AuthorityResolveEndpointsAsync, logger, performanceClient, correlationId)();
5998
+ return acquireTokenAuthority;
6466
5999
  }
6467
- /**
6468
- * Create an authority object of the correct type based on the url
6469
- * Performs basic authority validation - checks to see if the authority is of a valid type (i.e. aad, b2c, adfs)
6470
- *
6471
- * Does not perform endpoint discovery.
6472
- *
6473
- * @param authorityUrl
6474
- * @param networkInterface
6475
- * @param protocolMode
6476
- */
6477
- static createInstance(authorityUrl, networkInterface, cacheManager, authorityOptions, logger, performanceClient, correlationId) {
6478
- // Throw error if authority url is empty
6479
- if (!authorityUrl) {
6480
- throw createClientConfigurationError(urlEmptyError);
6481
- }
6482
- return new Authority(authorityUrl, networkInterface, cacheManager, authorityOptions, logger, performanceClient, correlationId);
6000
+ catch (e) {
6001
+ throw createClientAuthError(endpointResolutionError);
6483
6002
  }
6484
6003
  }
6485
6004
 
6486
- /*! @azure/msal-common v14.6.0 2024-01-09 */
6005
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
6487
6006
 
6488
6007
  /*
6489
6008
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6570,7 +6089,7 @@
6570
6089
  async updateAuthority(cloudInstanceHostname, correlationId) {
6571
6090
  this.performanceClient?.addQueueMeasurement(PerformanceEvents.UpdateTokenEndpointAuthority, correlationId);
6572
6091
  const cloudInstanceAuthorityUri = `https://${cloudInstanceHostname}/${this.authority.tenant}/`;
6573
- const cloudInstanceAuthority = await AuthorityFactory.createDiscoveredInstance(cloudInstanceAuthorityUri, this.networkClient, this.cacheManager, this.authority.options, this.logger, this.performanceClient, correlationId);
6092
+ const cloudInstanceAuthority = await createDiscoveredInstance(cloudInstanceAuthorityUri, this.networkClient, this.cacheManager, this.authority.options, this.logger, correlationId, this.performanceClient);
6574
6093
  this.authority = cloudInstanceAuthority;
6575
6094
  }
6576
6095
  /**
@@ -6586,7 +6105,7 @@
6586
6105
  }
6587
6106
  }
6588
6107
 
6589
- /*! @azure/msal-common v14.6.0 2024-01-09 */
6108
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
6590
6109
  /*
6591
6110
  * Copyright (c) Microsoft Corporation. All rights reserved.
6592
6111
  * Licensed under the MIT License.
@@ -6612,7 +6131,7 @@
6612
6131
  refreshTokenExpired: refreshTokenExpired
6613
6132
  });
6614
6133
 
6615
- /*! @azure/msal-common v14.6.0 2024-01-09 */
6134
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
6616
6135
 
6617
6136
  /*
6618
6137
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6699,7 +6218,7 @@
6699
6218
  return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
6700
6219
  }
6701
6220
 
6702
- /*! @azure/msal-common v14.6.0 2024-01-09 */
6221
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
6703
6222
  /*
6704
6223
  * Copyright (c) Microsoft Corporation. All rights reserved.
6705
6224
  * Licensed under the MIT License.
@@ -6715,7 +6234,7 @@
6715
6234
  }
6716
6235
  }
6717
6236
 
6718
- /*! @azure/msal-common v14.6.0 2024-01-09 */
6237
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
6719
6238
 
6720
6239
  /*
6721
6240
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6787,7 +6306,7 @@
6787
6306
  }
6788
6307
  }
6789
6308
 
6790
- /*! @azure/msal-common v14.6.0 2024-01-09 */
6309
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
6791
6310
 
6792
6311
  /*
6793
6312
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6858,7 +6377,7 @@
6858
6377
  const resourceUrlComponents = resourceUrlString?.getUrlComponents();
6859
6378
  return this.cryptoUtils.signJwt({
6860
6379
  at: payload,
6861
- ts: TimeUtils.nowSeconds(),
6380
+ ts: nowSeconds(),
6862
6381
  m: resourceRequestMethod?.toUpperCase(),
6863
6382
  u: resourceUrlComponents?.HostNameAndPort,
6864
6383
  nonce: shrNonce || this.cryptoUtils.createNewGuid(),
@@ -6872,7 +6391,7 @@
6872
6391
  }
6873
6392
  }
6874
6393
 
6875
- /*! @azure/msal-common v14.6.0 2024-01-09 */
6394
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
6876
6395
  /*
6877
6396
  * Copyright (c) Microsoft Corporation. All rights reserved.
6878
6397
  * Licensed under the MIT License.
@@ -6899,7 +6418,7 @@
6899
6418
  }
6900
6419
  }
6901
6420
 
6902
- /*! @azure/msal-common v14.6.0 2024-01-09 */
6421
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
6903
6422
 
6904
6423
  /*
6905
6424
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7112,7 +6631,7 @@
7112
6631
  ? reqTimestamp + refreshIn
7113
6632
  : undefined;
7114
6633
  // non AAD scenarios can have empty realm
7115
- cachedAccessToken = createAccessTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.access_token, this.clientId, claimsTenantId || authority.tenant, responseScopes.printScopes(), tokenExpirationSeconds, extendedTokenExpirationSeconds, this.cryptoObj.base64Decode, refreshOnSeconds, serverTokenResponse.token_type, userAssertionHash, serverTokenResponse.key_id, request.claims, request.requestedClaimsHash);
6634
+ cachedAccessToken = createAccessTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.access_token, this.clientId, claimsTenantId || authority.tenant || "", responseScopes.printScopes(), tokenExpirationSeconds, extendedTokenExpirationSeconds, this.cryptoObj.base64Decode, refreshOnSeconds, serverTokenResponse.token_type, userAssertionHash, serverTokenResponse.key_id, request.claims, request.requestedClaimsHash);
7116
6635
  }
7117
6636
  // refreshToken
7118
6637
  let cachedRefreshToken = null;
@@ -7252,7 +6771,7 @@
7252
6771
  return baseAccount;
7253
6772
  }
7254
6773
 
7255
- /*! @azure/msal-common v14.6.0 2024-01-09 */
6774
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
7256
6775
 
7257
6776
  /*
7258
6777
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7295,7 +6814,7 @@
7295
6814
  if (!request.code) {
7296
6815
  throw createClientAuthError(requestCannotBeMade);
7297
6816
  }
7298
- const reqTimestamp = TimeUtils.nowSeconds();
6817
+ const reqTimestamp = nowSeconds();
7299
6818
  const response = await invokeAsync(this.executeTokenRequest.bind(this), PerformanceEvents.AuthClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(this.authority, request);
7300
6819
  // Retrieve requestId from response headers
7301
6820
  const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
@@ -7657,7 +7176,7 @@
7657
7176
  }
7658
7177
  }
7659
7178
 
7660
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7179
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
7661
7180
 
7662
7181
  /*
7663
7182
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7674,7 +7193,7 @@
7674
7193
  }
7675
7194
  async acquireToken(request) {
7676
7195
  this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId);
7677
- const reqTimestamp = TimeUtils.nowSeconds();
7196
+ const reqTimestamp = nowSeconds();
7678
7197
  const response = await invokeAsync(this.executeTokenRequest.bind(this), PerformanceEvents.RefreshTokenClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(request, this.authority);
7679
7198
  // Retrieve requestId from response headers
7680
7199
  const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
@@ -7735,7 +7254,7 @@
7735
7254
  throw createInteractionRequiredAuthError(noTokensFound);
7736
7255
  }
7737
7256
  if (refreshToken.expiresOn &&
7738
- TimeUtils.isTokenExpired(refreshToken.expiresOn, request.refreshTokenExpirationOffsetSeconds ||
7257
+ isTokenExpired(refreshToken.expiresOn, request.refreshTokenExpirationOffsetSeconds ||
7739
7258
  DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS)) {
7740
7259
  throw createInteractionRequiredAuthError(refreshTokenExpired);
7741
7260
  }
@@ -7864,7 +7383,7 @@
7864
7383
  }
7865
7384
  }
7866
7385
 
7867
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7386
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
7868
7387
 
7869
7388
  /*
7870
7389
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7935,14 +7454,14 @@
7935
7454
  this.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN, request.correlationId);
7936
7455
  throw createClientAuthError(tokenRefreshRequired);
7937
7456
  }
7938
- else if (TimeUtils.wasClockTurnedBack(cachedAccessToken.cachedAt) ||
7939
- TimeUtils.isTokenExpired(cachedAccessToken.expiresOn, this.config.systemOptions.tokenRenewalOffsetSeconds)) {
7457
+ else if (wasClockTurnedBack(cachedAccessToken.cachedAt) ||
7458
+ isTokenExpired(cachedAccessToken.expiresOn, this.config.systemOptions.tokenRenewalOffsetSeconds)) {
7940
7459
  // must refresh due to the expires_in value
7941
7460
  this.setCacheOutcome(CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED, request.correlationId);
7942
7461
  throw createClientAuthError(tokenRefreshRequired);
7943
7462
  }
7944
7463
  else if (cachedAccessToken.refreshOn &&
7945
- TimeUtils.isTokenExpired(cachedAccessToken.refreshOn, 0)) {
7464
+ isTokenExpired(cachedAccessToken.refreshOn, 0)) {
7946
7465
  // must refresh (in the background) due to the refresh_in value
7947
7466
  lastCacheOutcome = CacheOutcome.PROACTIVELY_REFRESHED;
7948
7467
  // don't throw ClientAuthError.createRefreshRequiredError(), return cached token instead
@@ -7995,7 +7514,7 @@
7995
7514
  }
7996
7515
  }
7997
7516
 
7998
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7517
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
7999
7518
 
8000
7519
  /*
8001
7520
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8010,7 +7529,7 @@
8010
7529
  },
8011
7530
  };
8012
7531
 
8013
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7532
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
8014
7533
  /*
8015
7534
  * Copyright (c) Microsoft Corporation. All rights reserved.
8016
7535
  * Licensed under the MIT License.
@@ -8018,7 +7537,7 @@
8018
7537
  const missingKidError = "missing_kid_error";
8019
7538
  const missingAlgError = "missing_alg_error";
8020
7539
 
8021
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7540
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
8022
7541
 
8023
7542
  /*
8024
7543
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8043,7 +7562,7 @@
8043
7562
  return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
8044
7563
  }
8045
7564
 
8046
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7565
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
8047
7566
 
8048
7567
  /*
8049
7568
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8083,7 +7602,7 @@
8083
7602
  }
8084
7603
  }
8085
7604
 
8086
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7605
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
8087
7606
 
8088
7607
  /*
8089
7608
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8141,7 +7660,7 @@
8141
7660
  }
8142
7661
  }
8143
7662
 
8144
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7663
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
8145
7664
 
8146
7665
  /*
8147
7666
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8345,7 +7864,7 @@
8345
7864
  }
8346
7865
  }
8347
7866
 
8348
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7867
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
8349
7868
 
8350
7869
  /*
8351
7870
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8424,7 +7943,7 @@
8424
7943
  }
8425
7944
  }
8426
7945
 
8427
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7946
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
8428
7947
 
8429
7948
  /*
8430
7949
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -9824,7 +9343,7 @@
9824
9343
 
9825
9344
  /* eslint-disable header/header */
9826
9345
  const name = "@azure/msal-browser";
9827
- const version = "3.7.0";
9346
+ const version = "3.7.2-alpha.0";
9828
9347
 
9829
9348
  /*
9830
9349
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -10350,6 +9869,10 @@
10350
9869
  const MODULUS_LENGTH = 2048;
10351
9870
  // Public Exponent
10352
9871
  const PUBLIC_EXPONENT = new Uint8Array([0x01, 0x00, 0x01]);
9872
+ // UUID hex digits
9873
+ const UUID_CHARS = "0123456789abcdef";
9874
+ // Array to store UINT32 random value
9875
+ const UINT32_ARR = new Uint32Array(1);
10353
9876
  const keygenAlgorithmOptions = {
10354
9877
  name: PKCS1_V15_KEYGEN_ALG,
10355
9878
  hash: S256_HASH_ALG,
@@ -10370,7 +9893,9 @@
10370
9893
  }
10371
9894
  /**
10372
9895
  * Returns a sha-256 hash of the given dataString as an ArrayBuffer.
10373
- * @param dataString
9896
+ * @param dataString {string} data string
9897
+ * @param performanceClient {?IPerformanceClient}
9898
+ * @param correlationId {?string} correlation id
10374
9899
  */
10375
9900
  async function sha256Digest(dataString, performanceClient, correlationId) {
10376
9901
  performanceClient?.addQueueMeasurement(PerformanceEvents.Sha256Digest, correlationId);
@@ -10386,11 +9911,54 @@
10386
9911
  return window.crypto.getRandomValues(dataBuffer);
10387
9912
  }
10388
9913
  /**
10389
- * Creates a new random GUID
10390
- * @returns
9914
+ * Returns random Uint32 value.
9915
+ * @returns {number}
9916
+ */
9917
+ function getRandomUint32() {
9918
+ window.crypto.getRandomValues(UINT32_ARR);
9919
+ return UINT32_ARR[0];
9920
+ }
9921
+ /**
9922
+ * Creates a UUID v7 from the current timestamp.
9923
+ * Implementation relies on the system clock to guarantee increasing order of generated identifiers.
9924
+ * @returns {number}
10391
9925
  */
10392
9926
  function createNewGuid() {
10393
- return window.crypto.randomUUID();
9927
+ const currentTimestamp = Date.now();
9928
+ const baseRand = getRandomUint32() * 0x400 + (getRandomUint32() & 0x3ff);
9929
+ // Result byte array
9930
+ const bytes = new Uint8Array(16);
9931
+ // A 12-bit `rand_a` field value
9932
+ const randA = Math.trunc(baseRand / 2 ** 30);
9933
+ // The higher 30 bits of 62-bit `rand_b` field value
9934
+ const randBHi = baseRand & (2 ** 30 - 1);
9935
+ // The lower 32 bits of 62-bit `rand_b` field value
9936
+ const randBLo = getRandomUint32();
9937
+ bytes[0] = currentTimestamp / 2 ** 40;
9938
+ bytes[1] = currentTimestamp / 2 ** 32;
9939
+ bytes[2] = currentTimestamp / 2 ** 24;
9940
+ bytes[3] = currentTimestamp / 2 ** 16;
9941
+ bytes[4] = currentTimestamp / 2 ** 8;
9942
+ bytes[5] = currentTimestamp;
9943
+ bytes[6] = 0x70 | (randA >>> 8);
9944
+ bytes[7] = randA;
9945
+ bytes[8] = 0x80 | (randBHi >>> 24);
9946
+ bytes[9] = randBHi >>> 16;
9947
+ bytes[10] = randBHi >>> 8;
9948
+ bytes[11] = randBHi;
9949
+ bytes[12] = randBLo >>> 24;
9950
+ bytes[13] = randBLo >>> 16;
9951
+ bytes[14] = randBLo >>> 8;
9952
+ bytes[15] = randBLo;
9953
+ let text = "";
9954
+ for (let i = 0; i < bytes.length; i++) {
9955
+ text += UUID_CHARS.charAt(bytes[i] >>> 4);
9956
+ text += UUID_CHARS.charAt(bytes[i] & 0xf);
9957
+ if (i === 3 || i === 5 || i === 7 || i === 9) {
9958
+ text += "-";
9959
+ }
9960
+ }
9961
+ return text;
10394
9962
  }
10395
9963
  /**
10396
9964
  * Generates a keypair based on current keygen algorithm config.
@@ -12564,12 +12132,9 @@
12564
12132
  * Initializer function for all request APIs
12565
12133
  * @param request
12566
12134
  */
12567
- async initializeBaseRequest(request, account) {
12135
+ async initializeBaseRequest(request) {
12568
12136
  this.performanceClient.addQueueMeasurement(PerformanceEvents.InitializeBaseRequest, this.correlationId);
12569
12137
  const authority = request.authority || this.config.auth.authority;
12570
- if (account) {
12571
- await this.validateRequestAuthority(authority, account);
12572
- }
12573
12138
  const scopes = [...((request && request.scopes) || [])];
12574
12139
  const validatedRequest = {
12575
12140
  ...request,
@@ -12618,16 +12183,6 @@
12618
12183
  getCurrentUri();
12619
12184
  return UrlString.getAbsoluteUrl(redirectUri, getCurrentUri());
12620
12185
  }
12621
- /*
12622
- * If authority provided in the request does not match environment/authority specified
12623
- * in the account or MSAL config, we throw an error.
12624
- */
12625
- async validateRequestAuthority(authority, account) {
12626
- const discoveredAuthority = await this.getDiscoveredAuthority(authority);
12627
- if (!discoveredAuthority.isAlias(account.environment)) {
12628
- throw createClientConfigurationError(authorityMismatch);
12629
- }
12630
- }
12631
12186
  /**
12632
12187
  *
12633
12188
  * @param apiId
@@ -12649,22 +12204,30 @@
12649
12204
  /**
12650
12205
  * Used to get a discovered version of the default authority.
12651
12206
  * @param requestAuthority
12207
+ * @param requestAzureCloudOptions
12208
+ * @param account
12652
12209
  */
12653
- async getDiscoveredAuthority(requestAuthority) {
12654
- this.logger.verbose("getDiscoveredAuthority called");
12210
+ async getDiscoveredAuthority(requestAuthority, requestAzureCloudOptions, account) {
12211
+ this.performanceClient.addQueueMeasurement(PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.correlationId);
12655
12212
  const authorityOptions = {
12656
12213
  protocolMode: this.config.auth.protocolMode,
12657
12214
  OIDCOptions: this.config.auth.OIDCOptions,
12658
12215
  knownAuthorities: this.config.auth.knownAuthorities,
12659
12216
  cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,
12660
12217
  authorityMetadata: this.config.auth.authorityMetadata,
12218
+ skipAuthorityMetadataCache: this.config.auth.skipAuthorityMetadataCache,
12661
12219
  };
12662
- if (requestAuthority) {
12663
- this.logger.verbose("Creating discovered authority with request authority");
12664
- return AuthorityFactory.createDiscoveredInstance(requestAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions, this.logger);
12220
+ // build authority string based on auth params, precedence - azureCloudInstance + tenant >> authority
12221
+ const userAuthority = requestAuthority
12222
+ ? requestAuthority
12223
+ : this.config.auth.authority;
12224
+ // fall back to the authority from config
12225
+ const builtAuthority = Authority.generateAuthority(userAuthority, requestAzureCloudOptions || this.config.auth.azureCloudOptions);
12226
+ const discoveredAuthority = await invokeAsync(createDiscoveredInstance, PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance, this.logger, this.performanceClient, this.correlationId)(builtAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions, this.logger, this.correlationId, this.performanceClient);
12227
+ if (account && !discoveredAuthority.isAlias(account.environment)) {
12228
+ throw createClientConfigurationError(authorityMismatch);
12665
12229
  }
12666
- this.logger.verbose("Creating discovered authority with configured authority");
12667
- return AuthorityFactory.createDiscoveredInstance(this.config.auth.authority, this.config.system.networkClient, this.browserStorage, authorityOptions, this.logger);
12230
+ return discoveredAuthority;
12668
12231
  }
12669
12232
  }
12670
12233
 
@@ -12837,10 +12400,10 @@
12837
12400
  * @param serverTelemetryManager
12838
12401
  * @param authorityUrl
12839
12402
  */
12840
- async createAuthCodeClient(serverTelemetryManager, authorityUrl, requestAzureCloudOptions) {
12403
+ async createAuthCodeClient(serverTelemetryManager, authorityUrl, requestAzureCloudOptions, account) {
12841
12404
  this.performanceClient.addQueueMeasurement(PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.correlationId);
12842
12405
  // Create auth module.
12843
- const clientConfig = await invokeAsync(this.getClientConfiguration.bind(this), PerformanceEvents.StandardInteractionClientGetClientConfiguration, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, authorityUrl, requestAzureCloudOptions);
12406
+ const clientConfig = await invokeAsync(this.getClientConfiguration.bind(this), PerformanceEvents.StandardInteractionClientGetClientConfiguration, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, authorityUrl, requestAzureCloudOptions, account);
12844
12407
  return new AuthorizationCodeClient(clientConfig, this.performanceClient);
12845
12408
  }
12846
12409
  /**
@@ -12849,9 +12412,9 @@
12849
12412
  * @param requestAuthority
12850
12413
  * @param requestCorrelationId
12851
12414
  */
12852
- async getClientConfiguration(serverTelemetryManager, requestAuthority, requestAzureCloudOptions) {
12415
+ async getClientConfiguration(serverTelemetryManager, requestAuthority, requestAzureCloudOptions, account) {
12853
12416
  this.performanceClient.addQueueMeasurement(PerformanceEvents.StandardInteractionClientGetClientConfiguration, this.correlationId);
12854
- const discoveredAuthority = await invokeAsync(this.getDiscoveredAuthority.bind(this), PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, this.correlationId)(requestAuthority, requestAzureCloudOptions);
12417
+ const discoveredAuthority = await invokeAsync(this.getDiscoveredAuthority.bind(this), PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, this.correlationId)(requestAuthority, requestAzureCloudOptions, account);
12855
12418
  const logger = this.config.system.loggerOptions;
12856
12419
  return {
12857
12420
  authOptions: {
@@ -12885,29 +12448,6 @@
12885
12448
  telemetry: this.config.telemetry,
12886
12449
  };
12887
12450
  }
12888
- /**
12889
- * Used to get a discovered version of the default authority.
12890
- * @param requestAuthority
12891
- * @param requestCorrelationId
12892
- */
12893
- async getDiscoveredAuthority(requestAuthority, requestAzureCloudOptions) {
12894
- this.performanceClient.addQueueMeasurement(PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.correlationId);
12895
- const authorityOptions = {
12896
- protocolMode: this.config.auth.protocolMode,
12897
- OIDCOptions: this.config.auth.OIDCOptions,
12898
- knownAuthorities: this.config.auth.knownAuthorities,
12899
- cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,
12900
- authorityMetadata: this.config.auth.authorityMetadata,
12901
- skipAuthorityMetadataCache: this.config.auth.skipAuthorityMetadataCache,
12902
- };
12903
- // build authority string based on auth params, precedence - azureCloudInstance + tenant >> authority
12904
- const userAuthority = requestAuthority
12905
- ? requestAuthority
12906
- : this.config.auth.authority;
12907
- // fall back to the authority from config
12908
- const builtAuthority = Authority.generateAuthority(userAuthority, requestAzureCloudOptions || this.config.auth.azureCloudOptions);
12909
- return invokeAsync(AuthorityFactory.createDiscoveredInstance.bind(AuthorityFactory), PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance, this.logger, this.performanceClient, this.correlationId)(builtAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions, this.logger, this.performanceClient, this.correlationId);
12910
- }
12911
12451
  /**
12912
12452
  * Helper to initialize required request parameters for interactive APIs and ssoSilent()
12913
12453
  * @param request
@@ -13039,7 +12579,7 @@
13039
12579
  this.performanceClient.addQueueMeasurement(PerformanceEvents.SilentCacheClientAcquireToken, silentRequest.correlationId);
13040
12580
  // Telemetry manager only used to increment cacheHits here
13041
12581
  const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenSilent_silentFlow);
13042
- const silentAuthClient = await this.createSilentFlowClient(serverTelemetryManager, silentRequest.authority, silentRequest.azureCloudOptions);
12582
+ const silentAuthClient = await this.createSilentFlowClient(serverTelemetryManager, silentRequest.authority, silentRequest.azureCloudOptions, silentRequest.account);
13043
12583
  this.logger.verbose("Silent auth client created");
13044
12584
  try {
13045
12585
  const response = await invokeAsync(silentAuthClient.acquireCachedToken.bind(silentAuthClient), PerformanceEvents.SilentFlowClientAcquireCachedToken, this.logger, this.performanceClient, silentRequest.correlationId)(silentRequest);
@@ -13071,14 +12611,14 @@
13071
12611
  * @param serverTelemetryManager
13072
12612
  * @param authorityUrl
13073
12613
  */
13074
- async createSilentFlowClient(serverTelemetryManager, authorityUrl, azureCloudOptions) {
12614
+ async createSilentFlowClient(serverTelemetryManager, authorityUrl, azureCloudOptions, account) {
13075
12615
  // Create auth module.
13076
- const clientConfig = await invokeAsync(this.getClientConfiguration.bind(this), PerformanceEvents.StandardInteractionClientGetClientConfiguration, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, authorityUrl, azureCloudOptions);
12616
+ const clientConfig = await invokeAsync(this.getClientConfiguration.bind(this), PerformanceEvents.StandardInteractionClientGetClientConfiguration, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, authorityUrl, azureCloudOptions, account);
13077
12617
  return new SilentFlowClient(clientConfig, this.performanceClient);
13078
12618
  }
13079
12619
  async initializeSilentRequest(request, account) {
13080
12620
  this.performanceClient.addQueueMeasurement(PerformanceEvents.InitializeSilentRequest, this.correlationId);
13081
- const baseRequest = await invokeAsync(this.initializeBaseRequest.bind(this), PerformanceEvents.InitializeBaseRequest, this.logger, this.performanceClient, this.correlationId)(request, account);
12621
+ const baseRequest = await invokeAsync(this.initializeBaseRequest.bind(this), PerformanceEvents.InitializeBaseRequest, this.logger, this.performanceClient, this.correlationId)(request);
13082
12622
  return {
13083
12623
  ...request,
13084
12624
  ...baseRequest,
@@ -13114,7 +12654,7 @@
13114
12654
  this.logger.trace("NativeInteractionClient - acquireToken called.");
13115
12655
  // start the perf measurement
13116
12656
  const nativeATMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.NativeInteractionClientAcquireToken, request.correlationId);
13117
- const reqTimestamp = TimeUtils.nowSeconds();
12657
+ const reqTimestamp = nowSeconds();
13118
12658
  // initialize native request
13119
12659
  const nativeRequest = await this.initializeNativeRequest(request);
13120
12660
  // check if the tokens can be retrieved from internal cache
@@ -13263,7 +12803,7 @@
13263
12803
  method: NativeExtensionMethod.GetToken,
13264
12804
  request: request,
13265
12805
  };
13266
- const reqTimestamp = TimeUtils.nowSeconds();
12806
+ const reqTimestamp = nowSeconds();
13267
12807
  try {
13268
12808
  this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");
13269
12809
  const response = await this.nativeMessageHandler.sendMessage(messageBody);
@@ -13534,7 +13074,8 @@
13534
13074
  this.logger.trace("NativeInteractionClient - initializeNativeRequest called");
13535
13075
  const authority = request.authority || this.config.auth.authority;
13536
13076
  if (request.account) {
13537
- await this.validateRequestAuthority(authority, request.account);
13077
+ // validate authority
13078
+ await this.getDiscoveredAuthority(authority, request.azureCloudOptions, request.account);
13538
13079
  }
13539
13080
  const canonicalAuthority = new UrlString(authority);
13540
13081
  canonicalAuthority.validateAsUri();
@@ -14099,7 +13640,7 @@
14099
13640
  // Create auth code request and generate PKCE params
14100
13641
  const authCodeRequest = await invokeAsync(this.initializeAuthorizationCodeRequest.bind(this), PerformanceEvents.StandardInteractionClientInitializeAuthorizationCodeRequest, this.logger, this.performanceClient, this.correlationId)(validRequest);
14101
13642
  // Initialize the client
14102
- const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, validRequest.authority, validRequest.azureCloudOptions);
13643
+ const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, validRequest.authority, validRequest.azureCloudOptions, validRequest.account);
14103
13644
  const isNativeBroker = NativeMessageHandler.isNativeAvailable(this.config, this.logger, this.nativeMessageHandler, request.authenticationScheme);
14104
13645
  // Start measurement for server calls with native brokering enabled
14105
13646
  let fetchNativeAccountIdMeasurement;
@@ -14180,7 +13721,8 @@
14180
13721
  // Clear cache on logout
14181
13722
  await this.clearCacheOnLogout(validRequest.account);
14182
13723
  // Initialize the client
14183
- const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, requestAuthority);
13724
+ const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, requestAuthority, undefined, // AzureCloudOptions
13725
+ validRequest.account || undefined);
14184
13726
  try {
14185
13727
  authClient.authority.endSessionEndpoint;
14186
13728
  }
@@ -14612,7 +14154,7 @@
14612
14154
  // Create auth code request and generate PKCE params
14613
14155
  const authCodeRequest = await invokeAsync(this.initializeAuthorizationCodeRequest.bind(this), PerformanceEvents.StandardInteractionClientInitializeAuthorizationCodeRequest, this.logger, this.performanceClient, this.correlationId)(validRequest);
14614
14156
  // Initialize the client
14615
- const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, validRequest.authority, validRequest.azureCloudOptions);
14157
+ const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, validRequest.authority, validRequest.azureCloudOptions, validRequest.account);
14616
14158
  // Create redirect interaction handler.
14617
14159
  const interactionHandler = new RedirectHandler(authClient, this.browserStorage, authCodeRequest, this.logger, this.performanceClient);
14618
14160
  // Create acquire token url.
@@ -14830,7 +14372,8 @@
14830
14372
  timeout: this.config.system.redirectNavigationTimeout,
14831
14373
  noHistory: false,
14832
14374
  };
14833
- const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, logoutRequest && logoutRequest.authority);
14375
+ const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, logoutRequest && logoutRequest.authority, undefined, // AzureCloudOptions
14376
+ (logoutRequest && logoutRequest.account) || undefined);
14834
14377
  if (authClient.authority.protocolMode === ProtocolMode.OIDC) {
14835
14378
  try {
14836
14379
  authClient.authority.endSessionEndpoint;
@@ -15066,7 +14609,7 @@
15066
14609
  const serverTelemetryManager = this.initializeServerTelemetryManager(this.apiId);
15067
14610
  try {
15068
14611
  // Initialize the client
15069
- const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, request.correlationId)(serverTelemetryManager, silentRequest.authority, silentRequest.azureCloudOptions);
14612
+ const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, request.correlationId)(serverTelemetryManager, silentRequest.authority, silentRequest.azureCloudOptions, silentRequest.account);
15070
14613
  return await invokeAsync(this.silentTokenHelper.bind(this), PerformanceEvents.SilentIframeClientTokenHelper, this.logger, this.performanceClient, request.correlationId)(authClient, silentRequest);
15071
14614
  }
15072
14615
  catch (e) {
@@ -15137,7 +14680,7 @@
15137
14680
  */
15138
14681
  async acquireToken(request) {
15139
14682
  this.performanceClient.addQueueMeasurement(PerformanceEvents.SilentRefreshClientAcquireToken, request.correlationId);
15140
- const baseRequest = await invokeAsync(this.initializeBaseRequest.bind(this), PerformanceEvents.InitializeBaseRequest, this.logger, this.performanceClient, request.correlationId)(request, request.account);
14683
+ const baseRequest = await invokeAsync(this.initializeBaseRequest.bind(this), PerformanceEvents.InitializeBaseRequest, this.logger, this.performanceClient, request.correlationId)(request);
15141
14684
  const silentRequest = {
15142
14685
  ...request,
15143
14686
  ...baseRequest,
@@ -15147,7 +14690,7 @@
15147
14690
  silentRequest.redirectUri = this.getRedirectUri(request.redirectUri);
15148
14691
  }
15149
14692
  const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenSilent_silentFlow);
15150
- const refreshTokenClient = await this.createRefreshTokenClient(serverTelemetryManager, silentRequest.authority, silentRequest.azureCloudOptions);
14693
+ const refreshTokenClient = await this.createRefreshTokenClient(serverTelemetryManager, silentRequest.authority, silentRequest.azureCloudOptions, silentRequest.account);
15151
14694
  // Send request to renew token. Auth module will throw errors if token cannot be renewed.
15152
14695
  return invokeAsync(refreshTokenClient.acquireTokenByRefreshToken.bind(refreshTokenClient), PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken, this.logger, this.performanceClient, request.correlationId)(silentRequest).catch((e) => {
15153
14696
  e.setCorrelationId(this.correlationId);
@@ -15167,9 +14710,9 @@
15167
14710
  * @param serverTelemetryManager
15168
14711
  * @param authorityUrl
15169
14712
  */
15170
- async createRefreshTokenClient(serverTelemetryManager, authorityUrl, azureCloudOptions) {
14713
+ async createRefreshTokenClient(serverTelemetryManager, authorityUrl, azureCloudOptions, account) {
15171
14714
  // Create auth module.
15172
- const clientConfig = await invokeAsync(this.getClientConfiguration.bind(this), PerformanceEvents.StandardInteractionClientGetClientConfiguration, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, authorityUrl, azureCloudOptions);
14715
+ const clientConfig = await invokeAsync(this.getClientConfiguration.bind(this), PerformanceEvents.StandardInteractionClientGetClientConfiguration, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, authorityUrl, azureCloudOptions, account);
15173
14716
  return new RefreshTokenClient(clientConfig, this.performanceClient);
15174
14717
  }
15175
14718
  }
@@ -15219,7 +14762,7 @@
15219
14762
  authorityMetadata: this.config.auth.authorityMetadata,
15220
14763
  skipAuthorityMetadataCache: this.config.auth.skipAuthorityMetadataCache,
15221
14764
  };
15222
- authority = new Authority(authorityUrl, this.config.system.networkClient, this.storage, authorityOptions, this.logger);
14765
+ authority = new Authority(authorityUrl, this.config.system.networkClient, this.storage, authorityOptions, this.logger, request.correlationId || createNewGuid());
15223
14766
  // "clientInfo" from options takes precedence over "clientInfo" in response
15224
14767
  if (options.clientInfo) {
15225
14768
  this.logger.trace("TokenCache - homeAccountId from options");
@@ -15436,7 +14979,7 @@
15436
14979
  code: request.code,
15437
14980
  };
15438
14981
  // Initialize the client
15439
- const clientConfig = await invokeAsync(this.getClientConfiguration.bind(this), PerformanceEvents.StandardInteractionClientGetClientConfiguration, this.logger, this.performanceClient, request.correlationId)(serverTelemetryManager, silentRequest.authority);
14982
+ const clientConfig = await invokeAsync(this.getClientConfiguration.bind(this), PerformanceEvents.StandardInteractionClientGetClientConfiguration, this.logger, this.performanceClient, request.correlationId)(serverTelemetryManager, silentRequest.authority, silentRequest.azureCloudOptions, silentRequest.account);
15440
14983
  const authClient = new HybridSpaAuthorizationCodeClient(clientConfig);
15441
14984
  this.logger.verbose("Auth code client created");
15442
14985
  // Create silent handler
@@ -16652,13 +16195,19 @@
16652
16195
  throw error;
16653
16196
  });
16654
16197
  this.activeSilentTokenRequests.set(silentRequestKey, response);
16655
- return response;
16198
+ return {
16199
+ ...(await response),
16200
+ state: request.state,
16201
+ };
16656
16202
  }
16657
16203
  else {
16658
16204
  this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call", correlationId);
16659
16205
  // Discard measurements for memoized calls, as they are usually only a couple of ms and will artificially deflate metrics
16660
16206
  atsMeasurement.discard();
16661
- return cachedResponse;
16207
+ return {
16208
+ ...(await cachedResponse),
16209
+ state: request.state,
16210
+ };
16662
16211
  }
16663
16212
  }
16664
16213
  /**
@@ -18466,7 +18015,7 @@
18466
18015
  atPopupMeasurement?.add({ nestedAppAuthRequest: true });
18467
18016
  try {
18468
18017
  const naaRequest = this.nestedAppAuthAdapter.toNaaTokenRequest(request);
18469
- const reqTimestamp = TimeUtils.nowSeconds();
18018
+ const reqTimestamp = nowSeconds();
18470
18019
  const response = await this.bridgeProxy.getTokenInteractive(naaRequest);
18471
18020
  const result = this.nestedAppAuthAdapter.fromNaaTokenResponse(naaRequest, response, reqTimestamp);
18472
18021
  this.operatingContext.setActiveAccount(result.account);
@@ -18503,7 +18052,7 @@
18503
18052
  });
18504
18053
  try {
18505
18054
  const naaRequest = this.nestedAppAuthAdapter.toNaaTokenRequest(request);
18506
- const reqTimestamp = TimeUtils.nowSeconds();
18055
+ const reqTimestamp = nowSeconds();
18507
18056
  const response = await this.bridgeProxy.getTokenSilent(naaRequest);
18508
18057
  const result = this.nestedAppAuthAdapter.fromNaaTokenResponse(naaRequest, response, reqTimestamp);
18509
18058
  this.operatingContext.setActiveAccount(result.account);