@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,8 +1,8 @@
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
  'use strict';
4
4
 
5
- /*! @azure/msal-common v14.6.0 2024-01-09 */
5
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
6
6
  /*
7
7
  * Copyright (c) Microsoft Corporation. All rights reserved.
8
8
  * Licensed under the MIT License.
@@ -297,7 +297,7 @@ const JsonWebTokenTypes = {
297
297
  Pop: "pop",
298
298
  };
299
299
 
300
- /*! @azure/msal-common v14.6.0 2024-01-09 */
300
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
301
301
  /*
302
302
  * Copyright (c) Microsoft Corporation. All rights reserved.
303
303
  * Licensed under the MIT License.
@@ -314,7 +314,7 @@ var AuthErrorCodes = /*#__PURE__*/Object.freeze({
314
314
  unexpectedError: unexpectedError
315
315
  });
316
316
 
317
- /*! @azure/msal-common v14.6.0 2024-01-09 */
317
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
318
318
 
319
319
  /*
320
320
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -363,7 +363,7 @@ function createAuthError(code, additionalMessage) {
363
363
  : AuthErrorMessages[code]);
364
364
  }
365
365
 
366
- /*! @azure/msal-common v14.6.0 2024-01-09 */
366
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
367
367
  /*
368
368
  * Copyright (c) Microsoft Corporation. All rights reserved.
369
369
  * Licensed under the MIT License.
@@ -461,7 +461,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
461
461
  userTimeoutReached: userTimeoutReached
462
462
  });
463
463
 
464
- /*! @azure/msal-common v14.6.0 2024-01-09 */
464
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
465
465
 
466
466
  /*
467
467
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -713,7 +713,7 @@ function createClientAuthError(errorCode, additionalMessage) {
713
713
  return new ClientAuthError(errorCode, additionalMessage);
714
714
  }
715
715
 
716
- /*! @azure/msal-common v14.6.0 2024-01-09 */
716
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
717
717
 
718
718
  /*
719
719
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -746,7 +746,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
746
746
  },
747
747
  };
748
748
 
749
- /*! @azure/msal-common v14.6.0 2024-01-09 */
749
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
750
750
 
751
751
  /*
752
752
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -937,12 +937,12 @@ class Logger {
937
937
  }
938
938
  }
939
939
 
940
- /*! @azure/msal-common v14.6.0 2024-01-09 */
940
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
941
941
  /* eslint-disable header/header */
942
942
  const name$1 = "@azure/msal-common";
943
- const version$1 = "14.6.0";
943
+ const version$1 = "14.6.2-alpha.0";
944
944
 
945
- /*! @azure/msal-common v14.6.0 2024-01-09 */
945
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
946
946
  /*
947
947
  * Copyright (c) Microsoft Corporation. All rights reserved.
948
948
  * Licensed under the MIT License.
@@ -962,7 +962,7 @@ const AzureCloudInstance = {
962
962
  AzureUsGovernment: "https://login.microsoftonline.us",
963
963
  };
964
964
 
965
- /*! @azure/msal-common v14.6.0 2024-01-09 */
965
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
966
966
 
967
967
  /*
968
968
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1023,54 +1023,44 @@ function checkMaxAge(authTime, maxAge) {
1023
1023
  }
1024
1024
  }
1025
1025
 
1026
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1026
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
1027
1027
  /*
1028
1028
  * Copyright (c) Microsoft Corporation. All rights reserved.
1029
1029
  * Licensed under the MIT License.
1030
1030
  */
1031
1031
  /**
1032
- * Utility class which exposes functions for managing date and time operations.
1032
+ * Utility functions for managing date and time operations.
1033
1033
  */
