@azure/msal-browser 2.25.0 → 2.26.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 (84) hide show
  1. package/README.md +1 -1
  2. package/dist/_virtual/_tslib.js +1 -1
  3. package/dist/app/ClientApplication.d.ts +10 -6
  4. package/dist/app/ClientApplication.d.ts.map +1 -1
  5. package/dist/app/ClientApplication.js +31 -12
  6. package/dist/app/ClientApplication.js.map +1 -1
  7. package/dist/app/IPublicClientApplication.js +1 -1
  8. package/dist/app/PublicClientApplication.d.ts.map +1 -1
  9. package/dist/app/PublicClientApplication.js +9 -3
  10. package/dist/app/PublicClientApplication.js.map +1 -1
  11. package/dist/broker/nativeBroker/NativeMessageHandler.js +1 -1
  12. package/dist/broker/nativeBroker/NativeResponse.d.ts +26 -1
  13. package/dist/broker/nativeBroker/NativeResponse.d.ts.map +1 -1
  14. package/dist/cache/AsyncMemoryStorage.js +1 -1
  15. package/dist/cache/BrowserCacheManager.js +1 -1
  16. package/dist/cache/BrowserStorage.js +1 -1
  17. package/dist/cache/DatabaseStorage.js +1 -1
  18. package/dist/cache/MemoryStorage.js +1 -1
  19. package/dist/cache/TokenCache.js +3 -3
  20. package/dist/cache/TokenCache.js.map +1 -1
  21. package/dist/config/Configuration.js +1 -1
  22. package/dist/crypto/BrowserCrypto.js +1 -1
  23. package/dist/crypto/CryptoOps.js +1 -1
  24. package/dist/crypto/GuidGenerator.js +1 -1
  25. package/dist/crypto/PkceGenerator.js +1 -1
  26. package/dist/crypto/SignedHttpRequest.js +1 -1
  27. package/dist/encode/Base64Decode.js +1 -1
  28. package/dist/encode/Base64Encode.js +1 -1
  29. package/dist/error/BrowserAuthError.d.ts +1 -1
  30. package/dist/error/BrowserAuthError.js +3 -3
  31. package/dist/error/BrowserAuthError.js.map +1 -1
  32. package/dist/error/BrowserConfigurationAuthError.js +1 -1
  33. package/dist/error/NativeAuthError.js +1 -1
  34. package/dist/event/EventHandler.js +1 -1
  35. package/dist/event/EventMessage.js +1 -1
  36. package/dist/event/EventType.js +1 -1
  37. package/dist/index.cjs.js +183 -118
  38. package/dist/index.cjs.js.map +1 -1
  39. package/dist/index.js +1 -1
  40. package/dist/interaction_client/BaseInteractionClient.js +1 -1
  41. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +1 -1
  42. package/dist/interaction_client/NativeInteractionClient.d.ts +12 -0
  43. package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
  44. package/dist/interaction_client/NativeInteractionClient.js +37 -6
  45. package/dist/interaction_client/NativeInteractionClient.js.map +1 -1
  46. package/dist/interaction_client/PopupClient.js +1 -1
  47. package/dist/interaction_client/RedirectClient.js +1 -1
  48. package/dist/interaction_client/SilentAuthCodeClient.js +1 -1
  49. package/dist/interaction_client/SilentCacheClient.d.ts.map +1 -1
  50. package/dist/interaction_client/SilentCacheClient.js +4 -2
  51. package/dist/interaction_client/SilentCacheClient.js.map +1 -1
  52. package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
  53. package/dist/interaction_client/SilentIframeClient.js +3 -1
  54. package/dist/interaction_client/SilentIframeClient.js.map +1 -1
  55. package/dist/interaction_client/SilentRefreshClient.d.ts.map +1 -1
  56. package/dist/interaction_client/SilentRefreshClient.js +3 -1
  57. package/dist/interaction_client/SilentRefreshClient.js.map +1 -1
  58. package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  59. package/dist/interaction_client/StandardInteractionClient.js +3 -1
  60. package/dist/interaction_client/StandardInteractionClient.js.map +1 -1
  61. package/dist/interaction_handler/InteractionHandler.js +1 -1
  62. package/dist/interaction_handler/RedirectHandler.js +1 -1
  63. package/dist/interaction_handler/SilentHandler.js +1 -1
  64. package/dist/internals.js +1 -1
  65. package/dist/navigation/NavigationClient.js +1 -1
  66. package/dist/network/FetchClient.js +1 -1
  67. package/dist/network/XhrClient.js +1 -1
  68. package/dist/packageMetadata.d.ts +1 -1
  69. package/dist/packageMetadata.js +2 -2
  70. package/dist/packageMetadata.js.map +1 -1
  71. package/dist/telemetry/BrowserPerformanceClient.js +1 -1
  72. package/dist/telemetry/BrowserPerformanceMeasurement.js +1 -1
  73. package/dist/utils/BrowserConstants.d.ts +1 -0
  74. package/dist/utils/BrowserConstants.d.ts.map +1 -1
  75. package/dist/utils/BrowserConstants.js +3 -2
  76. package/dist/utils/BrowserConstants.js.map +1 -1
  77. package/dist/utils/BrowserProtocolUtils.js +1 -1
  78. package/dist/utils/BrowserStringUtils.js +1 -1
  79. package/dist/utils/BrowserUtils.js +1 -1
  80. package/dist/utils/MathUtils.js +1 -1
  81. package/lib/msal-browser.js +183 -118
  82. package/lib/msal-browser.js.map +1 -1
  83. package/lib/msal-browser.min.js +32 -32
  84. package/package.json +2 -2
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.25.0 2022-06-06 */
1
+ /*! @azure/msal-browser v2.26.0 2022-06-13 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
@@ -105,7 +105,7 @@ function __spread() {
105
105
  return ar;
106
106
  }
107
107
 
108
- /*! @azure/msal-common v6.4.0 2022-06-06 */
108
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
109
109
  /*! *****************************************************************************
110
110
  Copyright (c) Microsoft Corporation.
111
111
 
@@ -192,7 +192,7 @@ function __spreadArrays() {
192
192
  return r;
193
193
  }
194
194
 
195
- /*! @azure/msal-common v6.4.0 2022-06-06 */
195
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
196
196
 
197
197
  /*
198
198
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -566,7 +566,7 @@ var JsonTypes;
566
566
  JsonTypes["Jwk"] = "JWK";
567
567
  })(JsonTypes || (JsonTypes = {}));
568
568
 
569
- /*! @azure/msal-common v6.4.0 2022-06-06 */
569
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
570
570
 
571
571
  /*
572
572
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -610,7 +610,7 @@ var AuthError = /** @class */ (function (_super) {
610
610
  return AuthError;
611
611
  }(Error));
612
612
 
613
- /*! @azure/msal-common v6.4.0 2022-06-06 */
613
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
614
614
 
615
615
  /*
616
616
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -685,7 +685,7 @@ var DEFAULT_CRYPTO_IMPLEMENTATION = {
685
685
  }
686
686
  };
687
687
 
688
- /*! @azure/msal-common v6.4.0 2022-06-06 */
688
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
689
689
 
690
690
  /*
691
691
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1157,7 +1157,7 @@ var ClientAuthError = /** @class */ (function (_super) {
1157
1157
  return ClientAuthError;
1158
1158
  }(AuthError));
1159
1159
 
1160
- /*! @azure/msal-common v6.4.0 2022-06-06 */
1160
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
1161
1161
 
1162
1162
  /*
1163
1163
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1282,7 +1282,7 @@ var StringUtils = /** @class */ (function () {
1282
1282
  return StringUtils;
1283
1283
  }());
1284
1284
 
1285
- /*! @azure/msal-common v6.4.0 2022-06-06 */
1285
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
1286
1286
 
1287
1287
  /*
1288
1288
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1462,12 +1462,12 @@ var Logger = /** @class */ (function () {
1462
1462
  return Logger;
1463
1463
  }());
1464
1464
 
1465
- /*! @azure/msal-common v6.4.0 2022-06-06 */
1465
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
1466
1466
  /* eslint-disable header/header */
1467
1467
  var name$1 = "@azure/msal-common";
1468
- var version$1 = "6.4.0";
1468
+ var version$1 = "7.0.0";
1469
1469
 
1470
- /*! @azure/msal-common v6.4.0 2022-06-06 */
1470
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
1471
1471
  /*
1472
1472
  * Copyright (c) Microsoft Corporation. All rights reserved.
1473
1473
  * Licensed under the MIT License.
@@ -1488,7 +1488,7 @@ exports.AzureCloudInstance = void 0;
1488
1488
  AzureCloudInstance["AzureUsGovernment"] = "https://login.microsoftonline.us";
1489
1489
  })(exports.AzureCloudInstance || (exports.AzureCloudInstance = {}));
1490
1490
 
1491
- /*! @azure/msal-common v6.4.0 2022-06-06 */
1491
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
1492
1492
 