1034
- class TimeUtils {
1035
- /**
1036
- * return the current time in Unix time (seconds).
1037
- */
1038
- static nowSeconds() {
1039
- // Date.getTime() returns in milliseconds.
1040
- return Math.round(new Date().getTime() / 1000.0);
1041
- }
1042
- /**
1043
- * check if a token is expired based on given UTC time in seconds.
1044
- * @param expiresOn
1045
- */
1046
- static isTokenExpired(expiresOn, offset) {
1047
- // check for access token expiry
1048
- const expirationSec = Number(expiresOn) || 0;
1049
- const offsetCurrentTimeSec = TimeUtils.nowSeconds() + offset;
1050
- // If current time + offset is greater than token expiration time, then token is expired.
1051
- return offsetCurrentTimeSec > expirationSec;
1052
- }
1053
- /**
1054
- * If the current time is earlier than the time that a token was cached at, we must discard the token
1055
- * i.e. The system clock was turned back after acquiring the cached token
1056
- * @param cachedAt
1057
- * @param offset
1058
- */
1059
- static wasClockTurnedBack(cachedAt) {
1060
- const cachedAtSec = Number(cachedAt);
1061
- return cachedAtSec > TimeUtils.nowSeconds();
1062
- }
1063
- /**
1064
- * Waits for t number of milliseconds
1065
- * @param t number
1066
- * @param value T
1067
- */
1068
- static delay(t, value) {
1069
- return new Promise((resolve) => setTimeout(() => resolve(value), t));
1070
- }
1034
+ /**
1035
+ * return the current time in Unix time (seconds).
1036
+ */
1037
+ function nowSeconds() {
1038
+ // Date.getTime() returns in milliseconds.
1039
+ return Math.round(new Date().getTime() / 1000.0);
1040
+ }
1041
+ /**
1042
+ * check if a token is expired based on given UTC time in seconds.
1043
+ * @param expiresOn
1044
+ */
1045
+ function isTokenExpired(expiresOn, offset) {
1046
+ // check for access token expiry
1047
+ const expirationSec = Number(expiresOn) || 0;
1048
+ const offsetCurrentTimeSec = nowSeconds() + offset;
1049
+ // If current time + offset is greater than token expiration time, then token is expired.
1050
+ return offsetCurrentTimeSec > expirationSec;
1051
+ }
1052
+ /**
1053
+ * If the current time is earlier than the time that a token was cached at, we must discard the token
1054
+ * i.e. The system clock was turned back after acquiring the cached token
1055
+ * @param cachedAt
1056
+ * @param offset
1057
+ */
1058
+ function wasClockTurnedBack(cachedAt) {
1059
+ const cachedAtSec = Number(cachedAt);
1060
+ return cachedAtSec > nowSeconds();
1071
1061
  }
1072
1062
 
1073
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1063
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
1074
1064
 
1075
1065
  /*
1076
1066
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1128,7 +1118,7 @@ function createAccessTokenEntity(homeAccountId, environment, accessToken, client
1128
1118
  homeAccountId: homeAccountId,
1129
1119
  credentialType: CredentialType.ACCESS_TOKEN,
1130
1120
  secret: accessToken,
1131
- cachedAt: TimeUtils.nowSeconds().toString(),
1121
+ cachedAt: nowSeconds().toString(),
1132
1122
  expiresOn: expiresOn.toString(),
1133
1123
  extendedExpiresOn: extExpiresOn.toString(),
1134
1124
  environment: environment,
@@ -1372,7 +1362,7 @@ function isAuthorityMetadataEntity(key, entity) {
1372
1362
  * Reset the exiresAt value
1373
1363
  */
1374
1364
  function generateAuthorityMetadataExpiresAt() {
1375
- return (TimeUtils.nowSeconds() +
1365
+ return (nowSeconds() +
1376
1366
  AUTHORITY_METADATA_CONSTANTS.REFRESH_TIME_SECONDS);
1377
1367
  }
1378
1368
  function updateAuthorityEndpointMetadata(authorityMetadata, updatedValues, fromNetwork) {
@@ -1394,10 +1384,10 @@ function updateCloudDiscoveryMetadata(authorityMetadata, updatedValues, fromNetw
1394
1384
  * Returns whether or not the data needs to be refreshed
1395
1385
  */
1396
1386
  function isAuthorityMetadataExpired(metadata) {
1397
- return metadata.expiresAt <= TimeUtils.nowSeconds();
1387
+ return metadata.expiresAt <= nowSeconds();
1398
1388
  }
1399
1389
 
1400
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1390
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
1401
1391
  /*
1402
1392
  * Copyright (c) Microsoft Corporation. All rights reserved.
1403
1393
  * Licensed under the MIT License.
@@ -1451,7 +1441,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
1451
1441
  urlParseError: urlParseError
1452
1442
  });
1453
1443
 
1454
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1444
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
1455
1445
 
1456
1446
  /*
1457
1447
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1589,7 +1579,7 @@ function createClientConfigurationError(errorCode) {
1589
1579
  return new ClientConfigurationError(errorCode);
1590
1580
  }
1591
1581
 
1592
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1582
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
1593
1583
  /*
1594
1584
  * Copyright (c) Microsoft Corporation. All rights reserved.
1595
1585
  * Licensed under the MIT License.
@@ -1686,7 +1676,7 @@ class StringUtils {
1686
1676
  }
1687
1677
  }
1688
1678
 
1689
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1679
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
1690
1680
 
1691
1681
  /*
1692
1682
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1886,7 +1876,7 @@ class ScopeSet {
1886
1876
  }
1887
1877
  }
1888
1878
 
1889
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1879
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
1890
1880
 
1891
1881
  /*
1892
1882
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1926,7 +1916,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
1926
1916
  };
1927
1917
  }
1928
1918
 
1929
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1919
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
1930
1920
  /*
1931
1921
  * Copyright (c) Microsoft Corporation. All rights reserved.
1932
1922
  * Licensed under the MIT License.
@@ -1987,7 +1977,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
1987
1977
  return updatedAccountInfo;
1988
1978
  }
1989
1979
 
1990
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1980
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
1991
1981
  /*
1992
1982
  * Copyright (c) Microsoft Corporation. All rights reserved.
1993
1983
  * Licensed under the MIT License.
@@ -2002,7 +1992,7 @@ const AuthorityType = {
2002
1992
  Ciam: 3,
2003
1993
  };
2004
1994
 
2005
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1995
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
2006
1996
  /*
2007
1997
  * Copyright (c) Microsoft Corporation. All rights reserved.
2008
1998
  * Licensed under the MIT License.
@@ -2024,7 +2014,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
2024
2014
  return null;
2025
2015
  }
2026
2016
 
2027
- /*! @azure/msal-common v14.6.0 2024-01-09 */
2017
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
2028
2018
  /*
2029
2019
  * Copyright (c) Microsoft Corporation. All rights reserved.
2030
2020
  * Licensed under the MIT License.
@@ -2037,7 +2027,7 @@ const ProtocolMode = {
2037
2027
  OIDC: "OIDC",
2038
2028
  };
2039
2029
 
2040
- /*! @azure/msal-common v14.6.0 2024-01-09 */
2030
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
2041
2031
 
2042
2032
  /*
2043
2033
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2284,7 +2274,7 @@ class AccountEntity {
2284
2274
  }
2285
2275
  }
2286
2276
 
2287
- /*! @azure/msal-common v14.6.0 2024-01-09 */
2277
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
2288
2278
 
2289
2279
  /*
2290
2280
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2331,7 +2321,7 @@ function getDeserializedResponse(responseString) {
2331
2321
  return null;
2332
2322
  }
2333
2323
 
2334
- /*! @azure/msal-common v14.6.0 2024-01-09 */
2324
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
2335
2325
 
2336
2326
  /*
2337
2327
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2495,7 +2485,7 @@ class UrlString {
2495
2485
  }
2496
2486
  }
2497
2487
 
2498
- /*! @azure/msal-common v14.6.0 2024-01-09 */
2488
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
2499
2489
 
2500
2490
  /*
2501
2491
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2503,496 +2493,30 @@ class UrlString {
2503
2493
  */
2504
2494
  const rawMetdataJSON = {
2505
2495
  endpointMetadata: {
2506
- "https://login.microsoftonline.com/common/": {
2507
- token_endpoint: "https://login.microsoftonline.com/common/oauth2/v2.0/token",
2508
- token_endpoint_auth_methods_supported: [
2509
- "client_secret_post",
2510
- "private_key_jwt",
2511
- "client_secret_basic",
2512
- ],
2513
- jwks_uri: "https://login.microsoftonline.com/common/discovery/v2.0/keys",
2514
- response_modes_supported: ["query", "fragment", "form_post"],
2515
- subject_types_supported: ["pairwise"],
2516
- id_token_signing_alg_values_supported: ["RS256"],
2517
- response_types_supported: [
2518
- "code",
2519
- "id_token",
2520
- "code id_token",
2521
- "id_token token",
2522
- ],
2523
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2524
- issuer: "https://login.microsoftonline.com/{tenantid}/v2.0",
2525
- request_uri_parameter_supported: false,
2526
- userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo",
2527
- authorization_endpoint: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
2528
- device_authorization_endpoint: "https://login.microsoftonline.com/common/oauth2/v2.0/devicecode",
2529
- http_logout_supported: true,
2530
- frontchannel_logout_supported: true,
2531
- end_session_endpoint: "https://login.microsoftonline.com/common/oauth2/v2.0/logout",
2532
- claims_supported: [
2533
- "sub",
2534
- "iss",
2535
- "cloud_instance_name",
2536
- "cloud_instance_host_name",
2537
- "cloud_graph_host_name",
2538
- "msgraph_host",
2539
- "aud",
2540
- "exp",
2541
- "iat",
2542
- "auth_time",
2543
- "acr",
2544
- "nonce",
2545
- "preferred_username",
2546
- "name",
2547
- "tid",
2548
- "ver",
2549
- "at_hash",
2550
- "c_hash",
2551
- "email",
2552
- ],
2553
- kerberos_endpoint: "https://login.microsoftonline.com/common/kerberos",
2554
- tenant_region_scope: null,
2555
- cloud_instance_name: "microsoftonline.com",
2556
- cloud_graph_host_name: "graph.windows.net",
2557
- msgraph_host: "graph.microsoft.com",
2558
- rbac_url: "https://pas.windows.net",
2559
- },
2560
- "https://login.chinacloudapi.cn/common/": {
2561
- token_endpoint: "https://login.chinacloudapi.cn/common/oauth2/v2.0/token",
2562
- token_endpoint_auth_methods_supported: [
2563
- "client_secret_post",
2564
- "private_key_jwt",
2565
- "client_secret_basic",
2566
- ],
2567
- jwks_uri: "https://login.chinacloudapi.cn/common/discovery/v2.0/keys",
2568
- response_modes_supported: ["query", "fragment", "form_post"],
2569
- subject_types_supported: ["pairwise"],
2570
- id_token_signing_alg_values_supported: ["RS256"],
2571
- response_types_supported: [
2572
- "code",
2573
- "id_token",
2574
- "code id_token",
2575
- "id_token token",
2576
- ],
2577
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2578
- issuer: "https://login.partner.microsoftonline.cn/{tenantid}/v2.0",
2579
- request_uri_parameter_supported: false,
2580
- userinfo_endpoint: "https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",
2581
- authorization_endpoint: "https://login.chinacloudapi.cn/common/oauth2/v2.0/authorize",
2582
- device_authorization_endpoint: "https://login.chinacloudapi.cn/common/oauth2/v2.0/devicecode",
2583
- http_logout_supported: true,
2584
- frontchannel_logout_supported: true,
2585
- end_session_endpoint: "https://login.chinacloudapi.cn/common/oauth2/v2.0/logout",
2586
- claims_supported: [
2587
- "sub",
2588
- "iss",
2589
- "cloud_instance_name",
2590
- "cloud_instance_host_name",
2591
- "cloud_graph_host_name",
2592
- "msgraph_host",
2593
- "aud",
2594
- "exp",
2595
- "iat",
2596
- "auth_time",
2597
- "acr",
2598
- "nonce",
2599
- "preferred_username",
2600
- "name",
2601
- "tid",
2602
- "ver",
2603
- "at_hash",
2604
- "c_hash",
2605
- "email",
2606
- ],
2607
- kerberos_endpoint: "https://login.chinacloudapi.cn/common/kerberos",
2608
- tenant_region_scope: null,
2609
- cloud_instance_name: "partner.microsoftonline.cn",
2610
- cloud_graph_host_name: "graph.chinacloudapi.cn",
2611
- msgraph_host: "microsoftgraph.chinacloudapi.cn",
2612
- rbac_url: "https://pas.chinacloudapi.cn",
2613
- },
2614
- "https://login.microsoftonline.us/common/": {
2615
- token_endpoint: "https://login.microsoftonline.us/common/oauth2/v2.0/token",
2616
- token_endpoint_auth_methods_supported: [
2617
- "client_secret_post",
2618
- "private_key_jwt",
2619
- "client_secret_basic",
2620
- ],
2621
- jwks_uri: "https://login.microsoftonline.us/common/discovery/v2.0/keys",
2622
- response_modes_supported: ["query", "fragment", "form_post"],
2623
- subject_types_supported: ["pairwise"],
2624
- id_token_signing_alg_values_supported: ["RS256"],
2625
- response_types_supported: [
2626
- "code",
2627
- "id_token",
2628
- "code id_token",
2629
- "id_token token",
2630
- ],
2631
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2632
- issuer: "https://login.microsoftonline.us/{tenantid}/v2.0",
2633
- request_uri_parameter_supported: false,
2634
- userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo",
2635
- authorization_endpoint: "https://login.microsoftonline.us/common/oauth2/v2.0/authorize",
2636
- device_authorization_endpoint: "https://login.microsoftonline.us/common/oauth2/v2.0/devicecode",
2637
- http_logout_supported: true,
2638
- frontchannel_logout_supported: true,
2639
- end_session_endpoint: "https://login.microsoftonline.us/common/oauth2/v2.0/logout",
2640
- claims_supported: [
2641
- "sub",
2642
- "iss",
2643
- "cloud_instance_name",
2644
- "cloud_instance_host_name",
2645
- "cloud_graph_host_name",
2646
- "msgraph_host",
2647
- "aud",
2648
- "exp",
2649
- "iat",
2650
- "auth_time",
2651
- "acr",
2652
- "nonce",
2653
- "preferred_username",
2654
- "name",
2655
- "tid",
2656
- "ver",
2657
- "at_hash",
2658
- "c_hash",
2659
- "email",
2660
- ],
2661
- kerberos_endpoint: "https://login.microsoftonline.us/common/kerberos",
2662
- tenant_region_scope: null,
2663
- cloud_instance_name: "microsoftonline.us",
2664
- cloud_graph_host_name: "graph.windows.net",
2665
- msgraph_host: "graph.microsoft.com",
2666
- rbac_url: "https://pasff.usgovcloudapi.net",
2667
- },
2668
- "https://login.microsoftonline.com/consumers/": {
2669
- token_endpoint: "https://login.microsoftonline.com/consumers/oauth2/v2.0/token",
2670
- token_endpoint_auth_methods_supported: [
2671
- "client_secret_post",
2672
- "private_key_jwt",
2673
- "client_secret_basic",
2674
- ],
2675
- jwks_uri: "https://login.microsoftonline.com/consumers/discovery/v2.0/keys",
2676
- response_modes_supported: ["query", "fragment", "form_post"],
2677
- subject_types_supported: ["pairwise"],
2678
- id_token_signing_alg_values_supported: ["RS256"],
2679
- response_types_supported: [
2680
- "code",
2681
- "id_token",
2682
- "code id_token",
2683
- "id_token token",
2684
- ],
2685
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2686
- issuer: "https://login.microsoftonline.com/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",
2687
- request_uri_parameter_supported: false,
2688
- userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo",
2689
- authorization_endpoint: "https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize",
2690
- device_authorization_endpoint: "https://login.microsoftonline.com/consumers/oauth2/v2.0/devicecode",
2691
- http_logout_supported: true,
2692
- frontchannel_logout_supported: true,
2693
- end_session_endpoint: "https://login.microsoftonline.com/consumers/oauth2/v2.0/logout",
2694
- claims_supported: [
2695
- "sub",
2696
- "iss",
2697
- "cloud_instance_name",
2698
- "cloud_instance_host_name",
2699
- "cloud_graph_host_name",
2700
- "msgraph_host",
2701
- "aud",
2702
- "exp",
2703
- "iat",
2704
- "auth_time",
2705
- "acr",
2706
- "nonce",
2707
- "preferred_username",
2708
- "name",
2709
- "tid",
2710
- "ver",
2711
- "at_hash",
2712
- "c_hash",
2713
- "email",
2714
- ],
2715
- kerberos_endpoint: "https://login.microsoftonline.com/consumers/kerberos",
2716
- tenant_region_scope: null,
2717
- cloud_instance_name: "microsoftonline.com",
2718
- cloud_graph_host_name: "graph.windows.net",
2719
- msgraph_host: "graph.microsoft.com",
2720
- rbac_url: "https://pas.windows.net",
2721
- },
2722
- "https://login.chinacloudapi.cn/consumers/": {
2723
- token_endpoint: "https://login.chinacloudapi.cn/consumers/oauth2/v2.0/token",
2724
- token_endpoint_auth_methods_supported: [
2725
- "client_secret_post",
2726
- "private_key_jwt",
2727
- "client_secret_basic",
2728
- ],
2729
- jwks_uri: "https://login.chinacloudapi.cn/consumers/discovery/v2.0/keys",
2730
- response_modes_supported: ["query", "fragment", "form_post"],
2731
- subject_types_supported: ["pairwise"],
2732
- id_token_signing_alg_values_supported: ["RS256"],
2733
- response_types_supported: [
2734
- "code",
2735
- "id_token",
2736
- "code id_token",
2737
- "id_token token",
2738
- ],
2739
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2740
- issuer: "https://login.partner.microsoftonline.cn/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",
2741
- request_uri_parameter_supported: false,
2742
- userinfo_endpoint: "https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",
2743
- authorization_endpoint: "https://login.chinacloudapi.cn/consumers/oauth2/v2.0/authorize",
2744
- device_authorization_endpoint: "https://login.chinacloudapi.cn/consumers/oauth2/v2.0/devicecode",
2745
- http_logout_supported: true,
2746
- frontchannel_logout_supported: true,
2747
- end_session_endpoint: "https://login.chinacloudapi.cn/consumers/oauth2/v2.0/logout",
2748
- claims_supported: [
2749
- "sub",
2750
- "iss",
2751
- "cloud_instance_name",
2752
- "cloud_instance_host_name",
2753
- "cloud_graph_host_name",
2754
- "msgraph_host",
2755
- "aud",
2756
- "exp",
2757
- "iat",
2758
- "auth_time",
2759
- "acr",
2760
- "nonce",
2761
- "preferred_username",
2762
- "name",
2763
- "tid",
2764
- "ver",
2765
- "at_hash",
2766
- "c_hash",
2767
- "email",
2768
- ],
2769
- kerberos_endpoint: "https://login.chinacloudapi.cn/consumers/kerberos",
2770
- tenant_region_scope: null,
2771
- cloud_instance_name: "partner.microsoftonline.cn",
2772
- cloud_graph_host_name: "graph.chinacloudapi.cn",
2773
- msgraph_host: "microsoftgraph.chinacloudapi.cn",
2774
- rbac_url: "https://pas.chinacloudapi.cn",
2775
- },
2776
- "https://login.microsoftonline.us/consumers/": {
2777
- token_endpoint: "https://login.microsoftonline.us/consumers/oauth2/v2.0/token",
2778
- token_endpoint_auth_methods_supported: [
2779
- "client_secret_post",
2780
- "private_key_jwt",
2781
- "client_secret_basic",
2782
- ],
2783
- jwks_uri: "https://login.microsoftonline.us/consumers/discovery/v2.0/keys",
2784
- response_modes_supported: ["query", "fragment", "form_post"],
2785
- subject_types_supported: ["pairwise"],
2786
- id_token_signing_alg_values_supported: ["RS256"],
2787
- response_types_supported: [
2788
- "code",
2789
- "id_token",
2790
- "code id_token",
2791
- "id_token token",
2792
- ],
2793
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2794
- issuer: "https://login.microsoftonline.us/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",
2795
- request_uri_parameter_supported: false,
2796
- userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo",
2797
- authorization_endpoint: "https://login.microsoftonline.us/consumers/oauth2/v2.0/authorize",
2798
- device_authorization_endpoint: "https://login.microsoftonline.us/consumers/oauth2/v2.0/devicecode",
2799
- http_logout_supported: true,
2800
- frontchannel_logout_supported: true,
2801
- end_session_endpoint: "https://login.microsoftonline.us/consumers/oauth2/v2.0/logout",
2802
- claims_supported: [
2803
- "sub",
2804
- "iss",
2805
- "cloud_instance_name",
2806
- "cloud_instance_host_name",
2807
- "cloud_graph_host_name",
2808
- "msgraph_host",
2809
- "aud",
2810
- "exp",
2811
- "iat",
2812
- "auth_time",
2813
- "acr",
2814
- "nonce",
2815
- "preferred_username",
2816
- "name",
2817
- "tid",
2818
- "ver",
2819
- "at_hash",
2820
- "c_hash",
2821
- "email",
2822
- ],
2823
- kerberos_endpoint: "https://login.microsoftonline.us/consumers/kerberos",
2824
- tenant_region_scope: null,
2825
- cloud_instance_name: "microsoftonline.us",
2826
- cloud_graph_host_name: "graph.windows.net",
2827
- msgraph_host: "graph.microsoft.com",
2828
- rbac_url: "https://pasff.usgovcloudapi.net",
2829
- },
2830
- "https://login.microsoftonline.com/organizations/": {
2831
- token_endpoint: "https://login.microsoftonline.com/organizations/oauth2/v2.0/token",
2832
- token_endpoint_auth_methods_supported: [
2833
- "client_secret_post",
2834
- "private_key_jwt",
2835
- "client_secret_basic",
2836
- ],
2837
- jwks_uri: "https://login.microsoftonline.com/organizations/discovery/v2.0/keys",
2838
- response_modes_supported: ["query", "fragment", "form_post"],
2839
- subject_types_supported: ["pairwise"],
2840
- id_token_signing_alg_values_supported: ["RS256"],
2841
- response_types_supported: [
2842
- "code",
2843
- "id_token",
2844
- "code id_token",
2845
- "id_token token",
2846
- ],
2847
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2496
+ "login.microsoftonline.com": {
2497
+ token_endpoint: "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",
2498
+ jwks_uri: "https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",
2848
2499
  issuer: "https://login.microsoftonline.com/{tenantid}/v2.0",
2849
- request_uri_parameter_supported: false,
2850
- userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo",
2851
- authorization_endpoint: "https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize",
2852
- device_authorization_endpoint: "https://login.microsoftonline.com/organizations/oauth2/v2.0/devicecode",
2853
- http_logout_supported: true,
2854
- frontchannel_logout_supported: true,
2855
- end_session_endpoint: "https://login.microsoftonline.com/organizations/oauth2/v2.0/logout",
2856
- claims_supported: [
2857
- "sub",
2858
- "iss",
2859
- "cloud_instance_name",
2860
- "cloud_instance_host_name",
2861
- "cloud_graph_host_name",
2862
- "msgraph_host",
2863
- "aud",
2864
- "exp",
2865
- "iat",
2866
- "auth_time",
2867
- "acr",
2868
- "nonce",
2869
- "preferred_username",
2870
- "name",
2871
- "tid",
2872
- "ver",
2873
- "at_hash",
2874
- "c_hash",
2875
- "email",
2876
- ],
2877
- kerberos_endpoint: "https://login.microsoftonline.com/organizations/kerberos",
2878
- tenant_region_scope: null,
2879
- cloud_instance_name: "microsoftonline.com",
2880
- cloud_graph_host_name: "graph.windows.net",
2881
- msgraph_host: "graph.microsoft.com",
2882
- rbac_url: "https://pas.windows.net",
2500
+ authorization_endpoint: "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",
2501
+ end_session_endpoint: "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout",
2883
2502
  },
2884
- "https://login.chinacloudapi.cn/organizations/": {
2885
- token_endpoint: "https://login.chinacloudapi.cn/organizations/oauth2/v2.0/token",
2886
- token_endpoint_auth_methods_supported: [
2887
- "client_secret_post",
2888
- "private_key_jwt",
2889
- "client_secret_basic",
2890
- ],
2891
- jwks_uri: "https://login.chinacloudapi.cn/organizations/discovery/v2.0/keys",
2892
- response_modes_supported: ["query", "fragment", "form_post"],
2893
- subject_types_supported: ["pairwise"],
2894
- id_token_signing_alg_values_supported: ["RS256"],
2895
- response_types_supported: [
2896
- "code",
2897
- "id_token",
2898
- "code id_token",
2899
- "id_token token",
2900
- ],
2901
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2503
+ "login.chinacloudapi.cn": {
2504
+ token_endpoint: "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",
2505
+ jwks_uri: "https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",
2902
2506
  issuer: "https://login.partner.microsoftonline.cn/{tenantid}/v2.0",
2903
- request_uri_parameter_supported: false,
2904
- userinfo_endpoint: "https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",
2905
- authorization_endpoint: "https://login.chinacloudapi.cn/organizations/oauth2/v2.0/authorize",
2906
- device_authorization_endpoint: "https://login.chinacloudapi.cn/organizations/oauth2/v2.0/devicecode",
2907
- http_logout_supported: true,
2908
- frontchannel_logout_supported: true,
2909
- end_session_endpoint: "https://login.chinacloudapi.cn/organizations/oauth2/v2.0/logout",
2910
- claims_supported: [
2911
- "sub",
2912
- "iss",
2913
- "cloud_instance_name",
2914
- "cloud_instance_host_name",
2915
- "cloud_graph_host_name",
2916
- "msgraph_host",
2917
- "aud",
2918
- "exp",
2919
- "iat",
2920
- "auth_time",
2921
- "acr",
2922
- "nonce",
2923
- "preferred_username",
2924
- "name",
2925
- "tid",
2926
- "ver",
2927
- "at_hash",
2928
- "c_hash",
2929
- "email",
2930
- ],
2931
- kerberos_endpoint: "https://login.chinacloudapi.cn/organizations/kerberos",
2932
- tenant_region_scope: null,
2933
- cloud_instance_name: "partner.microsoftonline.cn",
2934
- cloud_graph_host_name: "graph.chinacloudapi.cn",
2935
- msgraph_host: "microsoftgraph.chinacloudapi.cn",
2936
- rbac_url: "https://pas.chinacloudapi.cn",
2507
+ authorization_endpoint: "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",
2508
+ end_session_endpoint: "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout",
2937
2509
  },
2938
- "https://login.microsoftonline.us/organizations/": {
2939
- token_endpoint: "https://login.microsoftonline.us/organizations/oauth2/v2.0/token",
2940
- token_endpoint_auth_methods_supported: [
2941
- "client_secret_post",
2942
- "private_key_jwt",
2943
- "client_secret_basic",
2944
- ],
2945
- jwks_uri: "https://login.microsoftonline.us/organizations/discovery/v2.0/keys",
2946
- response_modes_supported: ["query", "fragment", "form_post"],
2947
- subject_types_supported: ["pairwise"],
2948
- id_token_signing_alg_values_supported: ["RS256"],
2949
- response_types_supported: [
2950
- "code",
2951
- "id_token",
2952
- "code id_token",
2953
- "id_token token",
2954
- ],
2955
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2510
+ "login.microsoftonline.us": {
2511
+ token_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",
2512
+ jwks_uri: "https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",
2956
2513
  issuer: "https://login.microsoftonline.us/{tenantid}/v2.0",
2957
- request_uri_parameter_supported: false,
2958
- userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo",
2959
- authorization_endpoint: "https://login.microsoftonline.us/organizations/oauth2/v2.0/authorize",
2960
- device_authorization_endpoint: "https://login.microsoftonline.us/organizations/oauth2/v2.0/devicecode",
2961
- http_logout_supported: true,
2962
- frontchannel_logout_supported: true,
2963
- end_session_endpoint: "https://login.microsoftonline.us/organizations/oauth2/v2.0/logout",
2964
- claims_supported: [
2965
- "sub",
2966
- "iss",
2967
- "cloud_instance_name",
2968
- "cloud_instance_host_name",
2969
- "cloud_graph_host_name",
2970
- "msgraph_host",
2971
- "aud",
2972
- "exp",
2973
- "iat",
2974
- "auth_time",
2975
- "acr",
2976
- "nonce",
2977
- "preferred_username",
2978
- "name",
2979
- "tid",
2980
- "ver",
2981
- "at_hash",
2982
- "c_hash",
2983
- "email",
2984
- ],
2985
- kerberos_endpoint: "https://login.microsoftonline.us/organizations/kerberos",
2986
- tenant_region_scope: null,
2987
- cloud_instance_name: "microsoftonline.us",
2988
- cloud_graph_host_name: "graph.windows.net",
2989
- msgraph_host: "graph.microsoft.com",
2990
- rbac_url: "https://pasff.usgovcloudapi.net",
2514
+ authorization_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",
2515
+ end_session_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout",
2991
2516
  },
2992
2517
  },
2993
2518
  instanceDiscoveryMetadata: {
2994
2519
  tenant_discovery_endpoint: "https://{canonicalAuthority}/v2.0/.well-known/openid-configuration",
2995
- "api-version": "1.1",
2996
2520
  metadata: [
2997
2521
  {
2998
2522
  preferred_network: "login.microsoftonline.com",
@@ -3101,7 +2625,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
3101
2625
  return null;
3102
2626
  }
3103
2627
 
3104
- /*! @azure/msal-common v14.6.0 2024-01-09 */
2628
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
3105
2629
 
3106
2630
  /*
3107
2631
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4341,7 +3865,7 @@ class DefaultStorageClass extends CacheManager {
4341
3865
  }
4342
3866
  }
4343
3867
 
4344
- /*! @azure/msal-common v14.6.0 2024-01-09 */
3868
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
4345
3869
 
4346
3870
  /*
4347
3871
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4441,7 +3965,7 @@ function isOidcProtocolMode(config) {
4441
3965
  return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
4442
3966
  }
4443
3967
 
4444
- /*! @azure/msal-common v14.6.0 2024-01-09 */
3968
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
4445
3969
 
4446
3970
  /*
4447
3971
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4458,7 +3982,7 @@ class ServerError extends AuthError {
4458
3982
  }
4459
3983
  }
4460
3984
 
4461
- /*! @azure/msal-common v14.6.0 2024-01-09 */
3985
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
4462
3986
 
4463
3987
  /*
4464
3988
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4556,7 +4080,7 @@ class ThrottlingUtils {
4556
4080
  }
4557
4081
  }
4558
4082
 
4559
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4083
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
4560
4084
 
4561
4085
  /*
4562
4086
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4593,7 +4117,7 @@ class NetworkManager {
4593
4117
  }
4594
4118
  }
4595
4119
 
4596
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4120
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
4597
4121
  /*
4598
4122
  * Copyright (c) Microsoft Corporation. All rights reserved.
4599
4123
  * Licensed under the MIT License.
@@ -4603,7 +4127,7 @@ const CcsCredentialType = {
4603
4127
  UPN: "UPN",
4604
4128
  };
4605
4129
 
4606
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4130
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
4607
4131
  /*
4608
4132
  * Copyright (c) Microsoft Corporation. All rights reserved.
4609
4133
  * Licensed under the MIT License.
@@ -4650,7 +4174,7 @@ const SID = "sid";
4650
4174
  const LOGIN_HINT = "login_hint";
4651
4175
  const DOMAIN_HINT = "domain_hint";
4652
4176
 
4653
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4177
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
4654
4178
 
4655
4179
  /*
4656
4180
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4734,7 +4258,7 @@ class RequestValidator {
4734
4258
  }
4735
4259
  }
4736
4260
 
4737
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4261
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
4738
4262
 
4739
4263
  /*
4740
4264
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5118,7 +4642,7 @@ class RequestParameterBuilder {
5118
4642
  }
5119
4643
  }
5120
4644
 
5121
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4645
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
5122
4646
  /*
5123
4647
  * Copyright (c) Microsoft Corporation. All rights reserved.
5124
4648
  * Licensed under the MIT License.
@@ -5130,7 +4654,7 @@ function isOpenIdConfigResponse(response) {
5130
4654
  response.hasOwnProperty("jwks_uri"));
5131
4655
  }
5132
4656
 
5133
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4657
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
5134
4658
  /*
5135
4659
  * Copyright (c) Microsoft Corporation. All rights reserved.
5136
4660
  * Licensed under the MIT License.
@@ -5140,7 +4664,7 @@ function isCloudInstanceDiscoveryResponse(response) {
5140
4664
  response.hasOwnProperty("metadata"));
5141
4665
  }
5142
4666
 
5143
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4667
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
5144
4668
  /*
5145
4669
  * Copyright (c) Microsoft Corporation. All rights reserved.
5146
4670
  * Licensed under the MIT License.
@@ -5150,7 +4674,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
5150
4674
  response.hasOwnProperty("error_description"));
5151
4675
  }
5152
4676
 
5153
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4677
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
5154
4678
  /*
5155
4679
  * Copyright (c) Microsoft Corporation. All rights reserved.
5156
4680
  * Licensed under the MIT License.
@@ -5405,7 +4929,7 @@ const IntFields = new Set([
5405
4929
  "multiMatchedRT",
5406
4930
  ]);
5407
4931
 
5408
- /*! @azure/msal-common v14.6.0 2024-01-09 */
4932
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
5409
4933
  /*
5410
4934
  * Copyright (c) Microsoft Corporation. All rights reserved.
5411
4935
  * Licensed under the MIT License.
@@ -5426,6 +4950,11 @@ const invoke = (callback, eventName, logger, telemetryClient, correlationId) =>
5426
4950
  return (...args) => {
5427
4951
  logger.trace(`Executing function ${eventName}`);
5428
4952
  const inProgressEvent = telemetryClient?.startMeasurement(eventName, correlationId);
4953
+ if (correlationId) {
4954
+ // Track number of times this API is called in a single request
4955
+ const eventCount = eventName + "CallCount";
4956
+ telemetryClient?.incrementFields({ [eventCount]: 1 }, correlationId);
4957
+ }
5429
4958
  try {
5430
4959
  const result = callback(...args);
5431
4960
  inProgressEvent?.end({
@@ -5466,6 +4995,11 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
5466
4995
  return (...args) => {
5467
4996
  logger.trace(`Executing function ${eventName}`);
5468
4997
  const inProgressEvent = telemetryClient?.startMeasurement(eventName, correlationId);
4998
+ if (correlationId) {
4999
+ // Track number of times this API is called in a single request
5000
+ const eventCount = eventName + "CallCount";
5001
+ telemetryClient?.incrementFields({ [eventCount]: 1 }, correlationId);
5002
+ }
5469
5003
  telemetryClient?.setPreQueueTime(eventName, correlationId);
5470
5004
  return callback(...args)
5471
5005
  .then((response) => {
@@ -5491,7 +5025,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
5491
5025
  };
5492
5026
  };
5493
5027
 
5494
- /*! @azure/msal-common v14.6.0 2024-01-09 */
5028
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
5495
5029
 
5496
5030
  /*
5497
5031
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5600,7 +5134,7 @@ RegionDiscovery.IMDS_OPTIONS = {
5600
5134
  },
5601
5135
  };
5602
5136
 
5603
- /*! @azure/msal-common v14.6.0 2024-01-09 */
5137
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
5604
5138
 
5605
5139
  /*
5606
5140
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5612,7 +5146,7 @@ RegionDiscovery.IMDS_OPTIONS = {
5612
5146
  * @internal
5613
5147
  */
5614
5148
  class Authority {
5615
- constructor(authority, networkInterface, cacheManager, authorityOptions, logger, performanceClient, correlationId) {
5149
+ constructor(authority, networkInterface, cacheManager, authorityOptions, logger, correlationId, performanceClient) {
5616
5150
  this.canonicalAuthority = authority;
5617
5151
  this._canonicalAuthority.validateAsUri();
5618
5152
  this.networkInterface = networkInterface;
@@ -5849,6 +5383,10 @@ class Authority {
5849
5383
  this.updateCachedMetadata(metadataEntity, cloudDiscoverySource, {
5850
5384
  source: endpointSource,
5851
5385
  });
5386
+ this.performanceClient?.addFields({
5387
+ cloudDiscoverySource: cloudDiscoverySource,
5388
+ authorityEndpointSource: endpointSource,
5389
+ }, this.correlationId);
5852
5390
  }
5853
5391
  /**
5854
5392
  * Returns metadata entity from cache if it exists, otherwiser returns a new metadata entity built
@@ -6040,8 +5578,8 @@ class Authority {
6040
5578
  * Get OAuth endpoints for common authorities.
6041
5579
  */
6042
5580
  getEndpointMetadataFromHardcodedValues() {
6043
- if (this.canonicalAuthority in EndpointMetadata) {
6044
- return EndpointMetadata[this.canonicalAuthority];
5581
+ if (this.hostnameAndPort in EndpointMetadata) {
5582
+ return EndpointMetadata[this.hostnameAndPort];
6045
5583
  }
6046
5584
  return null;
6047
5585
  }
@@ -6429,57 +5967,38 @@ function buildStaticAuthorityOptions(authOptions) {
6429
5967
  };
6430
5968
  }
6431
5969
 
6432
- /*! @azure/msal-common v14.6.0 2024-01-09 */
5970
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
6433
5971
 
6434
5972
  /*
6435
5973
  * Copyright (c) Microsoft Corporation. All rights reserved.
6436
5974
  * Licensed under the MIT License.
6437
5975
  */
6438
- /** @internal */
6439
- class AuthorityFactory {
6440
- /**
6441
- * Create an authority object of the correct type based on the url
6442
- * Performs basic authority validation - checks to see if the authority is of a valid type (i.e. aad, b2c, adfs)
6443
- *
6444
- * Also performs endpoint discovery.
6445
- *
6446
- * @param authorityUri
6447
- * @param networkClient
6448
- * @param protocolMode
6449
- */
6450
- static async createDiscoveredInstance(authorityUri, networkClient, cacheManager, authorityOptions, logger, performanceClient, correlationId) {
6451
- performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance, correlationId);
6452
- const authorityUriFinal = Authority.transformCIAMAuthority(formatAuthorityUri(authorityUri));
6453
- // Initialize authority and perform discovery endpoint check.
6454
- const acquireTokenAuthority = AuthorityFactory.createInstance(authorityUriFinal, networkClient, cacheManager, authorityOptions, logger, performanceClient, correlationId);
6455
- try {
6456
- await invokeAsync(acquireTokenAuthority.resolveEndpointsAsync.bind(acquireTokenAuthority), PerformanceEvents.AuthorityResolveEndpointsAsync, logger, performanceClient, correlationId)();
6457
- return acquireTokenAuthority;
6458
- }
6459
- catch (e) {
6460
- throw createClientAuthError(endpointResolutionError);
6461
- }
5976
+ /**
5977
+ * Create an authority object of the correct type based on the url
5978
+ * Performs basic authority validation - checks to see if the authority is of a valid type (i.e. aad, b2c, adfs)
5979
+ *
5980
+ * Also performs endpoint discovery.
5981
+ *
5982
+ * @param authorityUri
5983
+ * @param networkClient
5984
+ * @param protocolMode
5985
+ * @internal
5986
+ */
5987
+ async function createDiscoveredInstance(authorityUri, networkClient, cacheManager, authorityOptions, logger, correlationId, performanceClient) {
5988
+ performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance, correlationId);
5989
+ const authorityUriFinal = Authority.transformCIAMAuthority(formatAuthorityUri(authorityUri));
5990
+ // Initialize authority and perform discovery endpoint check.
5991
+ const acquireTokenAuthority = new Authority(authorityUriFinal, networkClient, cacheManager, authorityOptions, logger, correlationId, performanceClient);
5992
+ try {
5993
+ await invokeAsync(acquireTokenAuthority.resolveEndpointsAsync.bind(acquireTokenAuthority), PerformanceEvents.AuthorityResolveEndpointsAsync, logger, performanceClient, correlationId)();
5994
+ return acquireTokenAuthority;
6462
5995
  }
6463
- /**
6464
- * Create an authority object of the correct type based on the url
6465
- * Performs basic authority validation - checks to see if the authority is of a valid type (i.e. aad, b2c, adfs)
6466
- *
6467
- * Does not perform endpoint discovery.
6468
- *
6469
- * @param authorityUrl
6470
- * @param networkInterface
6471
- * @param protocolMode
6472
- */
6473
- static createInstance(authorityUrl, networkInterface, cacheManager, authorityOptions, logger, performanceClient, correlationId) {
6474
- // Throw error if authority url is empty
6475
- if (!authorityUrl) {
6476
- throw createClientConfigurationError(urlEmptyError);
6477
- }
6478
- return new Authority(authorityUrl, networkInterface, cacheManager, authorityOptions, logger, performanceClient, correlationId);
5996
+ catch (e) {
5997
+ throw createClientAuthError(endpointResolutionError);
6479
5998
  }
6480
5999
  }
6481
6000
 
6482
- /*! @azure/msal-common v14.6.0 2024-01-09 */
6001
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
6483
6002
 
6484
6003
  /*
6485
6004
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6566,7 +6085,7 @@ class BaseClient {
6566
6085
  async updateAuthority(cloudInstanceHostname, correlationId) {
6567
6086
  this.performanceClient?.addQueueMeasurement(PerformanceEvents.UpdateTokenEndpointAuthority, correlationId);
6568
6087
  const cloudInstanceAuthorityUri = `https://${cloudInstanceHostname}/${this.authority.tenant}/`;
6569
- const cloudInstanceAuthority = await AuthorityFactory.createDiscoveredInstance(cloudInstanceAuthorityUri, this.networkClient, this.cacheManager, this.authority.options, this.logger, this.performanceClient, correlationId);
6088
+ const cloudInstanceAuthority = await createDiscoveredInstance(cloudInstanceAuthorityUri, this.networkClient, this.cacheManager, this.authority.options, this.logger, correlationId, this.performanceClient);
6570
6089
  this.authority = cloudInstanceAuthority;
6571
6090
  }
6572
6091
  /**
@@ -6582,7 +6101,7 @@ class BaseClient {
6582
6101
  }
6583
6102
  }
6584
6103
 
6585
- /*! @azure/msal-common v14.6.0 2024-01-09 */
6104
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
6586
6105
  /*
6587
6106
  * Copyright (c) Microsoft Corporation. All rights reserved.
6588
6107
  * Licensed under the MIT License.
@@ -6608,7 +6127,7 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
6608
6127
  refreshTokenExpired: refreshTokenExpired
6609
6128
  });
6610
6129
 
6611
- /*! @azure/msal-common v14.6.0 2024-01-09 */
6130
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
6612
6131
 
6613
6132
  /*
6614
6133
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6695,7 +6214,7 @@ function createInteractionRequiredAuthError(errorCode) {
6695
6214
  return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
6696
6215
  }
6697
6216
 
6698
- /*! @azure/msal-common v14.6.0 2024-01-09 */
6217
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
6699
6218
  /*
6700
6219
  * Copyright (c) Microsoft Corporation. All rights reserved.
6701
6220
  * Licensed under the MIT License.
@@ -6711,7 +6230,7 @@ class CacheRecord {
6711
6230
  }
6712
6231
  }
6713
6232
 
6714
- /*! @azure/msal-common v14.6.0 2024-01-09 */
6233
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
6715
6234
 
6716
6235
  /*
6717
6236
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6783,7 +6302,7 @@ class ProtocolUtils {
6783
6302
  }
6784
6303
  }
6785
6304
 
6786
- /*! @azure/msal-common v14.6.0 2024-01-09 */
6305
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
6787
6306
 
6788
6307
  /*
6789
6308
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6854,7 +6373,7 @@ class PopTokenGenerator {
6854
6373
  const resourceUrlComponents = resourceUrlString?.getUrlComponents();
6855
6374
  return this.cryptoUtils.signJwt({
6856
6375
  at: payload,
6857
- ts: TimeUtils.nowSeconds(),
6376
+ ts: nowSeconds(),
6858
6377
  m: resourceRequestMethod?.toUpperCase(),
6859
6378
  u: resourceUrlComponents?.HostNameAndPort,
6860
6379
  nonce: shrNonce || this.cryptoUtils.createNewGuid(),
@@ -6868,7 +6387,7 @@ class PopTokenGenerator {
6868
6387
  }
6869
6388
  }
6870
6389
 
6871
- /*! @azure/msal-common v14.6.0 2024-01-09 */
6390
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
6872
6391
  /*
6873
6392
  * Copyright (c) Microsoft Corporation. All rights reserved.
6874
6393
  * Licensed under the MIT License.
@@ -6895,7 +6414,7 @@ class PopTokenGenerator {
6895
6414
  }
6896
6415
  }
6897
6416
 
6898
- /*! @azure/msal-common v14.6.0 2024-01-09 */
6417
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
6899
6418
 
6900
6419
  /*
6901
6420
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7108,7 +6627,7 @@ class ResponseHandler {
7108
6627
  ? reqTimestamp + refreshIn
7109
6628
  : undefined;
7110
6629
  // non AAD scenarios can have empty realm
7111
- 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);
6630
+ 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);
7112
6631
  }
7113
6632
  // refreshToken
7114
6633
  let cachedRefreshToken = null;
@@ -7248,7 +6767,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, idTokenClai
7248
6767
  return baseAccount;
7249
6768
  }
7250
6769
 
7251
- /*! @azure/msal-common v14.6.0 2024-01-09 */
6770
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
7252
6771
 
7253
6772
  /*
7254
6773
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7291,7 +6810,7 @@ class AuthorizationCodeClient extends BaseClient {
7291
6810
  if (!request.code) {
7292
6811
  throw createClientAuthError(requestCannotBeMade);
7293
6812
  }
7294
- const reqTimestamp = TimeUtils.nowSeconds();
6813
+ const reqTimestamp = nowSeconds();
7295
6814
  const response = await invokeAsync(this.executeTokenRequest.bind(this), PerformanceEvents.AuthClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(this.authority, request);
7296
6815
  // Retrieve requestId from response headers
7297
6816
  const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
@@ -7653,7 +7172,7 @@ class AuthorizationCodeClient extends BaseClient {
7653
7172
  }
7654
7173
  }
7655
7174
 
7656
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7175
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
7657
7176
 
7658
7177
  /*
7659
7178
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7670,7 +7189,7 @@ class RefreshTokenClient extends BaseClient {
7670
7189
  }
7671
7190
  async acquireToken(request) {
7672
7191
  this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId);
7673
- const reqTimestamp = TimeUtils.nowSeconds();
7192
+ const reqTimestamp = nowSeconds();
7674
7193
  const response = await invokeAsync(this.executeTokenRequest.bind(this), PerformanceEvents.RefreshTokenClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(request, this.authority);
7675
7194
  // Retrieve requestId from response headers
7676
7195
  const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
@@ -7731,7 +7250,7 @@ class RefreshTokenClient extends BaseClient {
7731
7250
  throw createInteractionRequiredAuthError(noTokensFound);
7732
7251
  }
7733
7252
  if (refreshToken.expiresOn &&
7734
- TimeUtils.isTokenExpired(refreshToken.expiresOn, request.refreshTokenExpirationOffsetSeconds ||
7253
+ isTokenExpired(refreshToken.expiresOn, request.refreshTokenExpirationOffsetSeconds ||
7735
7254
  DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS)) {
7736
7255
  throw createInteractionRequiredAuthError(refreshTokenExpired);
7737
7256
  }
@@ -7860,7 +7379,7 @@ class RefreshTokenClient extends BaseClient {
7860
7379
  }
7861
7380
  }
7862
7381
 
7863
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7382
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
7864
7383
 
7865
7384
  /*
7866
7385
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7931,14 +7450,14 @@ class SilentFlowClient extends BaseClient {
7931
7450
  this.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN, request.correlationId);
7932
7451
  throw createClientAuthError(tokenRefreshRequired);
7933
7452
  }
7934
- else if (TimeUtils.wasClockTurnedBack(cachedAccessToken.cachedAt) ||
7935
- TimeUtils.isTokenExpired(cachedAccessToken.expiresOn, this.config.systemOptions.tokenRenewalOffsetSeconds)) {
7453
+ else if (wasClockTurnedBack(cachedAccessToken.cachedAt) ||
7454
+ isTokenExpired(cachedAccessToken.expiresOn, this.config.systemOptions.tokenRenewalOffsetSeconds)) {
7936
7455
  // must refresh due to the expires_in value
7937
7456
  this.setCacheOutcome(CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED, request.correlationId);
7938
7457
  throw createClientAuthError(tokenRefreshRequired);
7939
7458
  }
7940
7459
  else if (cachedAccessToken.refreshOn &&
7941
- TimeUtils.isTokenExpired(cachedAccessToken.refreshOn, 0)) {
7460
+ isTokenExpired(cachedAccessToken.refreshOn, 0)) {
7942
7461
  // must refresh (in the background) due to the refresh_in value
7943
7462
  lastCacheOutcome = CacheOutcome.PROACTIVELY_REFRESHED;
7944
7463
  // don't throw ClientAuthError.createRefreshRequiredError(), return cached token instead
@@ -7991,7 +7510,7 @@ class SilentFlowClient extends BaseClient {
7991
7510
  }
7992
7511
  }
7993
7512
 
7994
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7513
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
7995
7514
 
7996
7515
  /*
7997
7516
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8006,7 +7525,7 @@ const StubbedNetworkModule = {
8006
7525
  },
8007
7526
  };
8008
7527
 
8009
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7528
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
8010
7529
  /*
8011
7530
  * Copyright (c) Microsoft Corporation. All rights reserved.
8012
7531
  * Licensed under the MIT License.
@@ -8014,7 +7533,7 @@ const StubbedNetworkModule = {
8014
7533
  const missingKidError = "missing_kid_error";
8015
7534
  const missingAlgError = "missing_alg_error";
8016
7535
 
8017
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7536
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
8018
7537
 
8019
7538
  /*
8020
7539
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8039,7 +7558,7 @@ function createJoseHeaderError(code) {
8039
7558
  return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
8040
7559
  }
8041
7560
 
8042
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7561
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
8043
7562
 
8044
7563
  /*
8045
7564
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8079,7 +7598,7 @@ class JoseHeader {
8079
7598
  }
8080
7599
  }
8081
7600
 
8082
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7601
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
8083
7602
 
8084
7603
  /*
8085
7604
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8137,7 +7656,7 @@ class AuthenticationHeaderParser {
8137
7656
  }
8138
7657
  }
8139
7658
 
8140
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7659
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
8141
7660
 
8142
7661
  /*
8143
7662
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8341,7 +7860,7 @@ class ServerTelemetryManager {
8341
7860
  }
8342
7861
  }
8343
7862
 
8344
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7863
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
8345
7864
 
8346
7865
  /*
8347
7866
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8420,7 +7939,7 @@ class StubPerformanceClient {
8420
7939
  }
8421
7940
  }
8422
7941
 
8423
- /*! @azure/msal-common v14.6.0 2024-01-09 */
7942
+ /*! @azure/msal-common v14.6.2-alpha.0 2024-01-30 */
8424
7943
 
8425
7944
  /*
8426
7945
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -9820,7 +9339,7 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
9820
9339
 
9821
9340
  /* eslint-disable header/header */
9822
9341
  const name = "@azure/msal-browser";
9823
- const version = "3.7.0";
9342
+ const version = "3.7.2-alpha.0";
9824
9343
 
9825
9344
  /*
9826
9345
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -10346,6 +9865,10 @@ const S256_HASH_ALG = "SHA-256";
10346
9865
  const MODULUS_LENGTH = 2048;
10347
9866
  // Public Exponent
10348
9867
  const PUBLIC_EXPONENT = new Uint8Array([0x01, 0x00, 0x01]);
9868
+ // UUID hex digits
9869
+ const UUID_CHARS = "0123456789abcdef";
9870
+ // Array to store UINT32 random value
9871
+ const UINT32_ARR = new Uint32Array(1);
10349
9872
  const keygenAlgorithmOptions = {
10350
9873
  name: PKCS1_V15_KEYGEN_ALG,
10351
9874
  hash: S256_HASH_ALG,
@@ -10366,7 +9889,9 @@ function validateCryptoAvailable(logger) {
10366
9889
  }
10367
9890
  /**
10368
9891
  * Returns a sha-256 hash of the given dataString as an ArrayBuffer.
10369
- * @param dataString
9892
+ * @param dataString {string} data string
9893
+ * @param performanceClient {?IPerformanceClient}
9894
+ * @param correlationId {?string} correlation id
10370
9895
  */
10371
9896
  async function sha256Digest(dataString, performanceClient, correlationId) {
10372
9897
  performanceClient?.addQueueMeasurement(PerformanceEvents.Sha256Digest, correlationId);
@@ -10382,11 +9907,54 @@ function getRandomValues(dataBuffer) {
10382
9907
  return window.crypto.getRandomValues(dataBuffer);
10383
9908
  }
10384
9909
  /**
10385
- * Creates a new random GUID
10386
- * @returns
9910
+ * Returns random Uint32 value.
9911
+ * @returns {number}
9912
+ */
9913
+ function getRandomUint32() {
9914
+ window.crypto.getRandomValues(UINT32_ARR);
9915
+ return UINT32_ARR[0];
9916
+ }
9917
+ /**
9918
+ * Creates a UUID v7 from the current timestamp.
9919
+ * Implementation relies on the system clock to guarantee increasing order of generated identifiers.
9920
+ * @returns {number}
10387
9921
  */
10388
9922
  function createNewGuid() {
10389
- return window.crypto.randomUUID();
9923
+ const currentTimestamp = Date.now();
9924
+ const baseRand = getRandomUint32() * 0x400 + (getRandomUint32() & 0x3ff);
9925
+ // Result byte array
9926
+ const bytes = new Uint8Array(16);
9927
+ // A 12-bit `rand_a` field value
9928
+ const randA = Math.trunc(baseRand / 2 ** 30);
9929
+ // The higher 30 bits of 62-bit `rand_b` field value
9930
+ const randBHi = baseRand & (2 ** 30 - 1);
9931
+ // The lower 32 bits of 62-bit `rand_b` field value
9932
+ const randBLo = getRandomUint32();
9933
+ bytes[0] = currentTimestamp / 2 ** 40;
9934
+ bytes[1] = currentTimestamp / 2 ** 32;
9935
+ bytes[2] = currentTimestamp / 2 ** 24;
9936
+ bytes[3] = currentTimestamp / 2 ** 16;
9937
+ bytes[4] = currentTimestamp / 2 ** 8;
9938
+ bytes[5] = currentTimestamp;
9939
+ bytes[6] = 0x70 | (randA >>> 8);
9940
+ bytes[7] = randA;
9941
+ bytes[8] = 0x80 | (randBHi >>> 24);
9942
+ bytes[9] = randBHi >>> 16;
9943
+ bytes[10] = randBHi >>> 8;
9944
+ bytes[11] = randBHi;
9945
+ bytes[12] = randBLo >>> 24;
9946
+ bytes[13] = randBLo >>> 16;
9947
+ bytes[14] = randBLo >>> 8;
9948
+ bytes[15] = randBLo;
9949
+ let text = "";
9950
+ for (let i = 0; i < bytes.length; i++) {
9951
+ text += UUID_CHARS.charAt(bytes[i] >>> 4);
9952
+ text += UUID_CHARS.charAt(bytes[i] & 0xf);
9953
+ if (i === 3 || i === 5 || i === 7 || i === 9) {
9954
+ text += "-";
9955
+ }
9956
+ }
9957
+ return text;
10390
9958
  }
10391
9959
  /**
10392
9960
  * Generates a keypair based on current keygen algorithm config.
@@ -12560,12 +12128,9 @@ class BaseInteractionClient {
12560
12128
  * Initializer function for all request APIs
12561
12129
  * @param request
12562
12130
  */
12563
- async initializeBaseRequest(request, account) {
12131
+ async initializeBaseRequest(request) {
12564
12132
  this.performanceClient.addQueueMeasurement(PerformanceEvents.InitializeBaseRequest, this.correlationId);
12565
12133
  const authority = request.authority || this.config.auth.authority;
12566
- if (account) {
12567
- await this.validateRequestAuthority(authority, account);
12568
- }
12569
12134
  const scopes = [...((request && request.scopes) || [])];
12570
12135
  const validatedRequest = {
12571
12136
  ...request,
@@ -12614,16 +12179,6 @@ class BaseInteractionClient {
12614
12179
  getCurrentUri();
12615
12180
  return UrlString.getAbsoluteUrl(redirectUri, getCurrentUri());
12616
12181
  }
12617
- /*
12618
- * If authority provided in the request does not match environment/authority specified
12619
- * in the account or MSAL config, we throw an error.
12620
- */
12621
- async validateRequestAuthority(authority, account) {
12622
- const discoveredAuthority = await this.getDiscoveredAuthority(authority);
12623
- if (!discoveredAuthority.isAlias(account.environment)) {
12624
- throw createClientConfigurationError(authorityMismatch);
12625
- }
12626
- }
12627
12182
  /**
12628
12183
  *
12629
12184
  * @param apiId
@@ -12645,22 +12200,30 @@ class BaseInteractionClient {
12645
12200
  /**
12646
12201
  * Used to get a discovered version of the default authority.
12647
12202
  * @param requestAuthority
12203
+ * @param requestAzureCloudOptions
12204
+ * @param account
12648
12205
  */
12649
- async getDiscoveredAuthority(requestAuthority) {
12650
- this.logger.verbose("getDiscoveredAuthority called");
12206
+ async getDiscoveredAuthority(requestAuthority, requestAzureCloudOptions, account) {
12207
+ this.performanceClient.addQueueMeasurement(PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.correlationId);
12651
12208
  const authorityOptions = {
12652
12209
  protocolMode: this.config.auth.protocolMode,
12653
12210
  OIDCOptions: this.config.auth.OIDCOptions,
12654
12211
  knownAuthorities: this.config.auth.knownAuthorities,
12655
12212
  cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,
12656
12213
  authorityMetadata: this.config.auth.authorityMetadata,
12214
+ skipAuthorityMetadataCache: this.config.auth.skipAuthorityMetadataCache,
12657
12215
  };
12658
- if (requestAuthority) {
12659
- this.logger.verbose("Creating discovered authority with request authority");
12660
- return AuthorityFactory.createDiscoveredInstance(requestAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions, this.logger);
12216
+ // build authority string based on auth params, precedence - azureCloudInstance + tenant >> authority
12217
+ const userAuthority = requestAuthority
12218
+ ? requestAuthority
12219
+ : this.config.auth.authority;
12220
+ // fall back to the authority from config
12221
+ const builtAuthority = Authority.generateAuthority(userAuthority, requestAzureCloudOptions || this.config.auth.azureCloudOptions);
12222
+ 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);
12223
+ if (account && !discoveredAuthority.isAlias(account.environment)) {
12224
+ throw createClientConfigurationError(authorityMismatch);
12661
12225
  }
12662
- this.logger.verbose("Creating discovered authority with configured authority");
12663
- return AuthorityFactory.createDiscoveredInstance(this.config.auth.authority, this.config.system.networkClient, this.browserStorage, authorityOptions, this.logger);
12226
+ return discoveredAuthority;
12664
12227
  }
12665
12228
  }
12666
12229
 
@@ -12833,10 +12396,10 @@ class StandardInteractionClient extends BaseInteractionClient {
12833
12396
  * @param serverTelemetryManager
12834
12397
  * @param authorityUrl
12835
12398
  */
12836
- async createAuthCodeClient(serverTelemetryManager, authorityUrl, requestAzureCloudOptions) {
12399
+ async createAuthCodeClient(serverTelemetryManager, authorityUrl, requestAzureCloudOptions, account) {
12837
12400
  this.performanceClient.addQueueMeasurement(PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.correlationId);
12838
12401
  // Create auth module.
12839
- const clientConfig = await invokeAsync(this.getClientConfiguration.bind(this), PerformanceEvents.StandardInteractionClientGetClientConfiguration, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, authorityUrl, requestAzureCloudOptions);
12402
+ const clientConfig = await invokeAsync(this.getClientConfiguration.bind(this), PerformanceEvents.StandardInteractionClientGetClientConfiguration, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, authorityUrl, requestAzureCloudOptions, account);
12840
12403
  return new AuthorizationCodeClient(clientConfig, this.performanceClient);
12841
12404
  }
12842
12405
  /**
@@ -12845,9 +12408,9 @@ class StandardInteractionClient extends BaseInteractionClient {
12845
12408
  * @param requestAuthority
12846
12409
  * @param requestCorrelationId
12847
12410
  */
12848
- async getClientConfiguration(serverTelemetryManager, requestAuthority, requestAzureCloudOptions) {
12411
+ async getClientConfiguration(serverTelemetryManager, requestAuthority, requestAzureCloudOptions, account) {
12849
12412
  this.performanceClient.addQueueMeasurement(PerformanceEvents.StandardInteractionClientGetClientConfiguration, this.correlationId);
12850
- const discoveredAuthority = await invokeAsync(this.getDiscoveredAuthority.bind(this), PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, this.correlationId)(requestAuthority, requestAzureCloudOptions);
12413
+ const discoveredAuthority = await invokeAsync(this.getDiscoveredAuthority.bind(this), PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, this.correlationId)(requestAuthority, requestAzureCloudOptions, account);
12851
12414
  const logger = this.config.system.loggerOptions;
12852
12415
  return {
12853
12416
  authOptions: {
@@ -12881,29 +12444,6 @@ class StandardInteractionClient extends BaseInteractionClient {
12881
12444
  telemetry: this.config.telemetry,
12882
12445
  };
12883
12446
  }
12884
- /**
12885
- * Used to get a discovered version of the default authority.
12886
- * @param requestAuthority
12887
- * @param requestCorrelationId
12888
- */
12889
- async getDiscoveredAuthority(requestAuthority, requestAzureCloudOptions) {
12890
- this.performanceClient.addQueueMeasurement(PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.correlationId);
12891
- const authorityOptions = {
12892
- protocolMode: this.config.auth.protocolMode,
12893
- OIDCOptions: this.config.auth.OIDCOptions,
12894
- knownAuthorities: this.config.auth.knownAuthorities,
12895
- cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,
12896
- authorityMetadata: this.config.auth.authorityMetadata,
12897
- skipAuthorityMetadataCache: this.config.auth.skipAuthorityMetadataCache,
12898
- };
12899
- // build authority string based on auth params, precedence - azureCloudInstance + tenant >> authority
12900
- const userAuthority = requestAuthority
12901
- ? requestAuthority
12902
- : this.config.auth.authority;
12903
- // fall back to the authority from config
12904
- const builtAuthority = Authority.generateAuthority(userAuthority, requestAzureCloudOptions || this.config.auth.azureCloudOptions);
12905
- 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);
12906
- }
12907
12447
  /**
12908
12448
  * Helper to initialize required request parameters for interactive APIs and ssoSilent()
12909
12449
  * @param request
@@ -13035,7 +12575,7 @@ class SilentCacheClient extends StandardInteractionClient {
13035
12575
  this.performanceClient.addQueueMeasurement(PerformanceEvents.SilentCacheClientAcquireToken, silentRequest.correlationId);
13036
12576
  // Telemetry manager only used to increment cacheHits here
13037
12577
  const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenSilent_silentFlow);
13038
- const silentAuthClient = await this.createSilentFlowClient(serverTelemetryManager, silentRequest.authority, silentRequest.azureCloudOptions);
12578
+ const silentAuthClient = await this.createSilentFlowClient(serverTelemetryManager, silentRequest.authority, silentRequest.azureCloudOptions, silentRequest.account);
13039
12579
  this.logger.verbose("Silent auth client created");
13040
12580
  try {
13041
12581
  const response = await invokeAsync(silentAuthClient.acquireCachedToken.bind(silentAuthClient), PerformanceEvents.SilentFlowClientAcquireCachedToken, this.logger, this.performanceClient, silentRequest.correlationId)(silentRequest);
@@ -13067,14 +12607,14 @@ class SilentCacheClient extends StandardInteractionClient {
13067
12607
  * @param serverTelemetryManager
13068
12608
  * @param authorityUrl
13069
12609
  */
13070
- async createSilentFlowClient(serverTelemetryManager, authorityUrl, azureCloudOptions) {
12610
+ async createSilentFlowClient(serverTelemetryManager, authorityUrl, azureCloudOptions, account) {
13071
12611
  // Create auth module.
13072
- const clientConfig = await invokeAsync(this.getClientConfiguration.bind(this), PerformanceEvents.StandardInteractionClientGetClientConfiguration, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, authorityUrl, azureCloudOptions);
12612
+ const clientConfig = await invokeAsync(this.getClientConfiguration.bind(this), PerformanceEvents.StandardInteractionClientGetClientConfiguration, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, authorityUrl, azureCloudOptions, account);
13073
12613
  return new SilentFlowClient(clientConfig, this.performanceClient);
13074
12614
  }
13075
12615
  async initializeSilentRequest(request, account) {
13076
12616
  this.performanceClient.addQueueMeasurement(PerformanceEvents.InitializeSilentRequest, this.correlationId);
13077
- const baseRequest = await invokeAsync(this.initializeBaseRequest.bind(this), PerformanceEvents.InitializeBaseRequest, this.logger, this.performanceClient, this.correlationId)(request, account);
12617
+ const baseRequest = await invokeAsync(this.initializeBaseRequest.bind(this), PerformanceEvents.InitializeBaseRequest, this.logger, this.performanceClient, this.correlationId)(request);
13078
12618
  return {
13079
12619
  ...request,
13080
12620
  ...baseRequest,
@@ -13110,7 +12650,7 @@ class NativeInteractionClient extends BaseInteractionClient {
13110
12650
  this.logger.trace("NativeInteractionClient - acquireToken called.");
13111
12651
  // start the perf measurement
13112
12652
  const nativeATMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.NativeInteractionClientAcquireToken, request.correlationId);
13113
- const reqTimestamp = TimeUtils.nowSeconds();
12653
+ const reqTimestamp = nowSeconds();
13114
12654
  // initialize native request
13115
12655
  const nativeRequest = await this.initializeNativeRequest(request);
13116
12656
  // check if the tokens can be retrieved from internal cache
@@ -13259,7 +12799,7 @@ class NativeInteractionClient extends BaseInteractionClient {
13259
12799
  method: NativeExtensionMethod.GetToken,
13260
12800
  request: request,
13261
12801
  };
13262
- const reqTimestamp = TimeUtils.nowSeconds();
12802
+ const reqTimestamp = nowSeconds();
13263
12803
  try {
13264
12804
  this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");
13265
12805
  const response = await this.nativeMessageHandler.sendMessage(messageBody);
@@ -13530,7 +13070,8 @@ class NativeInteractionClient extends BaseInteractionClient {
13530
13070
  this.logger.trace("NativeInteractionClient - initializeNativeRequest called");
13531
13071
  const authority = request.authority || this.config.auth.authority;
13532
13072
  if (request.account) {
13533
- await this.validateRequestAuthority(authority, request.account);
13073
+ // validate authority
13074
+ await this.getDiscoveredAuthority(authority, request.azureCloudOptions, request.account);
13534
13075
  }
13535
13076
  const canonicalAuthority = new UrlString(authority);
13536
13077
  canonicalAuthority.validateAsUri();
@@ -14095,7 +13636,7 @@ class PopupClient extends StandardInteractionClient {
14095
13636
  // Create auth code request and generate PKCE params
14096
13637
  const authCodeRequest = await invokeAsync(this.initializeAuthorizationCodeRequest.bind(this), PerformanceEvents.StandardInteractionClientInitializeAuthorizationCodeRequest, this.logger, this.performanceClient, this.correlationId)(validRequest);
14097
13638
  // Initialize the client
14098
- const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, validRequest.authority, validRequest.azureCloudOptions);
13639
+ const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, validRequest.authority, validRequest.azureCloudOptions, validRequest.account);
14099
13640
  const isNativeBroker = NativeMessageHandler.isNativeAvailable(this.config, this.logger, this.nativeMessageHandler, request.authenticationScheme);
14100
13641
  // Start measurement for server calls with native brokering enabled
14101
13642
  let fetchNativeAccountIdMeasurement;
@@ -14176,7 +13717,8 @@ class PopupClient extends StandardInteractionClient {
14176
13717
  // Clear cache on logout
14177
13718
  await this.clearCacheOnLogout(validRequest.account);
14178
13719
  // Initialize the client
14179
- const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, requestAuthority);
13720
+ const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, requestAuthority, undefined, // AzureCloudOptions
13721
+ validRequest.account || undefined);
14180
13722
  try {
14181
13723
  authClient.authority.endSessionEndpoint;
14182
13724
  }
@@ -14608,7 +14150,7 @@ class RedirectClient extends StandardInteractionClient {
14608
14150
  // Create auth code request and generate PKCE params
14609
14151
  const authCodeRequest = await invokeAsync(this.initializeAuthorizationCodeRequest.bind(this), PerformanceEvents.StandardInteractionClientInitializeAuthorizationCodeRequest, this.logger, this.performanceClient, this.correlationId)(validRequest);
14610
14152
  // Initialize the client
14611
- const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, validRequest.authority, validRequest.azureCloudOptions);
14153
+ const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, validRequest.authority, validRequest.azureCloudOptions, validRequest.account);
14612
14154
  // Create redirect interaction handler.
14613
14155
  const interactionHandler = new RedirectHandler(authClient, this.browserStorage, authCodeRequest, this.logger, this.performanceClient);
14614
14156
  // Create acquire token url.
@@ -14826,7 +14368,8 @@ class RedirectClient extends StandardInteractionClient {
14826
14368
  timeout: this.config.system.redirectNavigationTimeout,
14827
14369
  noHistory: false,
14828
14370
  };
14829
- const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, logoutRequest && logoutRequest.authority);
14371
+ const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, logoutRequest && logoutRequest.authority, undefined, // AzureCloudOptions
14372
+ (logoutRequest && logoutRequest.account) || undefined);
14830
14373
  if (authClient.authority.protocolMode === ProtocolMode.OIDC) {
14831
14374
  try {
14832
14375
  authClient.authority.endSessionEndpoint;
@@ -15062,7 +14605,7 @@ class SilentIframeClient extends StandardInteractionClient {
15062
14605
  const serverTelemetryManager = this.initializeServerTelemetryManager(this.apiId);
15063
14606
  try {
15064
14607
  // Initialize the client
15065
- const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, request.correlationId)(serverTelemetryManager, silentRequest.authority, silentRequest.azureCloudOptions);
14608
+ const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), PerformanceEvents.StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, request.correlationId)(serverTelemetryManager, silentRequest.authority, silentRequest.azureCloudOptions, silentRequest.account);
15066
14609
  return await invokeAsync(this.silentTokenHelper.bind(this), PerformanceEvents.SilentIframeClientTokenHelper, this.logger, this.performanceClient, request.correlationId)(authClient, silentRequest);
15067
14610
  }
15068
14611
  catch (e) {
@@ -15133,7 +14676,7 @@ class SilentRefreshClient extends StandardInteractionClient {
15133
14676
  */
15134
14677
  async acquireToken(request) {
15135
14678
  this.performanceClient.addQueueMeasurement(PerformanceEvents.SilentRefreshClientAcquireToken, request.correlationId);
15136
- const baseRequest = await invokeAsync(this.initializeBaseRequest.bind(this), PerformanceEvents.InitializeBaseRequest, this.logger, this.performanceClient, request.correlationId)(request, request.account);
14679
+ const baseRequest = await invokeAsync(this.initializeBaseRequest.bind(this), PerformanceEvents.InitializeBaseRequest, this.logger, this.performanceClient, request.correlationId)(request);
15137
14680
  const silentRequest = {
15138
14681
  ...request,
15139
14682
  ...baseRequest,
@@ -15143,7 +14686,7 @@ class SilentRefreshClient extends StandardInteractionClient {
15143
14686
  silentRequest.redirectUri = this.getRedirectUri(request.redirectUri);
15144
14687
  }
15145
14688
  const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenSilent_silentFlow);
15146
- const refreshTokenClient = await this.createRefreshTokenClient(serverTelemetryManager, silentRequest.authority, silentRequest.azureCloudOptions);
14689
+ const refreshTokenClient = await this.createRefreshTokenClient(serverTelemetryManager, silentRequest.authority, silentRequest.azureCloudOptions, silentRequest.account);
15147
14690
  // Send request to renew token. Auth module will throw errors if token cannot be renewed.
15148
14691
  return invokeAsync(refreshTokenClient.acquireTokenByRefreshToken.bind(refreshTokenClient), PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken, this.logger, this.performanceClient, request.correlationId)(silentRequest).catch((e) => {
15149
14692
  e.setCorrelationId(this.correlationId);
@@ -15163,9 +14706,9 @@ class SilentRefreshClient extends StandardInteractionClient {
15163
14706
  * @param serverTelemetryManager
15164
14707
  * @param authorityUrl
15165
14708
  */
15166
- async createRefreshTokenClient(serverTelemetryManager, authorityUrl, azureCloudOptions) {
14709
+ async createRefreshTokenClient(serverTelemetryManager, authorityUrl, azureCloudOptions, account) {
15167
14710
  // Create auth module.
15168
- const clientConfig = await invokeAsync(this.getClientConfiguration.bind(this), PerformanceEvents.StandardInteractionClientGetClientConfiguration, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, authorityUrl, azureCloudOptions);
14711
+ const clientConfig = await invokeAsync(this.getClientConfiguration.bind(this), PerformanceEvents.StandardInteractionClientGetClientConfiguration, this.logger, this.performanceClient, this.correlationId)(serverTelemetryManager, authorityUrl, azureCloudOptions, account);
15169
14712
  return new RefreshTokenClient(clientConfig, this.performanceClient);
15170
14713
  }
15171
14714
  }
@@ -15215,7 +14758,7 @@ class TokenCache {
15215
14758
  authorityMetadata: this.config.auth.authorityMetadata,
15216
14759
  skipAuthorityMetadataCache: this.config.auth.skipAuthorityMetadataCache,
15217
14760
  };
15218
- authority = new Authority(authorityUrl, this.config.system.networkClient, this.storage, authorityOptions, this.logger);
14761
+ authority = new Authority(authorityUrl, this.config.system.networkClient, this.storage, authorityOptions, this.logger, request.correlationId || createNewGuid());
15219
14762
  // "clientInfo" from options takes precedence over "clientInfo" in response
15220
14763
  if (options.clientInfo) {
15221
14764
  this.logger.trace("TokenCache - homeAccountId from options");
@@ -15432,7 +14975,7 @@ class SilentAuthCodeClient extends StandardInteractionClient {
15432
14975
  code: request.code,
15433
14976
  };
15434
14977
  // Initialize the client
15435
- const clientConfig = await invokeAsync(this.getClientConfiguration.bind(this), PerformanceEvents.StandardInteractionClientGetClientConfiguration, this.logger, this.performanceClient, request.correlationId)(serverTelemetryManager, silentRequest.authority);
14978
+ const clientConfig = await invokeAsync(this.getClientConfiguration.bind(this), PerformanceEvents.StandardInteractionClientGetClientConfiguration, this.logger, this.performanceClient, request.correlationId)(serverTelemetryManager, silentRequest.authority, silentRequest.azureCloudOptions, silentRequest.account);
15436
14979
  const authClient = new HybridSpaAuthorizationCodeClient(clientConfig);
15437
14980
  this.logger.verbose("Auth code client created");
15438
14981
  // Create silent handler
@@ -16648,13 +16191,19 @@ class StandardController {
16648
16191
  throw error;
16649
16192
  });
16650
16193
  this.activeSilentTokenRequests.set(silentRequestKey, response);
16651
- return response;
16194
+ return {
16195
+ ...(await response),
16196
+ state: request.state,
16197
+ };
16652
16198
  }
16653
16199
  else {
16654
16200
  this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call", correlationId);
16655
16201
  // Discard measurements for memoized calls, as they are usually only a couple of ms and will artificially deflate metrics
16656
16202
  atsMeasurement.discard();
16657
- return cachedResponse;
16203
+ return {
16204
+ ...(await cachedResponse),
16205
+ state: request.state,
16206
+ };
16658
16207
  }
16659
16208
  }
16660
16209
  /**
@@ -18462,7 +18011,7 @@ class NestedAppAuthController {
18462
18011
  atPopupMeasurement?.add({ nestedAppAuthRequest: true });
18463
18012
  try {
18464
18013
  const naaRequest = this.nestedAppAuthAdapter.toNaaTokenRequest(request);
18465
- const reqTimestamp = TimeUtils.nowSeconds();
18014
+ const reqTimestamp = nowSeconds();
18466
18015
  const response = await this.bridgeProxy.getTokenInteractive(naaRequest);
18467
18016
  const result = this.nestedAppAuthAdapter.fromNaaTokenResponse(naaRequest, response, reqTimestamp);
18468
18017
  this.operatingContext.setActiveAccount(result.account);
@@ -18499,7 +18048,7 @@ class NestedAppAuthController {
18499
18048
  });
18500
18049
  try {
18501
18050
  const naaRequest = this.nestedAppAuthAdapter.toNaaTokenRequest(request);
18502
- const reqTimestamp = TimeUtils.nowSeconds();
18051
+ const reqTimestamp = nowSeconds();
18503
18052
  const response = await this.bridgeProxy.getTokenSilent(naaRequest);
18504
18053
  const result = this.nestedAppAuthAdapter.fromNaaTokenResponse(naaRequest, response, reqTimestamp);
18505
18054
  this.operatingContext.setActiveAccount(result.account);