1493
1493
  /*
1494
1494
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1511,9 +1511,9 @@ exports.AzureCloudInstance = void 0;
1511
1511
  * familyId: Family ID identifier, usually only used for refresh tokens
1512
1512
  * realm: Full tenant or organizational identifier that the account belongs to
1513
1513
  * target: Permissions that are included in the token, or for refresh tokens, the resource identifier.
1514
- * oboAssertion: access token passed in as part of OBO request
1515
1514
  * tokenType: Matches the authentication scheme for which the token was issued (i.e. Bearer or pop)
1516
1515
  * requestedClaimsHash: Matches the SHA 256 hash of the claims object included in the token request
1516
+ * userAssertionHash: Matches the SHA 256 hash of the obo_assertion for the OBO flow
1517
1517
  * }
1518
1518
  */
1519
1519
  var CredentialEntity = /** @class */ (function () {
@@ -1647,7 +1647,7 @@ var CredentialEntity = /** @class */ (function () {
1647
1647
  return CredentialEntity;
1648
1648
  }());
1649
1649
 
1650
- /*! @azure/msal-common v6.4.0 2022-06-06 */
1650
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
1651
1651
 
1652
1652
  /*
1653
1653
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1902,7 +1902,7 @@ var ClientConfigurationError = /** @class */ (function (_super) {
1902
1902
  return ClientConfigurationError;
1903
1903
  }(ClientAuthError));
1904
1904
 
1905
- /*! @azure/msal-common v6.4.0 2022-06-06 */
1905
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
1906
1906
 
1907
1907
  /*
1908
1908
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2086,7 +2086,7 @@ var ScopeSet = /** @class */ (function () {
2086
2086
  return ScopeSet;
2087
2087
  }());
2088
2088
 
2089
- /*! @azure/msal-common v6.4.0 2022-06-06 */
2089
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
2090
2090
 
2091
2091
  /*
2092
2092
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2124,7 +2124,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
2124
2124
  };
2125
2125
  }
2126
2126
 
2127
- /*! @azure/msal-common v6.4.0 2022-06-06 */
2127
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
2128
2128
  /*
2129
2129
  * Copyright (c) Microsoft Corporation. All rights reserved.
2130
2130
  * Licensed under the MIT License.
@@ -2138,7 +2138,7 @@ var AuthorityType;
2138
2138
  AuthorityType[AuthorityType["Adfs"] = 1] = "Adfs";
2139
2139
  })(AuthorityType || (AuthorityType = {}));
2140
2140
 
2141
- /*! @azure/msal-common v6.4.0 2022-06-06 */
2141
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
2142
2142
 
2143
2143
  /*
2144
2144
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2163,7 +2163,6 @@ var AuthorityType;
2163
2163
  * clientInfo: Full base64 encoded client info received from ESTS
2164
2164
  * lastModificationTime: last time this entity was modified in the cache
2165
2165
  * lastModificationApp:
2166
- * oboAssertion: access token passed in as part of OBO request
2167
2166
  * idTokenClaims: Object containing claims parsed from ID token
2168
2167
  * nativeAccountId: Account identifier on the native device
2169
2168
  * }
@@ -2242,7 +2241,7 @@ var AccountEntity = /** @class */ (function () {
2242
2241
  * @param idToken
2243
2242
  * @param policy
2244
2243
  */
2245
- AccountEntity.createAccount = function (clientInfo, homeAccountId, idToken, authority, oboAssertion, cloudGraphHostName, msGraphHost, environment, nativeAccountId) {
2244
+ AccountEntity.createAccount = function (clientInfo, homeAccountId, idToken, authority, cloudGraphHostName, msGraphHost, environment, nativeAccountId) {
2246
2245
  var _a, _b, _c, _d, _e, _f;
2247
2246
  var account = new AccountEntity();
2248
2247
  account.authorityType = CacheAccountType.MSSTS_ACCOUNT_TYPE;
@@ -2256,7 +2255,6 @@ var AccountEntity = /** @class */ (function () {
2256
2255
  account.environment = env;
2257
2256
  // non AAD scenarios can have empty realm
2258
2257
  account.realm = ((_a = idToken === null || idToken === void 0 ? void 0 : idToken.claims) === null || _a === void 0 ? void 0 : _a.tid) || Constants.EMPTY_STRING;
2259
- account.oboAssertion = oboAssertion;
2260
2258
  if (idToken) {
2261
2259
  account.idTokenClaims = idToken.claims;
2262
2260
  // How do you account for MSA CID here?
@@ -2277,14 +2275,13 @@ var AccountEntity = /** @class */ (function () {
2277
2275
  * @param authority
2278
2276
  * @param idToken
2279
2277
  */
2280
- AccountEntity.createGenericAccount = function (homeAccountId, idToken, authority, oboAssertion, cloudGraphHostName, msGraphHost, environment) {
2278
+ AccountEntity.createGenericAccount = function (homeAccountId, idToken, authority, cloudGraphHostName, msGraphHost, environment) {
2281
2279
  var _a, _b, _c, _d;
2282
2280
  var account = new AccountEntity();
2283
2281
  account.authorityType = (authority && authority.authorityType === AuthorityType.Adfs) ? CacheAccountType.ADFS_ACCOUNT_TYPE : CacheAccountType.GENERIC_ACCOUNT_TYPE;
2284
2282
  account.homeAccountId = homeAccountId;
2285
2283
  // non AAD scenarios can have empty realm
2286
2284
  account.realm = Constants.EMPTY_STRING;
2287
- account.oboAssertion = oboAssertion;
2288
2285
  var env = environment || authority && authority.getPreferredCache();
2289
2286
  if (!env) {
2290
2287
  throw ClientAuthError.createInvalidCacheEnvironmentError();
@@ -2376,7 +2373,7 @@ var AccountEntity = /** @class */ (function () {
2376
2373
  return AccountEntity;
2377
2374
  }());
2378
2375
 
2379
- /*! @azure/msal-common v6.4.0 2022-06-06 */
2376
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
2380
2377
 
2381
2378
  /*
2382
2379
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2414,7 +2411,7 @@ var AuthToken = /** @class */ (function () {
2414
2411
  return AuthToken;
2415
2412
  }());
2416
2413
 
2417
- /*! @azure/msal-common v6.4.0 2022-06-06 */
2414
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
2418
2415
 
2419
2416
  /*
2420
2417
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2577,7 +2574,7 @@ var CacheManager = /** @class */ (function () {
2577
2574
  * @param target
2578
2575
  */
2579
2576
  CacheManager.prototype.getCredentialsFilteredBy = function (filter) {
2580
- return this.getCredentialsFilteredByInternal(filter.homeAccountId, filter.environment, filter.credentialType, filter.clientId, filter.familyId, filter.realm, filter.target, filter.oboAssertion, filter.tokenType, filter.keyId, filter.requestedClaimsHash);
2577
+ return this.getCredentialsFilteredByInternal(filter.homeAccountId, filter.environment, filter.credentialType, filter.clientId, filter.familyId, filter.realm, filter.target, filter.userAssertionHash, filter.tokenType, filter.keyId, filter.requestedClaimsHash);
2581
2578
  };
2582
2579
  /**
2583
2580
  * Support function to help match credentials
@@ -2587,10 +2584,10 @@ var CacheManager = /** @class */ (function () {
2587
2584
  * @param clientId
2588
2585
  * @param realm
2589
2586
  * @param target
2590
- * @param oboAssertion
2587
+ * @param userAssertionHash
2591
2588
  * @param tokenType
2592
2589
  */
2593
- CacheManager.prototype.getCredentialsFilteredByInternal = function (homeAccountId, environment, credentialType, clientId, familyId, realm, target, oboAssertion, tokenType, keyId, requestedClaimsHash) {
2590
+ CacheManager.prototype.getCredentialsFilteredByInternal = function (homeAccountId, environment, credentialType, clientId, familyId, realm, target, userAssertionHash, tokenType, keyId, requestedClaimsHash) {
2594
2591
  var _this = this;
2595
2592
  var allCacheKeys = this.getKeys();
2596
2593
  var matchingCredentials = {
@@ -2609,7 +2606,7 @@ var CacheManager = /** @class */ (function () {
2609
2606
  if (!entity) {
2610
2607
  return;
2611
2608
  }
2612
- if (!!oboAssertion && !_this.matchOboAssertion(entity, oboAssertion)) {
2609
+ if (!!userAssertionHash && !_this.matchUserAssertionHash(entity, userAssertionHash)) {
2613
2610
  return;
2614
2611
  }
2615
2612
  if (!!homeAccountId && !_this.matchHomeAccountId(entity, homeAccountId)) {
@@ -2940,7 +2937,7 @@ var CacheManager = /** @class */ (function () {
2940
2937
  target: scopes.printScopesLowerCase(),
2941
2938
  tokenType: authScheme,
2942
2939
  keyId: request.sshKid,
2943
- requestedClaimsHash: request.requestedClaimsHash
2940
+ requestedClaimsHash: request.requestedClaimsHash,
2944
2941
  };
2945
2942
  var credentialCache = this.getCredentialsFilteredBy(accessTokenFilter);
2946
2943
  var accessTokens = Object.keys(credentialCache.accessTokens).map(function (key) { return credentialCache.accessTokens[key]; });
@@ -2966,7 +2963,7 @@ var CacheManager = /** @class */ (function () {
2966
2963
  environment: account.environment,
2967
2964
  credentialType: CredentialType.REFRESH_TOKEN,
2968
2965
  clientId: clientId,
2969
- familyId: id
2966
+ familyId: id,
2970
2967
  };
2971
2968
  var credentialCache = this.getCredentialsFilteredBy(refreshTokenFilter);
2972
2969
  var refreshTokens = Object.keys(credentialCache.refreshTokens).map(function (key) { return credentialCache.refreshTokens[key]; });
@@ -3018,8 +3015,8 @@ var CacheManager = /** @class */ (function () {
3018
3015
  * @param value
3019
3016
  * @param oboAssertion
3020
3017
  */
3021
- CacheManager.prototype.matchOboAssertion = function (entity, oboAssertion) {
3022
- return !!(entity.oboAssertion && oboAssertion === entity.oboAssertion);
3018
+ CacheManager.prototype.matchUserAssertionHash = function (entity, userAssertionHash) {
3019
+ return !!(entity.userAssertionHash && userAssertionHash === entity.userAssertionHash);
3023
3020
  };
3024
3021
  /**
3025
3022
  * helper to match environment
@@ -3256,7 +3253,7 @@ var DefaultStorageClass = /** @class */ (function (_super) {
3256
3253
  return DefaultStorageClass;
3257
3254
  }(CacheManager));
3258
3255
 
3259
- /*! @azure/msal-common v6.4.0 2022-06-06 */
3256
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
3260
3257
 
3261
3258
  /*
3262
3259
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3350,7 +3347,7 @@ function buildAuthOptions(authOptions) {
3350
3347
  return __assign({ clientCapabilities: [], azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS }, authOptions);
3351
3348
  }
3352
3349
 
3353
- /*! @azure/msal-common v6.4.0 2022-06-06 */
3350
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
3354
3351
 
3355
3352
  /*
3356
3353
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3370,7 +3367,7 @@ var ServerError = /** @class */ (function (_super) {
3370
3367
  return ServerError;
3371
3368
  }(AuthError));
3372
3369
 
3373
- /*! @azure/msal-common v6.4.0 2022-06-06 */
3370
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
3374
3371
 
3375
3372
  /*
3376
3373
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3466,7 +3463,7 @@ var ThrottlingUtils = /** @class */ (function () {
3466
3463
  return ThrottlingUtils;
3467
3464
  }());
3468
3465
 
3469
- /*! @azure/msal-common v6.4.0 2022-06-06 */
3466
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
3470
3467
 
3471
3468
  /*
3472
3469
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3515,7 +3512,7 @@ var NetworkManager = /** @class */ (function () {
3515
3512
  return NetworkManager;
3516
3513
  }());
3517
3514
 
3518
- /*! @azure/msal-common v6.4.0 2022-06-06 */
3515
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
3519
3516
  /*
3520
3517
  * Copyright (c) Microsoft Corporation. All rights reserved.
3521
3518
  * Licensed under the MIT License.
@@ -3526,7 +3523,7 @@ var CcsCredentialType;
3526
3523
  CcsCredentialType["UPN"] = "UPN";
3527
3524
  })(CcsCredentialType || (CcsCredentialType = {}));
3528
3525
 
3529
- /*! @azure/msal-common v6.4.0 2022-06-06 */
3526
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
3530
3527
 
3531
3528
  /*
3532
3529
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3615,7 +3612,7 @@ var BaseClient = /** @class */ (function () {
3615
3612
  return BaseClient;
3616
3613
  }());
3617
3614
 
3618
- /*! @azure/msal-common v6.4.0 2022-06-06 */
3615
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
3619
3616
 
3620
3617
  /*
3621
3618
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3701,7 +3698,7 @@ var RequestValidator = /** @class */ (function () {
3701
3698
  return RequestValidator;
3702
3699
  }());
3703
3700
 
3704
- /*! @azure/msal-common v6.4.0 2022-06-06 */
3701
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
3705
3702
 
3706
3703
  /*
3707
3704
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3935,14 +3932,18 @@ var RequestParameterBuilder = /** @class */ (function () {
3935
3932
  * @param clientAssertion
3936
3933
  */
3937
3934
  RequestParameterBuilder.prototype.addClientAssertion = function (clientAssertion) {
3938
- this.parameters.set(AADServerParamKeys.CLIENT_ASSERTION, encodeURIComponent(clientAssertion));
3935
+ if (!StringUtils.isEmpty(clientAssertion)) {
3936
+ this.parameters.set(AADServerParamKeys.CLIENT_ASSERTION, encodeURIComponent(clientAssertion));
3937
+ }
3939
3938
  };
3940
3939
  /**
3941
3940
  * add clientAssertionType for confidential client flows
3942
3941
  * @param clientAssertionType
3943
3942
  */
3944
3943
  RequestParameterBuilder.prototype.addClientAssertionType = function (clientAssertionType) {
3945
- this.parameters.set(AADServerParamKeys.CLIENT_ASSERTION_TYPE, encodeURIComponent(clientAssertionType));
3944
+ if (!StringUtils.isEmpty(clientAssertionType)) {
3945
+ this.parameters.set(AADServerParamKeys.CLIENT_ASSERTION_TYPE, encodeURIComponent(clientAssertionType));
3946
+ }
3946
3947
  };
3947
3948
  /**
3948
3949
  * add OBO assertion for confidential client flows
@@ -4075,7 +4076,7 @@ var RequestParameterBuilder = /** @class */ (function () {
4075
4076
  return RequestParameterBuilder;
4076
4077
  }());
4077
4078
 
4078
- /*! @azure/msal-common v6.4.0 2022-06-06 */
4079
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
4079
4080
 
4080
4081
  /*
4081
4082
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4110,7 +4111,7 @@ var IdTokenEntity = /** @class */ (function (_super) {
4110
4111
  * @param clientId
4111
4112
  * @param authority
4112
4113
  */
4113
- IdTokenEntity.createIdTokenEntity = function (homeAccountId, environment, idToken, clientId, tenantId, oboAssertion) {
4114
+ IdTokenEntity.createIdTokenEntity = function (homeAccountId, environment, idToken, clientId, tenantId) {
4114
4115
  var idTokenEntity = new IdTokenEntity();
4115
4116
  idTokenEntity.credentialType = CredentialType.ID_TOKEN;
4116
4117
  idTokenEntity.homeAccountId = homeAccountId;
@@ -4118,7 +4119,6 @@ var IdTokenEntity = /** @class */ (function (_super) {
4118
4119
  idTokenEntity.clientId = clientId;
4119
4120
  idTokenEntity.secret = idToken;
4120
4121
  idTokenEntity.realm = tenantId;
4121
- idTokenEntity.oboAssertion = oboAssertion;
4122
4122
  return idTokenEntity;
4123
4123
  };
4124
4124
  /**
@@ -4140,7 +4140,7 @@ var IdTokenEntity = /** @class */ (function (_super) {
4140
4140
  return IdTokenEntity;
4141
4141
  }(CredentialEntity));
4142
4142
 
4143
- /*! @azure/msal-common v6.4.0 2022-06-06 */
4143
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
4144
4144
  /*
4145
4145
  * Copyright (c) Microsoft Corporation. All rights reserved.
4146
4146
  * Licensed under the MIT License.
@@ -4190,7 +4190,7 @@ var TimeUtils = /** @class */ (function () {
4190
4190
  return TimeUtils;
4191
4191
  }());
4192
4192
 
4193
- /*! @azure/msal-common v6.4.0 2022-06-06 */
4193
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
4194
4194
 
4195
4195
  /*
4196
4196
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4236,7 +4236,7 @@ var AccessTokenEntity = /** @class */ (function (_super) {
4236
4236
  * @param expiresOn
4237
4237
  * @param extExpiresOn
4238
4238
  */
4239
- AccessTokenEntity.createAccessTokenEntity = function (homeAccountId, environment, accessToken, clientId, tenantId, scopes, expiresOn, extExpiresOn, cryptoUtils, refreshOn, tokenType, oboAssertion, keyId, requestedClaims, requestedClaimsHash) {
4239
+ AccessTokenEntity.createAccessTokenEntity = function (homeAccountId, environment, accessToken, clientId, tenantId, scopes, expiresOn, extExpiresOn, cryptoUtils, refreshOn, tokenType, userAssertionHash, keyId, requestedClaims, requestedClaimsHash) {
4240
4240
  var _a, _b;
4241
4241
  var atEntity = new AccessTokenEntity();
4242
4242
  atEntity.homeAccountId = homeAccountId;
@@ -4257,7 +4257,7 @@ var AccessTokenEntity = /** @class */ (function (_super) {
4257
4257
  atEntity.clientId = clientId;
4258
4258
  atEntity.realm = tenantId;
4259
4259
  atEntity.target = scopes;
4260
- atEntity.oboAssertion = oboAssertion;
4260
+ atEntity.userAssertionHash = userAssertionHash;
4261
4261
  atEntity.tokenType = StringUtils.isEmpty(tokenType) ? exports.AuthenticationScheme.BEARER : tokenType;
4262
4262
  if (requestedClaims) {
4263
4263
  atEntity.requestedClaims = requestedClaims;
@@ -4304,7 +4304,7 @@ var AccessTokenEntity = /** @class */ (function (_super) {
4304
4304
  return AccessTokenEntity;
4305
4305
  }(CredentialEntity));
4306
4306
 
4307
- /*! @azure/msal-common v6.4.0 2022-06-06 */
4307
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
4308
4308
 
4309
4309
  /*
4310
4310
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4341,14 +4341,14 @@ var RefreshTokenEntity = /** @class */ (function (_super) {
4341
4341
  * @param clientId
4342
4342
  * @param authority
4343
4343
  */
4344
- RefreshTokenEntity.createRefreshTokenEntity = function (homeAccountId, environment, refreshToken, clientId, familyId, oboAssertion) {
4344
+ RefreshTokenEntity.createRefreshTokenEntity = function (homeAccountId, environment, refreshToken, clientId, familyId, userAssertionHash) {
4345
4345
  var rtEntity = new RefreshTokenEntity();
4346
4346
  rtEntity.clientId = clientId;
4347
4347
  rtEntity.credentialType = CredentialType.REFRESH_TOKEN;
4348
4348
  rtEntity.environment = environment;
4349
4349
  rtEntity.homeAccountId = homeAccountId;
4350
4350
  rtEntity.secret = refreshToken;
4351
- rtEntity.oboAssertion = oboAssertion;
4351
+ rtEntity.userAssertionHash = userAssertionHash;
4352
4352
  if (familyId)
4353
4353
  rtEntity.familyId = familyId;
4354
4354
  return rtEntity;
@@ -4371,7 +4371,7 @@ var RefreshTokenEntity = /** @class */ (function (_super) {
4371
4371
  return RefreshTokenEntity;
4372
4372
  }(CredentialEntity));
4373
4373
 
4374
- /*! @azure/msal-common v6.4.0 2022-06-06 */
4374
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
4375
4375
 
4376
4376
  /*
4377
4377
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4435,7 +4435,7 @@ var InteractionRequiredAuthError = /** @class */ (function (_super) {
4435
4435
  return InteractionRequiredAuthError;
4436
4436
  }(AuthError));
4437
4437
 
4438
- /*! @azure/msal-common v6.4.0 2022-06-06 */
4438
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
4439
4439
  /*
4440
4440
  * Copyright (c) Microsoft Corporation. All rights reserved.
4441
4441
  * Licensed under the MIT License.
@@ -4451,7 +4451,7 @@ var CacheRecord = /** @class */ (function () {
4451
4451
  return CacheRecord;
4452
4452
  }());
4453
4453
 
4454
- /*! @azure/msal-common v6.4.0 2022-06-06 */
4454
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
4455
4455
 
4456
4456
  /*
4457
4457
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4522,7 +4522,7 @@ var ProtocolUtils = /** @class */ (function () {
4522
4522
  return ProtocolUtils;
4523
4523
  }());
4524
4524
 
4525
- /*! @azure/msal-common v6.4.0 2022-06-06 */
4525
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
4526
4526
 
4527
4527
  /*
4528
4528
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4723,7 +4723,7 @@ var UrlString = /** @class */ (function () {
4723
4723
  return UrlString;
4724
4724
  }());
4725
4725
 
4726
- /*! @azure/msal-common v6.4.0 2022-06-06 */
4726
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
4727
4727
 
4728
4728
  /*
4729
4729
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4824,7 +4824,7 @@ var PopTokenGenerator = /** @class */ (function () {
4824
4824
  return PopTokenGenerator;
4825
4825
  }());
4826
4826
 
4827
- /*! @azure/msal-common v6.4.0 2022-06-06 */
4827
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
4828
4828
 
4829
4829
  /*
4830
4830
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4894,7 +4894,7 @@ var AppMetadataEntity = /** @class */ (function () {
4894
4894
  return AppMetadataEntity;
4895
4895
  }());
4896
4896
 
4897
- /*! @azure/msal-common v6.4.0 2022-06-06 */
4897
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
4898
4898
  /*
4899
4899
  * Copyright (c) Microsoft Corporation. All rights reserved.
4900
4900
  * Licensed under the MIT License.
@@ -4930,7 +4930,7 @@ var AppMetadataEntity = /** @class */ (function () {
4930
4930
  return TokenCacheContext;
4931
4931
  }());
4932
4932
 
4933
- /*! @azure/msal-common v6.4.0 2022-06-06 */
4933
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
4934
4934
 
4935
4935
  /*
4936
4936
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4991,7 +4991,7 @@ var ResponseHandler = /** @class */ (function () {
4991
4991
  * @param serverTokenResponse
4992
4992
  * @param authority
4993
4993
  */
4994
- ResponseHandler.prototype.handleServerTokenResponse = function (serverTokenResponse, authority, reqTimestamp, request, authCodePayload, oboAssertion, handlingRefreshTokenResponse) {
4994
+ ResponseHandler.prototype.handleServerTokenResponse = function (serverTokenResponse, authority, reqTimestamp, request, authCodePayload, userAssertionHash, handlingRefreshTokenResponse) {
4995
4995
  return __awaiter(this, void 0, void 0, function () {
4996
4996
  var idTokenObj, requestStateObj, cacheRecord, cacheContext, key, account;
4997
4997
  return __generator(this, function (_a) {
@@ -5013,7 +5013,7 @@ var ResponseHandler = /** @class */ (function () {
5013
5013
  }
5014
5014
  // Add keyId from request to serverTokenResponse if defined
5015
5015
  serverTokenResponse.key_id = serverTokenResponse.key_id || request.sshKid || undefined;
5016
- cacheRecord = this.generateCacheRecord(serverTokenResponse, authority, reqTimestamp, request, idTokenObj, oboAssertion, authCodePayload);
5016
+ cacheRecord = this.generateCacheRecord(serverTokenResponse, authority, reqTimestamp, request, idTokenObj, userAssertionHash, authCodePayload);
5017
5017
  _a.label = 1;
5018
5018
  case 1:
5019
5019
  _a.trys.push([1, , 5, 8]);
@@ -5061,7 +5061,7 @@ var ResponseHandler = /** @class */ (function () {
5061
5061
  * @param idTokenObj
5062
5062
  * @param authority
5063
5063
  */
5064
- ResponseHandler.prototype.generateCacheRecord = function (serverTokenResponse, authority, reqTimestamp, request, idTokenObj, oboAssertion, authCodePayload) {
5064
+ ResponseHandler.prototype.generateCacheRecord = function (serverTokenResponse, authority, reqTimestamp, request, idTokenObj, userAssertionHash, authCodePayload) {
5065
5065
  var env = authority.getPreferredCache();
5066
5066
  if (StringUtils.isEmpty(env)) {
5067
5067
  throw ClientAuthError.createInvalidCacheEnvironmentError();
@@ -5070,8 +5070,8 @@ var ResponseHandler = /** @class */ (function () {
5070
5070
  var cachedIdToken;
5071
5071
  var cachedAccount;
5072
5072
  if (!StringUtils.isEmpty(serverTokenResponse.id_token) && !!idTokenObj) {
5073
- cachedIdToken = IdTokenEntity.createIdTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.id_token || Constants.EMPTY_STRING, this.clientId, idTokenObj.claims.tid || Constants.EMPTY_STRING, oboAssertion);
5074
- cachedAccount = this.generateAccountEntity(serverTokenResponse, idTokenObj, authority, oboAssertion, authCodePayload);
5073
+ cachedIdToken = IdTokenEntity.createIdTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.id_token || Constants.EMPTY_STRING, this.clientId, idTokenObj.claims.tid || Constants.EMPTY_STRING);
5074
+ cachedAccount = this.generateAccountEntity(serverTokenResponse, idTokenObj, authority, authCodePayload);
5075
5075
  }
5076
5076
  // AccessToken
5077
5077
  var cachedAccessToken = null;
@@ -5089,12 +5089,12 @@ var ResponseHandler = /** @class */ (function () {
5089
5089
  var extendedTokenExpirationSeconds = tokenExpirationSeconds + extExpiresIn;
5090
5090
  var refreshOnSeconds = refreshIn && refreshIn > 0 ? reqTimestamp + refreshIn : undefined;
5091
5091
  // non AAD scenarios can have empty realm
5092
- cachedAccessToken = AccessTokenEntity.createAccessTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.access_token || Constants.EMPTY_STRING, this.clientId, idTokenObj ? idTokenObj.claims.tid || Constants.EMPTY_STRING : authority.tenant, responseScopes.printScopes(), tokenExpirationSeconds, extendedTokenExpirationSeconds, this.cryptoObj, refreshOnSeconds, serverTokenResponse.token_type, oboAssertion, serverTokenResponse.key_id, request.claims, request.requestedClaimsHash);
5092
+ cachedAccessToken = AccessTokenEntity.createAccessTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.access_token || Constants.EMPTY_STRING, this.clientId, idTokenObj ? idTokenObj.claims.tid || Constants.EMPTY_STRING : authority.tenant, responseScopes.printScopes(), tokenExpirationSeconds, extendedTokenExpirationSeconds, this.cryptoObj, refreshOnSeconds, serverTokenResponse.token_type, userAssertionHash, serverTokenResponse.key_id, request.claims, request.requestedClaimsHash);
5093
5093
  }
5094
5094
  // refreshToken
5095
5095
  var cachedRefreshToken = null;
5096
5096
  if (!StringUtils.isEmpty(serverTokenResponse.refresh_token)) {
5097
- cachedRefreshToken = RefreshTokenEntity.createRefreshTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.refresh_token || Constants.EMPTY_STRING, this.clientId, serverTokenResponse.foci, oboAssertion);
5097
+ cachedRefreshToken = RefreshTokenEntity.createRefreshTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.refresh_token || Constants.EMPTY_STRING, this.clientId, serverTokenResponse.foci, userAssertionHash);
5098
5098
  }
5099
5099
  // appMetadata
5100
5100
  var cachedAppMetadata = null;
@@ -5109,22 +5109,22 @@ var ResponseHandler = /** @class */ (function () {
5109
5109
  * @param idToken
5110
5110
  * @param authority
5111
5111
  */
5112
- ResponseHandler.prototype.generateAccountEntity = function (serverTokenResponse, idToken, authority, oboAssertion, authCodePayload) {
5112
+ ResponseHandler.prototype.generateAccountEntity = function (serverTokenResponse, idToken, authority, authCodePayload) {
5113
5113
  var authorityType = authority.authorityType;
5114
5114
  var cloudGraphHostName = authCodePayload ? authCodePayload.cloud_graph_host_name : Constants.EMPTY_STRING;
5115
5115
  var msGraphhost = authCodePayload ? authCodePayload.msgraph_host : Constants.EMPTY_STRING;
5116
5116
  // ADFS does not require client_info in the response
5117
5117
  if (authorityType === AuthorityType.Adfs) {
5118
5118
  this.logger.verbose("Authority type is ADFS, creating ADFS account");
5119
- return AccountEntity.createGenericAccount(this.homeAccountIdentifier, idToken, authority, oboAssertion, cloudGraphHostName, msGraphhost);
5119
+ return AccountEntity.createGenericAccount(this.homeAccountIdentifier, idToken, authority, cloudGraphHostName, msGraphhost);
5120
5120
  }
5121
5121
  // This fallback applies to B2C as well as they fall under an AAD account type.
5122
5122
  if (StringUtils.isEmpty(serverTokenResponse.client_info) && authority.protocolMode === "AAD") {
5123
5123
  throw ClientAuthError.createClientInfoEmptyError();
5124
5124
  }
5125
5125
  return serverTokenResponse.client_info ?
5126
- AccountEntity.createAccount(serverTokenResponse.client_info, this.homeAccountIdentifier, idToken, authority, oboAssertion, cloudGraphHostName, msGraphhost) :
5127
- AccountEntity.createGenericAccount(this.homeAccountIdentifier, idToken, authority, oboAssertion, cloudGraphHostName, msGraphhost);
5126
+ AccountEntity.createAccount(serverTokenResponse.client_info, this.homeAccountIdentifier, idToken, authority, cloudGraphHostName, msGraphhost) :
5127
+ AccountEntity.createGenericAccount(this.homeAccountIdentifier, idToken, authority, cloudGraphHostName, msGraphhost);
5128
5128
  };
5129
5129
  /**
5130
5130
  * Creates an @AuthenticationResult from @CacheRecord , @IdToken , and a boolean that states whether or not the result is from cache.
@@ -5200,7 +5200,7 @@ var ResponseHandler = /** @class */ (function () {
5200
5200
  return ResponseHandler;
5201
5201
  }());
5202
5202
 
5203
- /*! @azure/msal-common v6.4.0 2022-06-06 */
5203
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
5204
5204
 
5205
5205
  /*
5206
5206
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5404,8 +5404,8 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
5404
5404
  if (this.config.clientCredentials.clientSecret) {
5405
5405
  parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret);
5406
5406
  }
5407
- clientAssertion = request.clientAssertion || this.config.clientCredentials.clientAssertion;
5408
- if (clientAssertion) {
5407
+ if (this.config.clientCredentials.clientAssertion) {
5408
+ clientAssertion = this.config.clientCredentials.clientAssertion;
5409
5409
  parameterBuilder.addClientAssertion(clientAssertion.assertion);
5410
5410
  parameterBuilder.addClientAssertionType(clientAssertion.assertionType);
5411
5411
  }
@@ -5635,7 +5635,7 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
5635
5635
  return AuthorizationCodeClient;
5636
5636
  }(BaseClient));
5637
5637
 
5638
- /*! @azure/msal-common v6.4.0 2022-06-06 */
5638
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
5639
5639
 
5640
5640
  /*
5641
5641
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5797,8 +5797,8 @@ var RefreshTokenClient = /** @class */ (function (_super) {
5797
5797
  if (this.config.clientCredentials.clientSecret) {
5798
5798
  parameterBuilder.addClientSecret(this.config.clientCredentials.clientSecret);
5799
5799
  }
5800
- clientAssertion = request.clientAssertion || this.config.clientCredentials.clientAssertion;
5801
- if (clientAssertion) {
5800
+ if (this.config.clientCredentials.clientAssertion) {
5801
+ clientAssertion = this.config.clientCredentials.clientAssertion;
5802
5802
  parameterBuilder.addClientAssertion(clientAssertion.assertion);
5803
5803
  parameterBuilder.addClientAssertionType(clientAssertion.assertionType);
5804
5804
  }
@@ -5848,7 +5848,7 @@ var RefreshTokenClient = /** @class */ (function (_super) {
5848
5848
  return RefreshTokenClient;
5849
5849
  }(BaseClient));
5850
5850
 
5851
- /*! @azure/msal-common v6.4.0 2022-06-06 */
5851
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
5852
5852
 
5853
5853
  /*
5854
5854
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5964,7 +5964,7 @@ var SilentFlowClient = /** @class */ (function (_super) {
5964
5964
  return SilentFlowClient;
5965
5965
  }(BaseClient));
5966
5966
 
5967
- /*! @azure/msal-common v6.4.0 2022-06-06 */
5967
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
5968
5968
  /*
5969
5969
  * Copyright (c) Microsoft Corporation. All rights reserved.
5970
5970
  * Licensed under the MIT License.
@@ -5975,7 +5975,7 @@ function isOpenIdConfigResponse(response) {
5975
5975
  response.hasOwnProperty("issuer"));
5976
5976
  }
5977
5977
 
5978
- /*! @azure/msal-common v6.4.0 2022-06-06 */
5978
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
5979
5979
  /*
5980
5980
  * Copyright (c) Microsoft Corporation. All rights reserved.
5981
5981
  * Licensed under the MIT License.
@@ -5989,7 +5989,7 @@ exports.ProtocolMode = void 0;
5989
5989
  ProtocolMode["OIDC"] = "OIDC";
5990
5990
  })(exports.ProtocolMode || (exports.ProtocolMode = {}));
5991
5991
 
5992
- /*! @azure/msal-common v6.4.0 2022-06-06 */
5992
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
5993
5993
 
5994
5994
  /*
5995
5995
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6064,7 +6064,7 @@ var AuthorityMetadataEntity = /** @class */ (function () {
6064
6064
  return AuthorityMetadataEntity;
6065
6065
  }());
6066
6066
 
6067
- /*! @azure/msal-common v6.4.0 2022-06-06 */
6067
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
6068
6068
  /*
6069
6069
  * Copyright (c) Microsoft Corporation. All rights reserved.
6070
6070
  * Licensed under the MIT License.
@@ -6074,7 +6074,7 @@ function isCloudInstanceDiscoveryResponse(response) {
6074
6074
  response.hasOwnProperty("metadata"));
6075
6075
  }
6076
6076
 
6077
- /*! @azure/msal-common v6.4.0 2022-06-06 */
6077
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
6078
6078
 
6079
6079
  /*
6080
6080
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6196,7 +6196,7 @@ var RegionDiscovery = /** @class */ (function () {
6196
6196
  return RegionDiscovery;
6197
6197
  }());
6198
6198
 
6199
- /*! @azure/msal-common v6.4.0 2022-06-06 */
6199
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
6200
6200
 
6201
6201
  /*
6202
6202
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6786,7 +6786,7 @@ var Authority = /** @class */ (function () {
6786
6786
  return Authority;
6787
6787
  }());
6788
6788
 
6789
- /*! @azure/msal-common v6.4.0 2022-06-06 */
6789
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
6790
6790
 
6791
6791
  /*
6792
6792
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6847,7 +6847,7 @@ var AuthorityFactory = /** @class */ (function () {
6847
6847
  return AuthorityFactory;
6848
6848
  }());
6849
6849
 
6850
- /*! @azure/msal-common v6.4.0 2022-06-06 */
6850
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
6851
6851
 
6852
6852
  /*
6853
6853
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6878,7 +6878,7 @@ var ServerTelemetryEntity = /** @class */ (function () {
6878
6878
  return ServerTelemetryEntity;
6879
6879
  }());
6880
6880
 
6881
- /*! @azure/msal-common v6.4.0 2022-06-06 */
6881
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
6882
6882
 
6883
6883
  /*
6884
6884
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6906,7 +6906,7 @@ var ThrottlingEntity = /** @class */ (function () {
6906
6906
  return ThrottlingEntity;
6907
6907
  }());
6908
6908
 
6909
- /*! @azure/msal-common v6.4.0 2022-06-06 */
6909
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
6910
6910
 
6911
6911
  /*
6912
6912
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6923,7 +6923,7 @@ var StubbedNetworkModule = {
6923
6923
  }
6924
6924
  };
6925
6925
 
6926
- /*! @azure/msal-common v6.4.0 2022-06-06 */
6926
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
6927
6927
 
6928
6928
  /*
6929
6929
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6968,7 +6968,7 @@ var JoseHeaderError = /** @class */ (function (_super) {
6968
6968
  return JoseHeaderError;
6969
6969
  }(AuthError));
6970
6970
 
6971
- /*! @azure/msal-common v6.4.0 2022-06-06 */
6971
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
6972
6972
 
6973
6973
  /*
6974
6974
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7008,7 +7008,7 @@ var JoseHeader = /** @class */ (function () {
7008
7008
  return JoseHeader;
7009
7009
  }());
7010
7010
 
7011
- /*! @azure/msal-common v6.4.0 2022-06-06 */
7011
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
7012
7012
 
7013
7013
  /*
7014
7014
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7067,7 +7067,7 @@ var AuthenticationHeaderParser = /** @class */ (function () {
7067
7067
  return AuthenticationHeaderParser;
7068
7068
  }());
7069
7069
 
7070
- /*! @azure/msal-common v6.4.0 2022-06-06 */
7070
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
7071
7071
 
7072
7072
  /*
7073
7073
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7229,7 +7229,7 @@ var ServerTelemetryManager = /** @class */ (function () {
7229
7229
  return ServerTelemetryManager;
7230
7230
  }());
7231
7231
 
7232
- /*! @azure/msal-common v6.4.0 2022-06-06 */
7232
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
7233
7233
  /*
7234
7234
  * Copyright (c) Microsoft Corporation. All rights reserved.
7235
7235
  * Licensed under the MIT License.
@@ -7326,7 +7326,7 @@ var PerformanceEventStatus;
7326
7326
  PerformanceEventStatus[PerformanceEventStatus["Completed"] = 2] = "Completed";
7327
7327
  })(PerformanceEventStatus || (PerformanceEventStatus = {}));
7328
7328
 
7329
- /*! @azure/msal-common v6.4.0 2022-06-06 */
7329
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
7330
7330
 
7331
7331
  /*
7332
7332
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7596,7 +7596,7 @@ var PerformanceClient = /** @class */ (function () {
7596
7596
  return PerformanceClient;
7597
7597
  }());
7598
7598
 
7599
- /*! @azure/msal-common v6.4.0 2022-06-06 */
7599
+ /*! @azure/msal-common v7.0.0 2022-06-13 */
7600
7600
 
7601
7601
  /*
7602
7602
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7698,7 +7698,7 @@ var BrowserAuthErrorMessage = {
7698
7698
  },
7699
7699
  redirectInIframeError: {
7700
7700
  code: "redirect_in_iframe",
7701
- desc: "Code flow is not supported inside an iframe. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs."
7701
+ desc: "Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs."
7702
7702
  },
7703
7703
  blockTokenRequestsInHiddenIframeError: {
7704
7704
  code: "block_iframe_reload",
@@ -7923,7 +7923,7 @@ var BrowserAuthError = /** @class */ (function (_super) {
7923
7923
  return new BrowserAuthError(BrowserAuthErrorMessage.monitorIframeTimeoutError.code, BrowserAuthErrorMessage.monitorIframeTimeoutError.desc);
7924
7924
  };
7925
7925
  /**
7926
- * Creates an error thrown when navigateWindow is called inside an iframe.
7926
+ * Creates an error thrown when navigateWindow is called inside an iframe or brokered applications.
7927
7927
  * @param windowParentCheck
7928
7928
  */
7929
7929
  BrowserAuthError.createRedirectInIframeError = function (windowParentCheck) {
@@ -8142,7 +8142,8 @@ var BrowserConstants = {
8142
8142
  };
8143
8143
  var NativeConstants = {
8144
8144
  CHANNEL_ID: "53ee284d-920a-4b59-9d30-a60315b26836",
8145
- PREFERRED_EXTENSION_ID: "ppnbnpeolgkicgegkbkbjmhlideopiji"
8145
+ PREFERRED_EXTENSION_ID: "ppnbnpeolgkicgegkbkbjmhlideopiji",
8146
+ MATS_TELEMETRY: "MATS"
8146
8147
  };
8147
8148
  var NativeExtensionMethod;
8148
8149
  (function (NativeExtensionMethod) {
@@ -9392,7 +9393,7 @@ var DEFAULT_BROWSER_CACHE_MANAGER = function (clientId, logger) {
9392
9393
 
9393
9394
  /* eslint-disable header/header */
9394
9395
  var name = "@azure/msal-browser";
9395
- var version = "2.25.0";
9396
+ var version = "2.26.0";
9396
9397
 
9397
9398
  /*
9398
9399
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -10186,6 +10187,8 @@ var StandardInteractionClient = /** @class */ (function (_super) {
10186
10187
  })
10187
10188
  .catch(function (error) {
10188
10189
  getAuthorityMeasurement.endMeasurement({
10190
+ errorCode: error.errorCode,
10191
+ subErrorCode: error.subError,
10189
10192
  success: false
10190
10193
  });
10191
10194
  throw error;
@@ -10672,6 +10675,8 @@ var NativeInteractionClient = /** @class */ (function (_super) {
10672
10675
  .catch(function (error) {
10673
10676
  nativeATMeasurement.endMeasurement({
10674
10677
  success: false,
10678
+ errorCode: error.errorCode,
10679
+ subErrorCode: error.subError,
10675
10680
  isNativeBroker: true
10676
10681
  });
10677
10682
  throw error;
@@ -10790,7 +10795,7 @@ var NativeInteractionClient = /** @class */ (function (_super) {
10790
10795
  */
10791
10796
  NativeInteractionClient.prototype.handleNativeResponse = function (response, request, reqTimestamp) {
10792
10797
  return __awaiter$1(this, void 0, void 0, function () {
10793
- var idTokenObj, authority, authorityPreferredCache, homeAccountIdentifier, accountEntity, responseScopes, accountProperties, uid, tid, responseAccessToken, responseTokenType, _a, popTokenGenerator, shrParameters, result;
10798
+ var idTokenObj, authority, authorityPreferredCache, homeAccountIdentifier, accountEntity, responseScopes, accountProperties, uid, tid, responseAccessToken, responseTokenType, _a, popTokenGenerator, shrParameters, mats, result;
10794
10799
  var _this = this;
10795
10800
  return __generator$1(this, function (_b) {
10796
10801
  switch (_b.label) {
@@ -10806,7 +10811,7 @@ var NativeInteractionClient = /** @class */ (function (_super) {
10806
10811
  authority = _b.sent();
10807
10812
  authorityPreferredCache = authority.getPreferredCache();
10808
10813
  homeAccountIdentifier = AccountEntity.generateHomeAccountId(response.client_info || Constants.EMPTY_STRING, AuthorityType.Default, this.logger, this.browserCrypto, idTokenObj);
10809
- accountEntity = AccountEntity.createAccount(response.client_info, homeAccountIdentifier, idTokenObj, undefined, undefined, undefined, undefined, authorityPreferredCache, response.account.id);
10814
+ accountEntity = AccountEntity.createAccount(response.client_info, homeAccountIdentifier, idTokenObj, undefined, undefined, undefined, authorityPreferredCache, response.account.id);
10810
10815
  this.browserStorage.setAccount(accountEntity);
10811
10816
  responseScopes = response.scopes ? ScopeSet.fromString(response.scopes) : ScopeSet.fromString(request.scopes);
10812
10817
  accountProperties = response.account.properties || {};
@@ -10851,6 +10856,7 @@ var NativeInteractionClient = /** @class */ (function (_super) {
10851
10856
  }
10852
10857
  _b.label = 5;
10853
10858
  case 5:
10859
+ mats = this.getMATSFromResponse(response);
10854
10860
  result = {
10855
10861
  authority: authority.canonicalAuthority,
10856
10862
  uniqueId: uid,
@@ -10860,7 +10866,7 @@ var NativeInteractionClient = /** @class */ (function (_super) {
10860
10866
  idToken: response.id_token,
10861
10867
  idTokenClaims: idTokenObj.claims,
10862
10868
  accessToken: responseAccessToken,
10863
- fromCache: false,
10869
+ fromCache: mats ? this.isResponseFromCache(mats) : false,
10864
10870
  expiresOn: new Date(Number(reqTimestamp + response.expires_in) * 1000),
10865
10871
  tokenType: responseTokenType,
10866
10872
  correlationId: this.correlationId,
@@ -10893,6 +10899,34 @@ var NativeInteractionClient = /** @class */ (function (_super) {
10893
10899
  throw NativeAuthError.createUnexpectedError("Response missing expected properties.");
10894
10900
  }
10895
10901
  };
10902
+ /**
10903
+ * Gets MATS telemetry from native response
10904
+ * @param response
10905
+ * @returns
10906
+ */
10907
+ NativeInteractionClient.prototype.getMATSFromResponse = function (response) {
10908
+ if (response.properties.MATS) {
10909
+ try {
10910
+ return JSON.parse(response.properties.MATS);
10911
+ }
10912
+ catch (e) {
10913
+ this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead");
10914
+ }
10915
+ }
10916
+ return null;
10917
+ };
10918
+ /**
10919
+ * Returns whether or not response came from native cache
10920
+ * @param response
10921
+ * @returns
10922
+ */
10923
+ NativeInteractionClient.prototype.isResponseFromCache = function (mats) {
10924
+ if (typeof mats.is_cached === "undefined") {
10925
+ this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false.");
10926
+ return false;
10927
+ }
10928
+ return !!mats.is_cached;
10929
+ };
10896
10930
  /**
10897
10931
  * Translates developer provided request object into NativeRequest object
10898
10932
  * @param request
@@ -10921,7 +10955,7 @@ var NativeInteractionClient = /** @class */ (function (_super) {
10921
10955
  throw BrowserAuthError.createNativePromptParameterNotSupportedError();
10922
10956
  }
10923
10957
  }
10924
- validatedRequest = __assign$1(__assign$1({}, request), { accountId: this.accountId, clientId: this.config.auth.clientId, authority: canonicalAuthority.urlString, scopes: scopeSet.printScopes(), redirectUri: this.getRedirectUri(request.redirectUri), correlationId: this.correlationId, tokenType: request.authenticationScheme, windowTitleSubstring: document.title, extraParameters: __assign$1(__assign$1({}, request.extraQueryParameters), request.tokenQueryParameters), extendedExpiryToken: false // Make this configurable?
10958
+ validatedRequest = __assign$1(__assign$1({}, request), { accountId: this.accountId, clientId: this.config.auth.clientId, authority: canonicalAuthority.urlString, scopes: scopeSet.printScopes(), redirectUri: this.getRedirectUri(request.redirectUri), correlationId: this.correlationId, tokenType: request.authenticationScheme, windowTitleSubstring: document.title, extraParameters: __assign$1(__assign$1(__assign$1({}, request.extraQueryParameters), request.tokenQueryParameters), { telemetry: NativeConstants.MATS_TELEMETRY }), extendedExpiryToken: false // Make this configurable?
10925
10959
  });
10926
10960
  if (!(request.authenticationScheme === exports.AuthenticationScheme.POP)) return [3 /*break*/, 2];
10927
10961
  shrParameters = {
@@ -12331,6 +12365,8 @@ var SilentIframeClient = /** @class */ (function (_super) {
12331
12365
  serverTelemetryManager.cacheFailedRequest(e_1);
12332
12366
  this.browserStorage.cleanRequestByState(silentRequest.state);
12333
12367
  acquireTokenMeasurement.endMeasurement({
12368
+ errorCode: e_1 instanceof AuthError && e_1.errorCode || undefined,
12369
+ subErrorCode: e_1 instanceof AuthError && e_1.subError || undefined,
12334
12370
  success: false
12335
12371
  });
12336
12372
  throw e_1;
@@ -12435,6 +12471,8 @@ var SilentCacheClient = /** @class */ (function (_super) {
12435
12471
  this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair.");
12436
12472
  }
12437
12473
  acquireTokenMeasurement.endMeasurement({
12474
+ errorCode: error_1 instanceof AuthError && error_1.errorCode || undefined,
12475
+ subErrorCode: error_1 instanceof AuthError && error_1.subError || undefined,
12438
12476
  success: false
12439
12477
  });
12440
12478
  throw error_1;
@@ -12529,6 +12567,8 @@ var SilentRefreshClient = /** @class */ (function (_super) {
12529
12567
  }
12530
12568
  serverTelemetryManager.cacheFailedRequest(e);
12531
12569
  acquireTokenMeasurement.endMeasurement({
12570
+ errorCode: e.errorCode,
12571
+ subErrorCode: e.subError,
12532
12572
  success: false
12533
12573
  });
12534
12574
  throw e;
@@ -14205,8 +14245,8 @@ var TokenCache = /** @class */ (function () {
14205
14245
  var idTokenEntity = IdTokenEntity.createIdTokenEntity(homeAccountId, environment, idToken, this.config.auth.clientId, tenantId);
14206
14246
  var idAuthToken = new AuthToken(idToken, this.cryptoObj);
14207
14247
  var accountEntity = options.clientInfo ?
14208
- AccountEntity.createAccount(options.clientInfo, homeAccountId, idAuthToken, undefined, undefined, undefined, undefined, environment) :
14209
- AccountEntity.createGenericAccount(homeAccountId, idAuthToken, undefined, undefined, undefined, undefined, environment);
14248
+ AccountEntity.createAccount(options.clientInfo, homeAccountId, idAuthToken, undefined, undefined, undefined, environment) :
14249
+ AccountEntity.createGenericAccount(homeAccountId, idAuthToken, undefined, undefined, undefined, environment);
14210
14250
  if (this.isBrowserEnvironment) {
14211
14251
  this.logger.verbose("TokenCache - loading id token");
14212
14252
  this.storage.setAccount(accountEntity);
@@ -14737,6 +14777,8 @@ var ClientApplication = /** @class */ (function () {
14737
14777
  _this.eventHandler.emitEvent(exports.EventType.LOGIN_FAILURE, exports.InteractionType.Popup, null, e);
14738
14778
  }
14739
14779
  atPopupMeasurement.endMeasurement({
14780
+ errorCode: e.errorCode,
14781
+ subErrorCode: e.subError,
14740
14782
  success: false
14741
14783
  });
14742
14784
  atPopupMeasurement.flushMeasurement();
@@ -14790,13 +14832,16 @@ var ClientApplication = /** @class */ (function () {
14790
14832
  return [2 /*return*/, result.then(function (response) {
14791
14833
  _this.eventHandler.emitEvent(exports.EventType.SSO_SILENT_SUCCESS, exports.InteractionType.Silent, response);
14792
14834
  ssoSilentMeasurement.endMeasurement({
14793
- success: true
14835
+ success: true,
14836
+ isNativeBroker: response.fromNativeBroker
14794
14837
  });
14795
14838
  ssoSilentMeasurement.flushMeasurement();
14796
14839
  return response;
14797
14840
  }).catch(function (e) {
14798
14841
  _this.eventHandler.emitEvent(exports.EventType.SSO_SILENT_FAILURE, exports.InteractionType.Silent, null, e);
14799
14842
  ssoSilentMeasurement.endMeasurement({
14843
+ errorCode: e.errorCode,
14844
+ subErrorCode: e.subError,
14800
14845
  success: false
14801
14846
  });
14802
14847
  ssoSilentMeasurement.flushMeasurement();
@@ -14836,7 +14881,8 @@ var ClientApplication = /** @class */ (function () {
14836
14881
  _this.eventHandler.emitEvent(exports.EventType.ACQUIRE_TOKEN_BY_CODE_SUCCESS, exports.InteractionType.Silent, result);
14837
14882
  _this.hybridAuthCodeResponses.delete(hybridAuthCode_1);
14838
14883
  atbcMeasurement.endMeasurement({
14839
- success: true
14884
+ success: true,
14885
+ isNativeBroker: result.fromNativeBroker
14840
14886
  });
14841
14887
  atbcMeasurement.flushMeasurement();
14842
14888
  return result;
@@ -14845,6 +14891,8 @@ var ClientApplication = /** @class */ (function () {
14845
14891
  _this.hybridAuthCodeResponses.delete(hybridAuthCode_1);
14846
14892
  _this.eventHandler.emitEvent(exports.EventType.ACQUIRE_TOKEN_BY_CODE_FAILURE, exports.InteractionType.Silent, null, error);
14847
14893
  atbcMeasurement.endMeasurement({
14894
+ errorCode: error.errorCode,
14895
+ subErrorCode: error.subError,
14848
14896
  success: false
14849
14897
  });
14850
14898
  atbcMeasurement.flushMeasurement();
@@ -14882,6 +14930,8 @@ var ClientApplication = /** @class */ (function () {
14882
14930
  catch (e) {
14883
14931
  this.eventHandler.emitEvent(exports.EventType.ACQUIRE_TOKEN_BY_CODE_FAILURE, exports.InteractionType.Silent, null, e);
14884
14932
  atbcMeasurement.endMeasurement({
14933
+ errorCode: e instanceof AuthError && e.errorCode || undefined,
14934
+ subErrorCode: e instanceof AuthError && e.subError || undefined,
14885
14935
  success: false
14886
14936
  });
14887
14937
  throw e;
@@ -14957,6 +15007,8 @@ var ClientApplication = /** @class */ (function () {
14957
15007
  })
14958
15008
  .catch(function (error) {
14959
15009
  atbrtMeasurement.endMeasurement({
15010
+ errorCode: error.errorCode,
15011
+ subErrorCode: error.subError,
14960
15012
  success: false
14961
15013
  });
14962
15014
  throw error;
@@ -15106,9 +15158,13 @@ var ClientApplication = /** @class */ (function () {
15106
15158
  // #region Helpers
15107
15159
  /**
15108
15160
  * Helper to validate app environment before making an auth request
15109
- * * @param interactionType
15161
+ *
15162
+ * @protected
15163
+ * @param {InteractionType} interactionType What kind of interaction is being used
15164
+ * @param {boolean} [setInteractionInProgress=true] Whether to set interaction in progress temp cache flag
15110
15165
  */
15111
- ClientApplication.prototype.preflightBrowserEnvironmentCheck = function (interactionType) {
15166
+ ClientApplication.prototype.preflightBrowserEnvironmentCheck = function (interactionType, setInteractionInProgress) {
15167
+ if (setInteractionInProgress === void 0) { setInteractionInProgress = true; }
15112
15168
  this.logger.verbose("preflightBrowserEnvironmentCheck started");
15113
15169
  // Block request if not in browser environment
15114
15170
  BrowserUtils.blockNonBrowserEnvironment(this.isBrowserEnvironment);
@@ -15127,20 +15183,23 @@ var ClientApplication = /** @class */ (function () {
15127
15183
  throw BrowserConfigurationAuthError.createInMemoryRedirectUnavailableError();
15128
15184
  }
15129
15185
  if (interactionType === exports.InteractionType.Redirect || interactionType === exports.InteractionType.Popup) {
15130
- this.preflightInteractiveRequest();
15186
+ this.preflightInteractiveRequest(setInteractionInProgress);
15131
15187
  }
15132
15188
  };
15133
15189
  /**
15134
- * Helper to validate app environment before making a request.
15135
- * @param request
15136
- * @param interactionType
15190
+ * Preflight check for interactive requests
15191
+ *
15192
+ * @protected
15193
+ * @param {boolean} setInteractionInProgress Whether to set interaction in progress temp cache flag
15137
15194
  */
15138
- ClientApplication.prototype.preflightInteractiveRequest = function () {
15195
+ ClientApplication.prototype.preflightInteractiveRequest = function (setInteractionInProgress) {
15139
15196
  this.logger.verbose("preflightInteractiveRequest called, validating app environment");
15140
15197
  // block the reload if it occurred inside a hidden iframe
15141
15198
  BrowserUtils.blockReloadInHiddenIframes();
15142
15199
  // Set interaction in progress temporary cache or throw if alread set.
15143
- this.browserStorage.setInteractionInProgress(true);
15200
+ if (setInteractionInProgress) {
15201
+ this.browserStorage.setInteractionInProgress(true);
15202
+ }
15144
15203
  };
15145
15204
  /**
15146
15205
  * Acquire a token from native device (e.g. WAM)
@@ -15449,7 +15508,8 @@ var PublicClientApplication = /** @class */ (function (_super) {
15449
15508
  _this.activeSilentTokenRequests.delete(silentRequestKey);
15450
15509
  atsMeasurement.endMeasurement({
15451
15510
  success: true,
15452
- fromCache: result.fromCache
15511
+ fromCache: result.fromCache,
15512
+ isNativeBroker: result.fromNativeBroker
15453
15513
  });
15454
15514
  atsMeasurement.flushMeasurement();
15455
15515
  return result;
@@ -15457,6 +15517,8 @@ var PublicClientApplication = /** @class */ (function (_super) {
15457
15517
  .catch(function (error) {
15458
15518
  _this.activeSilentTokenRequests.delete(silentRequestKey);
15459
15519
  atsMeasurement.endMeasurement({
15520
+ errorCode: error.errorCode,
15521
+ subErrorCode: error.subError,
15460
15522
  success: false
15461
15523
  });
15462
15524
  atsMeasurement.flushMeasurement();
@@ -15525,12 +15587,15 @@ var PublicClientApplication = /** @class */ (function (_super) {
15525
15587
  _this.eventHandler.emitEvent(exports.EventType.ACQUIRE_TOKEN_SUCCESS, exports.InteractionType.Silent, response);
15526
15588
  astsAsyncMeasurement.endMeasurement({
15527
15589
  success: true,
15528
- fromCache: response.fromCache
15590
+ fromCache: response.fromCache,
15591
+ isNativeBroker: response.fromNativeBroker
15529
15592
  });
15530
15593
  return response;
15531
15594
  }).catch(function (tokenRenewalError) {
15532
15595
  _this.eventHandler.emitEvent(exports.EventType.ACQUIRE_TOKEN_FAILURE, exports.InteractionType.Silent, null, tokenRenewalError);
15533
15596
  astsAsyncMeasurement.endMeasurement({
15597
+ errorCode: tokenRenewalError.errorCode,
15598
+ subErrorCode: tokenRenewalError.subError,
15534
15599
  success: false
15535
15600
  });
15536
15601
  throw tokenRenewalError;