@azure/msal-browser 2.28.0 → 2.28.1

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 (72) hide show
  1. package/README.md +1 -1
  2. package/dist/_virtual/_tslib.js +14 -2
  3. package/dist/_virtual/_tslib.js.map +1 -1
  4. package/dist/app/ClientApplication.js +1 -1
  5. package/dist/app/IPublicClientApplication.js +1 -1
  6. package/dist/app/PublicClientApplication.js +1 -1
  7. package/dist/broker/nativeBroker/NativeMessageHandler.js +1 -1
  8. package/dist/broker/nativeBroker/NativeRequest.d.ts +1 -1
  9. package/dist/broker/nativeBroker/NativeRequest.d.ts.map +1 -1
  10. package/dist/broker/nativeBroker/NativeResponse.d.ts +1 -1
  11. package/dist/broker/nativeBroker/NativeResponse.d.ts.map +1 -1
  12. package/dist/cache/AsyncMemoryStorage.js +1 -1
  13. package/dist/cache/BrowserCacheManager.js +1 -1
  14. package/dist/cache/BrowserStorage.js +1 -1
  15. package/dist/cache/DatabaseStorage.js +1 -1
  16. package/dist/cache/MemoryStorage.js +1 -1
  17. package/dist/cache/TokenCache.js +1 -1
  18. package/dist/config/Configuration.js +1 -1
  19. package/dist/crypto/BrowserCrypto.js +1 -1
  20. package/dist/crypto/CryptoOps.js +1 -1
  21. package/dist/crypto/GuidGenerator.js +1 -1
  22. package/dist/crypto/PkceGenerator.js +1 -1
  23. package/dist/crypto/SignedHttpRequest.js +1 -1
  24. package/dist/encode/Base64Decode.js +1 -1
  25. package/dist/encode/Base64Encode.js +1 -1
  26. package/dist/error/BrowserAuthError.js +1 -1
  27. package/dist/error/BrowserConfigurationAuthError.js +1 -1
  28. package/dist/error/NativeAuthError.js +1 -1
  29. package/dist/event/EventHandler.js +1 -1
  30. package/dist/event/EventMessage.js +1 -1
  31. package/dist/event/EventType.js +1 -1
  32. package/dist/index.cjs.js +282 -209
  33. package/dist/index.cjs.js.map +1 -1
  34. package/dist/index.js +1 -1
  35. package/dist/interaction_client/BaseInteractionClient.js +1 -1
  36. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +1 -1
  37. package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
  38. package/dist/interaction_client/NativeInteractionClient.js +9 -9
  39. package/dist/interaction_client/NativeInteractionClient.js.map +1 -1
  40. package/dist/interaction_client/PopupClient.js +1 -1
  41. package/dist/interaction_client/RedirectClient.js +1 -1
  42. package/dist/interaction_client/SilentAuthCodeClient.js +1 -1
  43. package/dist/interaction_client/SilentCacheClient.js +2 -2
  44. package/dist/interaction_client/SilentCacheClient.js.map +1 -1
  45. package/dist/interaction_client/SilentIframeClient.js +1 -1
  46. package/dist/interaction_client/SilentRefreshClient.js +2 -2
  47. package/dist/interaction_client/SilentRefreshClient.js.map +1 -1
  48. package/dist/interaction_client/StandardInteractionClient.js +1 -1
  49. package/dist/interaction_handler/InteractionHandler.js +1 -1
  50. package/dist/interaction_handler/RedirectHandler.js +1 -1
  51. package/dist/interaction_handler/SilentHandler.js +1 -1
  52. package/dist/internals.js +1 -1
  53. package/dist/navigation/NavigationClient.js +1 -1
  54. package/dist/network/FetchClient.js +1 -1
  55. package/dist/network/XhrClient.js +1 -1
  56. package/dist/packageMetadata.d.ts +1 -1
  57. package/dist/packageMetadata.js +2 -2
  58. package/dist/packageMetadata.js.map +1 -1
  59. package/dist/request/PopupRequest.d.ts +1 -1
  60. package/dist/request/RedirectRequest.d.ts +1 -1
  61. package/dist/request/SsoSilentRequest.d.ts +1 -1
  62. package/dist/telemetry/BrowserPerformanceClient.js +1 -1
  63. package/dist/telemetry/BrowserPerformanceMeasurement.js +1 -1
  64. package/dist/utils/BrowserConstants.js +1 -1
  65. package/dist/utils/BrowserProtocolUtils.js +1 -1
  66. package/dist/utils/BrowserStringUtils.js +1 -1
  67. package/dist/utils/BrowserUtils.js +1 -1
  68. package/dist/utils/MathUtils.js +1 -1
  69. package/lib/msal-browser.js +282 -209
  70. package/lib/msal-browser.js.map +1 -1
  71. package/lib/msal-browser.min.js +41 -41
  72. package/package.json +3 -4
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.28.0 2022-07-18 */
1
+ /*! @azure/msal-browser v2.28.1 2022-08-01 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
@@ -44,6 +44,18 @@ var __assign$1 = function() {
44
44
  return __assign$1.apply(this, arguments);
45
45
  };
46
46
 
47
+ function __rest(s, e) {
48
+ var t = {};
49
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
50
+ t[p] = s[p];
51
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
52
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
53
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
54
+ t[p[i]] = s[p[i]];
55
+ }
56
+ return t;
57
+ }
58
+
47
59
  function __awaiter$1(thisArg, _arguments, P, generator) {
48
60
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
49
61
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -105,7 +117,7 @@ function __spread() {
105
117
  return ar;
106
118
  }
107
119
 
108
- /*! @azure/msal-common v7.2.0 2022-07-18 */
120
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
109
121
  /*! *****************************************************************************
110
122
  Copyright (c) Microsoft Corporation.
111
123
 
@@ -192,7 +204,7 @@ function __spreadArrays() {
192
204
  return r;
193
205
  }
194
206
 
195
- /*! @azure/msal-common v7.2.0 2022-07-18 */
207
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
196
208
 
197
209
  /*
198
210
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -569,7 +581,7 @@ var JsonTypes;
569
581
  JsonTypes["Jwk"] = "JWK";
570
582
  })(JsonTypes || (JsonTypes = {}));
571
583
 
572
- /*! @azure/msal-common v7.2.0 2022-07-18 */
584
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
573
585
 
574
586
  /*
575
587
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -582,6 +594,10 @@ var AuthErrorMessage = {
582
594
  unexpectedError: {
583
595
  code: "unexpected_error",
584
596
  desc: "Unexpected error in authentication."
597
+ },
598
+ postRequestFailed: {
599
+ code: "post_request_failed",
600
+ desc: "Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."
585
601
  }
586
602
  };
587
603
  /**
@@ -610,10 +626,18 @@ var AuthError = /** @class */ (function (_super) {
610
626
  AuthError.createUnexpectedError = function (errDesc) {
611
627
  return new AuthError(AuthErrorMessage.unexpectedError.code, AuthErrorMessage.unexpectedError.desc + ": " + errDesc);
612
628
  };
629
+ /**
630
+ * Creates an error for post request failures.
631
+ * @param errDesc
632
+ * @returns
633
+ */
634
+ AuthError.createPostRequestFailed = function (errDesc) {
635
+ return new AuthError(AuthErrorMessage.postRequestFailed.code, AuthErrorMessage.postRequestFailed.desc + ": " + errDesc);
636
+ };
613
637
  return AuthError;
614
638
  }(Error));
615
639
 
616
- /*! @azure/msal-common v7.2.0 2022-07-18 */
640
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
617
641
 
618
642
  /*
619
643
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -688,7 +712,7 @@ var DEFAULT_CRYPTO_IMPLEMENTATION = {
688
712
  }
689
713
  };
690
714
 
691
- /*! @azure/msal-common v7.2.0 2022-07-18 */
715
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
692
716
 
693
717
  /*
694
718
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1160,7 +1184,7 @@ var ClientAuthError = /** @class */ (function (_super) {
1160
1184
  return ClientAuthError;
1161
1185
  }(AuthError));
1162
1186
 
1163
- /*! @azure/msal-common v7.2.0 2022-07-18 */
1187
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
1164
1188
 
1165
1189
  /*
1166
1190
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1285,7 +1309,7 @@ var StringUtils = /** @class */ (function () {
1285
1309
  return StringUtils;
1286
1310
  }());
1287
1311
 
1288
- /*! @azure/msal-common v7.2.0 2022-07-18 */
1312
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
1289
1313
 
1290
1314
  /*
1291
1315
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1465,12 +1489,12 @@ var Logger = /** @class */ (function () {
1465
1489
  return Logger;
1466
1490
  }());
1467
1491
 
1468
- /*! @azure/msal-common v7.2.0 2022-07-18 */
1492
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
1469
1493
  /* eslint-disable header/header */
1470
1494
  var name$1 = "@azure/msal-common";
1471
- var version$1 = "7.2.0";
1495
+ var version$1 = "7.3.0";
1472
1496
 
1473
- /*! @azure/msal-common v7.2.0 2022-07-18 */
1497
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
1474
1498
  /*
1475
1499
  * Copyright (c) Microsoft Corporation. All rights reserved.
1476
1500
  * Licensed under the MIT License.
@@ -1491,7 +1515,7 @@ exports.AzureCloudInstance = void 0;
1491
1515
  AzureCloudInstance["AzureUsGovernment"] = "https://login.microsoftonline.us";
1492
1516
  })(exports.AzureCloudInstance || (exports.AzureCloudInstance = {}));
1493
1517
 
1494
- /*! @azure/msal-common v7.2.0 2022-07-18 */
1518
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
1495
1519
 
1496
1520
  /*
1497
1521
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1650,7 +1674,7 @@ var CredentialEntity = /** @class */ (function () {
1650
1674
  return CredentialEntity;
1651
1675
  }());
1652
1676
 
1653
- /*! @azure/msal-common v7.2.0 2022-07-18 */
1677
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
1654
1678
 
1655
1679
  /*
1656
1680
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1905,7 +1929,7 @@ var ClientConfigurationError = /** @class */ (function (_super) {
1905
1929
  return ClientConfigurationError;
1906
1930
  }(ClientAuthError));
1907
1931
 
1908
- /*! @azure/msal-common v7.2.0 2022-07-18 */
1932
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
1909
1933
 
1910
1934
  /*
1911
1935
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2089,7 +2113,7 @@ var ScopeSet = /** @class */ (function () {
2089
2113
  return ScopeSet;
2090
2114
  }());
2091
2115
 
2092
- /*! @azure/msal-common v7.2.0 2022-07-18 */
2116
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
2093
2117
 
2094
2118
  /*
2095
2119
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2127,7 +2151,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
2127
2151
  };
2128
2152
  }
2129
2153
 
2130
- /*! @azure/msal-common v7.2.0 2022-07-18 */
2154
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
2131
2155
  /*
2132
2156
  * Copyright (c) Microsoft Corporation. All rights reserved.
2133
2157
  * Licensed under the MIT License.
@@ -2141,7 +2165,7 @@ var AuthorityType;
2141
2165
  AuthorityType[AuthorityType["Adfs"] = 1] = "Adfs";
2142
2166
  })(AuthorityType || (AuthorityType = {}));
2143
2167
 
2144
- /*! @azure/msal-common v7.2.0 2022-07-18 */
2168
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
2145
2169
 
2146
2170
  /*
2147
2171
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2376,7 +2400,7 @@ var AccountEntity = /** @class */ (function () {
2376
2400
  return AccountEntity;
2377
2401
  }());
2378
2402
 
2379
- /*! @azure/msal-common v7.2.0 2022-07-18 */
2403
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
2380
2404
 
2381
2405
  /*
2382
2406
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2414,7 +2438,7 @@ var AuthToken = /** @class */ (function () {
2414
2438
  return AuthToken;
2415
2439
  }());
2416
2440
 
2417
- /*! @azure/msal-common v7.2.0 2022-07-18 */
2441
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
2418
2442
 
2419
2443
  /*
2420
2444
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3288,7 +3312,7 @@ var DefaultStorageClass = /** @class */ (function (_super) {
3288
3312
  return DefaultStorageClass;
3289
3313
  }(CacheManager));
3290
3314
 
3291
- /*! @azure/msal-common v7.2.0 2022-07-18 */
3315
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
3292
3316
 
3293
3317
  /*
3294
3318
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3382,7 +3406,7 @@ function buildAuthOptions(authOptions) {
3382
3406
  return __assign({ clientCapabilities: [], azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS, skipAuthorityMetadataCache: false }, authOptions);
3383
3407
  }
3384
3408
 
3385
- /*! @azure/msal-common v7.2.0 2022-07-18 */
3409
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
3386
3410
 
3387
3411
  /*
3388
3412
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3402,7 +3426,7 @@ var ServerError = /** @class */ (function (_super) {
3402
3426
  return ServerError;
3403
3427
  }(AuthError));
3404
3428
 
3405
- /*! @azure/msal-common v7.2.0 2022-07-18 */
3429
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
3406
3430
 
3407
3431
  /*
3408
3432
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3498,7 +3522,7 @@ var ThrottlingUtils = /** @class */ (function () {
3498
3522
  return ThrottlingUtils;
3499
3523
  }());
3500
3524
 
3501
- /*! @azure/msal-common v7.2.0 2022-07-18 */
3525
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
3502
3526
 
3503
3527
  /*
3504
3528
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3547,7 +3571,7 @@ var NetworkManager = /** @class */ (function () {
3547
3571
  return NetworkManager;
3548
3572
  }());
3549
3573
 
3550
- /*! @azure/msal-common v7.2.0 2022-07-18 */
3574
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
3551
3575
  /*
3552
3576
  * Copyright (c) Microsoft Corporation. All rights reserved.
3553
3577
  * Licensed under the MIT License.
@@ -3558,7 +3582,7 @@ var CcsCredentialType;
3558
3582
  CcsCredentialType["UPN"] = "UPN";
3559
3583
  })(CcsCredentialType || (CcsCredentialType = {}));
3560
3584
 
3561
- /*! @azure/msal-common v7.2.0 2022-07-18 */
3585
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
3562
3586
 
3563
3587
  /*
3564
3588
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3568,7 +3592,7 @@ var CcsCredentialType;
3568
3592
  * Base application class which will construct requests to send to and handle responses from the Microsoft STS using the authorization code flow.
3569
3593
  */
3570
3594
  var BaseClient = /** @class */ (function () {
3571
- function BaseClient(configuration) {
3595
+ function BaseClient(configuration, performanceClient) {
3572
3596
  // Set the configuration
3573
3597
  this.config = buildClientConfiguration(configuration);
3574
3598
  // Initialize the logger
@@ -3585,6 +3609,8 @@ var BaseClient = /** @class */ (function () {
3585
3609
  this.serverTelemetryManager = this.config.serverTelemetryManager;
3586
3610
  // set Authority
3587
3611
  this.authority = this.config.authOptions.authority;
3612
+ // set performance telemetry client
3613
+ this.performanceClient = performanceClient;
3588
3614
  }
3589
3615
  /**
3590
3616
  * Creates default headers for requests to token endpoint
@@ -3647,7 +3673,7 @@ var BaseClient = /** @class */ (function () {
3647
3673
  return BaseClient;
3648
3674
  }());
3649
3675
 
3650
- /*! @azure/msal-common v7.2.0 2022-07-18 */
3676
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
3651
3677
 
3652
3678
  /*
3653
3679
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3733,7 +3759,7 @@ var RequestValidator = /** @class */ (function () {
3733
3759
  return RequestValidator;
3734
3760
  }());
3735
3761
 
3736
- /*! @azure/msal-common v7.2.0 2022-07-18 */
3762
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
3737
3763
 
3738
3764
  /*
3739
3765
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4111,7 +4137,7 @@ var RequestParameterBuilder = /** @class */ (function () {
4111
4137
  return RequestParameterBuilder;
4112
4138
  }());
4113
4139
 
4114
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4140
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4115
4141
 
4116
4142
  /*
4117
4143
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4175,7 +4201,7 @@ var IdTokenEntity = /** @class */ (function (_super) {
4175
4201
  return IdTokenEntity;
4176
4202
  }(CredentialEntity));
4177
4203
 
4178
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4204
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4179
4205
  /*
4180
4206
  * Copyright (c) Microsoft Corporation. All rights reserved.
4181
4207
  * Licensed under the MIT License.
@@ -4225,7 +4251,7 @@ var TimeUtils = /** @class */ (function () {
4225
4251
  return TimeUtils;
4226
4252
  }());
4227
4253
 
4228
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4254
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4229
4255
 
4230
4256
  /*
4231
4257
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4339,7 +4365,7 @@ var AccessTokenEntity = /** @class */ (function (_super) {
4339
4365
  return AccessTokenEntity;
4340
4366
  }(CredentialEntity));
4341
4367
 
4342
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4368
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4343
4369
 
4344
4370
  /*
4345
4371
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4406,7 +4432,7 @@ var RefreshTokenEntity = /** @class */ (function (_super) {
4406
4432
  return RefreshTokenEntity;
4407
4433
  }(CredentialEntity));
4408
4434
 
4409
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4435
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4410
4436
 
4411
4437
  /*
4412
4438
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4481,7 +4507,7 @@ var InteractionRequiredAuthError = /** @class */ (function (_super) {
4481
4507
  return InteractionRequiredAuthError;
4482
4508
  }(AuthError));
4483
4509
 
4484
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4510
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4485
4511
  /*
4486
4512
  * Copyright (c) Microsoft Corporation. All rights reserved.
4487
4513
  * Licensed under the MIT License.
@@ -4497,7 +4523,7 @@ var CacheRecord = /** @class */ (function () {
4497
4523
  return CacheRecord;
4498
4524
  }());
4499
4525
 
4500
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4526
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4501
4527
 
4502
4528
  /*
4503
4529
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4568,7 +4594,7 @@ var ProtocolUtils = /** @class */ (function () {
4568
4594
  return ProtocolUtils;
4569
4595
  }());
4570
4596
 
4571
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4597
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4572
4598
 
4573
4599
  /*
4574
4600
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4769,7 +4795,7 @@ var UrlString = /** @class */ (function () {
4769
4795
  return UrlString;
4770
4796
  }());
4771
4797
 
4772
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4798
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4773
4799
 
4774
4800
  /*
4775
4801
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4870,7 +4896,7 @@ var PopTokenGenerator = /** @class */ (function () {
4870
4896
  return PopTokenGenerator;
4871
4897
  }());
4872
4898
 
4873
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4899
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4874
4900
 
4875
4901
  /*
4876
4902
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4940,7 +4966,7 @@ var AppMetadataEntity = /** @class */ (function () {
4940
4966
  return AppMetadataEntity;
4941
4967
  }());
4942
4968
 
4943
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4969
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4944
4970
  /*
4945
4971
  * Copyright (c) Microsoft Corporation. All rights reserved.
4946
4972
  * Licensed under the MIT License.
@@ -4976,7 +5002,7 @@ var AppMetadataEntity = /** @class */ (function () {
4976
5002
  return TokenCacheContext;
4977
5003
  }());
4978
5004
 
4979
- /*! @azure/msal-common v7.2.0 2022-07-18 */
5005
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4980
5006
 
4981
5007
  /*
4982
5008
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5247,7 +5273,7 @@ var ResponseHandler = /** @class */ (function () {
5247
5273
  return ResponseHandler;
5248
5274
  }());
5249
5275
 
5250
- /*! @azure/msal-common v7.2.0 2022-07-18 */
5276
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
5251
5277
 
5252
5278
  /*
5253
5279
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5535,7 +5561,7 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
5535
5561
  */
5536
5562
  AuthorizationCodeClient.prototype.createAuthCodeUrlQueryString = function (request) {
5537
5563
  return __awaiter(this, void 0, void 0, function () {
5538
- var parameterBuilder, requestScopes, correlationId, accountSid, clientInfo, clientInfo, popTokenGenerator, reqCnfData;
5564
+ var parameterBuilder, requestScopes, correlationId, accountSid, accountLoginHintClaim, clientInfo, clientInfo, clientInfo, popTokenGenerator, reqCnfData;
5539
5565
  return __generator(this, function (_a) {
5540
5566
  switch (_a.label) {
5541
5567
  case 0:
@@ -5565,7 +5591,7 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
5565
5591
  if (request.domainHint) {
5566
5592
  parameterBuilder.addDomainHint(request.domainHint);
5567
5593
  }
5568
- // Add sid or loginHint with preference for sid -> loginHint -> username of AccountInfo object
5594
+ // Add sid or loginHint with preference for login_hint claim (in request) -> sid -> loginHint (upn/email) -> username of AccountInfo object
5569
5595
  if (request.prompt !== PromptValue.SELECT_ACCOUNT) {
5570
5596
  // AAD will throw if prompt=select_account is passed with an account hint
5571
5597
  if (request.sid && request.prompt === PromptValue.NONE) {
@@ -5575,9 +5601,24 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
5575
5601
  }
5576
5602
  else if (request.account) {
5577
5603
  accountSid = this.extractAccountSid(request.account);
5578
- // If account and loginHint are provided, we will check account first for sid before adding loginHint
5579
- if (accountSid && request.prompt === PromptValue.NONE) {
5580
- // SessionId is only used in silent calls
5604
+ accountLoginHintClaim = this.extractLoginHint(request.account);
5605
+ // If login_hint claim is present, use it over sid/username
5606
+ if (accountLoginHintClaim) {
5607
+ this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account");
5608
+ parameterBuilder.addLoginHint(accountLoginHintClaim);
5609
+ try {
5610
+ clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId);
5611
+ parameterBuilder.addCcsOid(clientInfo);
5612
+ }
5613
+ catch (e) {
5614
+ this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header");
5615
+ }
5616
+ }
5617
+ else if (accountSid && request.prompt === PromptValue.NONE) {
5618
+ /*
5619
+ * If account and loginHint are provided, we will check account first for sid before adding loginHint
5620
+ * SessionId is only used in silent calls
5621
+ */
5581
5622
  this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account");
5582
5623
  parameterBuilder.addSid(accountSid);
5583
5624
  try {
@@ -5585,7 +5626,7 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
5585
5626
  parameterBuilder.addCcsOid(clientInfo);
5586
5627
  }
5587
5628
  catch (e) {
5588
- this.logger.verbose("Could not parse home account ID for CCS Header: " + e);
5629
+ this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header");
5589
5630
  }
5590
5631
  }
5591
5632
  else if (request.loginHint) {
@@ -5602,7 +5643,7 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
5602
5643
  parameterBuilder.addCcsOid(clientInfo);
5603
5644
  }
5604
5645
  catch (e) {
5605
- this.logger.verbose("Could not parse home account ID for CCS Header: " + e);
5646
+ this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header");
5606
5647
  }
5607
5648
  }
5608
5649
  }
@@ -5673,16 +5714,135 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
5673
5714
  * @param account
5674
5715
  */
5675
5716
  AuthorizationCodeClient.prototype.extractAccountSid = function (account) {
5676
- if (account.idTokenClaims) {
5677
- var tokenClaims = account.idTokenClaims;
5678
- return tokenClaims.sid || null;
5679
- }
5680
- return null;
5717
+ var _a;
5718
+ return ((_a = account.idTokenClaims) === null || _a === void 0 ? void 0 : _a.sid) || null;
5719
+ };
5720
+ AuthorizationCodeClient.prototype.extractLoginHint = function (account) {
5721
+ var _a;
5722
+ return ((_a = account.idTokenClaims) === null || _a === void 0 ? void 0 : _a.login_hint) || null;
5681
5723
  };
5682
5724
  return AuthorizationCodeClient;
5683
5725
  }(BaseClient));
5684
5726
 
5685
- /*! @azure/msal-common v7.2.0 2022-07-18 */
5727
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
5728
+ /*
5729
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5730
+ * Licensed under the MIT License.
5731
+ */
5732
+ /**
5733
+ * Enumeration of operations that are instrumented by have their performance measured by the PerformanceClient.
5734
+ *
5735
+ * @export
5736
+ * @enum {number}
5737
+ */
5738
+ exports.PerformanceEvents = void 0;
5739
+ (function (PerformanceEvents) {
5740
+ /**
5741
+ * acquireTokenByCode API (msal-browser and msal-node).
5742
+ * Used to acquire tokens by trading an authorization code against the token endpoint.
5743
+ */
5744
+ PerformanceEvents["AcquireTokenByCode"] = "acquireTokenByCode";
5745
+ /**
5746
+ * acquireTokenByRefreshToken API (msal-browser and msal-node).
5747
+ * Used to renew an access token using a refresh token against the token endpoint.
5748
+ */
5749
+ PerformanceEvents["AcquireTokenByRefreshToken"] = "acquireTokenByRefreshToken";
5750
+ /**
5751
+ * acquireTokenSilent API (msal-browser and msal-node).
5752
+ * Used to silently acquire a new access token (from the cache or the network).
5753
+ */
5754
+ PerformanceEvents["AcquireTokenSilent"] = "acquireTokenSilent";
5755
+ /**
5756
+ * acquireTokenSilentAsync (msal-browser).
5757
+ * Internal API for acquireTokenSilent.
5758
+ */
5759
+ PerformanceEvents["AcquireTokenSilentAsync"] = "acquireTokenSilentAsync";
5760
+ /**
5761
+ * acquireTokenPopup (msal-browser).
5762
+ * Used to acquire a new access token interactively through pop ups
5763
+ */
5764
+ PerformanceEvents["AcquireTokenPopup"] = "acquireTokenPopup";
5765
+ /**
5766
+ * getPublicKeyThumbprint API in CryptoOpts class (msal-browser).
5767
+ * Used to generate a public/private keypair and generate a public key thumbprint for pop requests.
5768
+ */
5769
+ PerformanceEvents["CryptoOptsGetPublicKeyThumbprint"] = "cryptoOptsGetPublicKeyThumbprint";
5770
+ /**
5771
+ * signJwt API in CryptoOpts class (msal-browser).
5772
+ * Used to signed a pop token.
5773
+ */
5774
+ PerformanceEvents["CryptoOptsSignJwt"] = "cryptoOptsSignJwt";
5775
+ /**
5776
+ * acquireToken API in the SilentCacheClient class (msal-browser).
5777
+ * Used to read access tokens from the cache.
5778
+ */
5779
+ PerformanceEvents["SilentCacheClientAcquireToken"] = "silentCacheClientAcquireToken";
5780
+ /**
5781
+ * acquireToken API in the SilentIframeClient class (msal-browser).
5782
+ * Used to acquire a new set of tokens from the authorize endpoint in a hidden iframe.
5783
+ */
5784
+ PerformanceEvents["SilentIframeClientAcquireToken"] = "silentIframeClientAcquireToken";
5785
+ /**
5786
+ * acquireToken API in SilentRereshClient (msal-browser).
5787
+ * Used to acquire a new set of tokens from the token endpoint using a refresh token.
5788
+ */
5789
+ PerformanceEvents["SilentRefreshClientAcquireToken"] = "silentRefreshClientAcquireToken";
5790
+ /**
5791
+ * ssoSilent API (msal-browser).
5792
+ * Used to silently acquire an authorization code and set of tokens using a hidden iframe.
5793
+ */
5794
+ PerformanceEvents["SsoSilent"] = "ssoSilent";
5795
+ /**
5796
+ * getDiscoveredAuthority API in StandardInteractionClient class (msal-browser).
5797
+ * Used to load authority metadata for a request.
5798
+ */
5799
+ PerformanceEvents["StandardInteractionClientGetDiscoveredAuthority"] = "standardInteractionClientGetDiscoveredAuthority";
5800
+ /**
5801
+ * acquireToken APIs in msal-browser.
5802
+ * Used to make an /authorize endpoint call with native brokering enabled.
5803
+ */
5804
+ PerformanceEvents["FetchAccountIdWithNativeBroker"] = "fetchAccountIdWithNativeBroker";
5805
+ /**
5806
+ * acquireToken API in NativeInteractionClient class (msal-browser).
5807
+ * Used to acquire a token from Native component when native brokering is enabled.
5808
+ */
5809
+ PerformanceEvents["NativeInteractionClientAcquireToken"] = "nativeInteractionClientAcquireToken";
5810
+ /**
5811
+ * Time spent on the network for refresh token acquisition
5812
+ */
5813
+ PerformanceEvents["RefreshTokenClientExecuteTokenRequest"] = "refreshTokenClientExecuteTokenRequest";
5814
+ /**
5815
+ * Time spent creating default headers for requests to token endpoint
5816
+ */
5817
+ PerformanceEvents["BaseClientCreateTokenRequestHeaders"] = "baseClientCreateTokenRequestHeaders";
5818
+ /**
5819
+ * Used to measure the time taken for completing embedded-broker handshake (PW-Broker).
5820
+ */
5821
+ PerformanceEvents["BrokerHandhshake"] = "brokerHandshake";
5822
+ /**
5823
+ * acquireTokenByRefreshToken API in BrokerClientApplication (PW-Broker) .
5824
+ */
5825
+ PerformanceEvents["AcquireTokenByRefreshTokenInBroker"] = "acquireTokenByRefreshTokenInBroker";
5826
+ /**
5827
+ * acquireToken API in BrokerClientApplication.
5828
+ * Used to acquire a token on behalf of the embedded application (PW-Broker).
5829
+ */
5830
+ PerformanceEvents["AcquireTokenByBroker"] = "acquireTokenByBroker";
5831
+ })(exports.PerformanceEvents || (exports.PerformanceEvents = {}));
5832
+ /**
5833
+ * State of the performance event.
5834
+ *
5835
+ * @export
5836
+ * @enum {number}
5837
+ */
5838
+ var PerformanceEventStatus;
5839
+ (function (PerformanceEventStatus) {
5840
+ PerformanceEventStatus[PerformanceEventStatus["NotStarted"] = 0] = "NotStarted";
5841
+ PerformanceEventStatus[PerformanceEventStatus["InProgress"] = 1] = "InProgress";
5842
+ PerformanceEventStatus[PerformanceEventStatus["Completed"] = 2] = "Completed";
5843
+ })(PerformanceEventStatus || (PerformanceEventStatus = {}));
5844
+
5845
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
5686
5846
 
5687
5847
  /*
5688
5848
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5693,8 +5853,8 @@ var AuthorizationCodeClient = /** @class */ (function (_super) {
5693
5853
  */
5694
5854
  var RefreshTokenClient = /** @class */ (function (_super) {
5695
5855
  __extends(RefreshTokenClient, _super);
5696
- function RefreshTokenClient(configuration) {
5697
- return _super.call(this, configuration) || this;
5856
+ function RefreshTokenClient(configuration, performanceClient) {
5857
+ return _super.call(this, configuration, performanceClient) || this;
5698
5858
  }
5699
5859
  RefreshTokenClient.prototype.acquireToken = function (request) {
5700
5860
  return __awaiter(this, void 0, void 0, function () {
@@ -5780,13 +5940,16 @@ var RefreshTokenClient = /** @class */ (function (_super) {
5780
5940
  * @param authority
5781
5941
  */
5782
5942
  RefreshTokenClient.prototype.executeTokenRequest = function (request, authority) {
5943
+ var _a;
5783
5944
  return __awaiter(this, void 0, void 0, function () {
5784
- var requestBody, queryParameters, headers, thumbprint, endpoint;
5785
- return __generator(this, function (_a) {
5786
- switch (_a.label) {
5787
- case 0: return [4 /*yield*/, this.createTokenRequestBody(request)];
5945
+ var acquireTokenMeasurement, requestBody, queryParameters, headers, thumbprint, endpoint;
5946
+ return __generator(this, function (_b) {
5947
+ switch (_b.label) {
5948
+ case 0:
5949
+ acquireTokenMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement(exports.PerformanceEvents.RefreshTokenClientExecuteTokenRequest, request.correlationId);
5950
+ return [4 /*yield*/, this.createTokenRequestBody(request)];
5788
5951
  case 1:
5789
- requestBody = _a.sent();
5952
+ requestBody = _b.sent();
5790
5953
  queryParameters = this.createTokenQueryParameters(request);
5791
5954
  headers = this.createTokenRequestHeaders(request.ccsCredential);
5792
5955
  thumbprint = {
@@ -5801,7 +5964,19 @@ var RefreshTokenClient = /** @class */ (function (_super) {
5801
5964
  sshKid: request.sshKid
5802
5965
  };
5803
5966
  endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParameters);
5804
- return [2 /*return*/, this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint)];
5967
+ return [2 /*return*/, this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint)
5968
+ .then(function (result) {
5969
+ acquireTokenMeasurement === null || acquireTokenMeasurement === void 0 ? void 0 : acquireTokenMeasurement.endMeasurement({
5970
+ success: true
5971
+ });
5972
+ return result;
5973
+ })
5974
+ .catch(function (error) {
5975
+ acquireTokenMeasurement === null || acquireTokenMeasurement === void 0 ? void 0 : acquireTokenMeasurement.endMeasurement({
5976
+ success: false
5977
+ });
5978
+ throw error;
5979
+ })];
5805
5980
  }
5806
5981
  });
5807
5982
  });
@@ -5822,11 +5997,14 @@ var RefreshTokenClient = /** @class */ (function (_super) {
5822
5997
  * @param request
5823
5998
  */
5824
5999
  RefreshTokenClient.prototype.createTokenRequestBody = function (request) {
6000
+ var _a;
5825
6001
  return __awaiter(this, void 0, void 0, function () {
5826
- var parameterBuilder, correlationId, clientAssertion, popTokenGenerator, reqCnfData, clientInfo;
5827
- return __generator(this, function (_a) {
5828
- switch (_a.label) {
6002
+ var correlationId, acquireTokenMeasurement, parameterBuilder, clientAssertion, popTokenGenerator, reqCnfData, clientInfo;
6003
+ return __generator(this, function (_b) {
6004
+ switch (_b.label) {
5829
6005
  case 0:
6006
+ correlationId = request.correlationId;
6007
+ acquireTokenMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement(exports.PerformanceEvents.BaseClientCreateTokenRequestHeaders, correlationId);
5830
6008
  parameterBuilder = new RequestParameterBuilder();
5831
6009
  parameterBuilder.addClientId(this.config.authOptions.clientId);
5832
6010
  parameterBuilder.addScopes(request.scopes);
@@ -5838,7 +6016,6 @@ var RefreshTokenClient = /** @class */ (function (_super) {
5838
6016
  if (this.serverTelemetryManager) {
5839
6017
  parameterBuilder.addServerTelemetry(this.serverTelemetryManager);
5840
6018
  }
5841
- correlationId = request.correlationId || this.config.cryptoInterface.createNewGuid();
5842
6019
  parameterBuilder.addCorrelationId(correlationId);
5843
6020
  parameterBuilder.addRefreshToken(request.refreshToken);
5844
6021
  if (this.config.clientCredentials.clientSecret) {
@@ -5853,7 +6030,7 @@ var RefreshTokenClient = /** @class */ (function (_super) {
5853
6030
  popTokenGenerator = new PopTokenGenerator(this.cryptoUtils);
5854
6031
  return [4 /*yield*/, popTokenGenerator.generateCnf(request)];
5855
6032
  case 1:
5856
- reqCnfData = _a.sent();
6033
+ reqCnfData = _b.sent();
5857
6034
  // SPA PoP requires full Base64Url encoded req_cnf string (unhashed)
5858
6035
  parameterBuilder.addPopToken(reqCnfData.reqCnfString);
5859
6036
  return [3 /*break*/, 3];
@@ -5863,10 +6040,13 @@ var RefreshTokenClient = /** @class */ (function (_super) {
5863
6040
  parameterBuilder.addSshJwk(request.sshJwk);
5864
6041
  }
5865
6042
  else {
6043
+ acquireTokenMeasurement === null || acquireTokenMeasurement === void 0 ? void 0 : acquireTokenMeasurement.endMeasurement({
6044
+ success: false
6045
+ });
5866
6046
  throw ClientConfigurationError.createMissingSshJwkError();
5867
6047
  }
5868
6048
  }
5869
- _a.label = 3;
6049
+ _b.label = 3;
5870
6050
  case 3:
5871
6051
  if (!StringUtils.isEmptyObj(request.claims) || this.config.authOptions.clientCapabilities && this.config.authOptions.clientCapabilities.length > 0) {
5872
6052
  parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities);
@@ -5887,6 +6067,9 @@ var RefreshTokenClient = /** @class */ (function (_super) {
5887
6067
  break;
5888
6068
  }
5889
6069
  }
6070
+ acquireTokenMeasurement === null || acquireTokenMeasurement === void 0 ? void 0 : acquireTokenMeasurement.endMeasurement({
6071
+ success: true
6072
+ });
5890
6073
  return [2 /*return*/, parameterBuilder.createQueryString()];
5891
6074
  }
5892
6075
  });
@@ -5895,7 +6078,7 @@ var RefreshTokenClient = /** @class */ (function (_super) {
5895
6078
  return RefreshTokenClient;
5896
6079
  }(BaseClient));
5897
6080
 
5898
- /*! @azure/msal-common v7.2.0 2022-07-18 */
6081
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
5899
6082
 
5900
6083
  /*
5901
6084
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5903,8 +6086,8 @@ var RefreshTokenClient = /** @class */ (function (_super) {
5903
6086
  */
5904
6087
  var SilentFlowClient = /** @class */ (function (_super) {
5905
6088
  __extends(SilentFlowClient, _super);
5906
- function SilentFlowClient(configuration) {
5907
- return _super.call(this, configuration) || this;
6089
+ function SilentFlowClient(configuration, performanceClient) {
6090
+ return _super.call(this, configuration, performanceClient) || this;
5908
6091
  }
5909
6092
  /**
5910
6093
  * Retrieves a token from cache if it is still valid, or uses the cached refresh token to renew
@@ -5923,7 +6106,7 @@ var SilentFlowClient = /** @class */ (function (_super) {
5923
6106
  case 2:
5924
6107
  e_1 = _a.sent();
5925
6108
  if (e_1 instanceof ClientAuthError && e_1.errorCode === ClientAuthErrorMessage.tokenRefreshRequired.code) {
5926
- refreshTokenClient = new RefreshTokenClient(this.config);
6109
+ refreshTokenClient = new RefreshTokenClient(this.config, this.performanceClient);
5927
6110
  return [2 /*return*/, refreshTokenClient.acquireTokenByRefreshToken(request)];
5928
6111
  }
5929
6112
  else {
@@ -6011,7 +6194,7 @@ var SilentFlowClient = /** @class */ (function (_super) {
6011
6194
  return SilentFlowClient;
6012
6195
  }(BaseClient));
6013
6196
 
6014
- /*! @azure/msal-common v7.2.0 2022-07-18 */
6197
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
6015
6198
  /*
6016
6199
  * Copyright (c) Microsoft Corporation. All rights reserved.
6017
6200
  * Licensed under the MIT License.
@@ -6023,7 +6206,7 @@ function isOpenIdConfigResponse(response) {
6023
6206
  response.hasOwnProperty("jwks_uri"));
6024
6207
  }
6025
6208
 
6026
- /*! @azure/msal-common v7.2.0 2022-07-18 */
6209
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
6027
6210
  /*
6028
6211
  * Copyright (c) Microsoft Corporation. All rights reserved.
6029
6212
  * Licensed under the MIT License.
@@ -6032,7 +6215,7 @@ var rawMetdataJSON = { "endpointMetadata": { "https://login.microsoftonline.com/
6032
6215
  var EndpointMetadata = rawMetdataJSON.endpointMetadata;
6033
6216
  var InstanceDiscoveryMetadata = rawMetdataJSON.instanceDiscoveryMetadata;
6034
6217
 
6035
- /*! @azure/msal-common v7.2.0 2022-07-18 */
6218
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
6036
6219
  /*
6037
6220
  * Copyright (c) Microsoft Corporation. All rights reserved.
6038
6221
  * Licensed under the MIT License.
@@ -6046,7 +6229,7 @@ exports.ProtocolMode = void 0;
6046
6229
  ProtocolMode["OIDC"] = "OIDC";
6047
6230
  })(exports.ProtocolMode || (exports.ProtocolMode = {}));
6048
6231
 
6049
- /*! @azure/msal-common v7.2.0 2022-07-18 */
6232
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
6050
6233
 
6051
6234
  /*
6052
6235
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6123,7 +6306,7 @@ var AuthorityMetadataEntity = /** @class */ (function () {
6123
6306
  return AuthorityMetadataEntity;
6124
6307
  }());
6125
6308
 
6126
- /*! @azure/msal-common v7.2.0 2022-07-18 */
6309
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
6127
6310
  /*
6128
6311
  * Copyright (c) Microsoft Corporation. All rights reserved.
6129
6312
  * Licensed under the MIT License.
@@ -6133,7 +6316,7 @@ function isCloudInstanceDiscoveryResponse(response) {
6133
6316
  response.hasOwnProperty("metadata"));
6134
6317
  }
6135
6318
 
6136
- /*! @azure/msal-common v7.2.0 2022-07-18 */
6319
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
6137
6320
 
6138
6321
  /*
6139
6322
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6255,7 +6438,7 @@ var RegionDiscovery = /** @class */ (function () {
6255
6438
  return RegionDiscovery;
6256
6439
  }());
6257
6440
 
6258
- /*! @azure/msal-common v7.2.0 2022-07-18 */
6441
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
6259
6442
 
6260
6443
  /*
6261
6444
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6917,7 +7100,7 @@ var Authority = /** @class */ (function () {
6917
7100
  return Authority;
6918
7101
  }());
6919
7102
 
6920
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7103
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
6921
7104
 
6922
7105
  /*
6923
7106
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6978,7 +7161,7 @@ var AuthorityFactory = /** @class */ (function () {
6978
7161
  return AuthorityFactory;
6979
7162
  }());
6980
7163
 
6981
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7164
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
6982
7165
 
6983
7166
  /*
6984
7167
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7009,7 +7192,7 @@ var ServerTelemetryEntity = /** @class */ (function () {
7009
7192
  return ServerTelemetryEntity;
7010
7193
  }());
7011
7194
 
7012
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7195
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
7013
7196
 
7014
7197
  /*
7015
7198
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7037,7 +7220,7 @@ var ThrottlingEntity = /** @class */ (function () {
7037
7220
  return ThrottlingEntity;
7038
7221
  }());
7039
7222
 
7040
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7223
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
7041
7224
 
7042
7225
  /*
7043
7226
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7054,7 +7237,7 @@ var StubbedNetworkModule = {
7054
7237
  }
7055
7238
  };
7056
7239
 
7057
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7240
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
7058
7241
 
7059
7242
  /*
7060
7243
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7099,7 +7282,7 @@ var JoseHeaderError = /** @class */ (function (_super) {
7099
7282
  return JoseHeaderError;
7100
7283
  }(AuthError));
7101
7284
 
7102
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7285
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
7103
7286
 
7104
7287
  /*
7105
7288
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7139,7 +7322,7 @@ var JoseHeader = /** @class */ (function () {
7139
7322
  return JoseHeader;
7140
7323
  }());
7141
7324
 
7142
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7325
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
7143
7326
 
7144
7327
  /*
7145
7328
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7198,7 +7381,7 @@ var AuthenticationHeaderParser = /** @class */ (function () {
7198
7381
  return AuthenticationHeaderParser;
7199
7382
  }());
7200
7383
 
7201
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7384
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
7202
7385
 
7203
7386
  /*
7204
7387
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7360,117 +7543,7 @@ var ServerTelemetryManager = /** @class */ (function () {
7360
7543
  return ServerTelemetryManager;
7361
7544
  }());
7362
7545
 
7363
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7364
- /*
7365
- * Copyright (c) Microsoft Corporation. All rights reserved.
7366
- * Licensed under the MIT License.
7367
- */
7368
- /**
7369
- * Enumeration of operations that are instrumented by have their performance measured by the PerformanceClient.
7370
- *
7371
- * @export
7372
- * @enum {number}
7373
- */
7374
- exports.PerformanceEvents = void 0;
7375
- (function (PerformanceEvents) {
7376
- /**
7377
- * acquireTokenByCode API (msal-browser and msal-node).
7378
- * Used to acquire tokens by trading an authorization code against the token endpoint.
7379
- */
7380
- PerformanceEvents["AcquireTokenByCode"] = "acquireTokenByCode";
7381
- /**
7382
- * acquireTokenByRefreshToken API (msal-browser and msal-node).
7383
- * Used to renew an access token using a refresh token against the token endpoint.
7384
- */
7385
- PerformanceEvents["AcquireTokenByRefreshToken"] = "acquireTokenByRefreshToken";
7386
- /**
7387
- * acquireTokenSilent API (msal-browser and msal-node).
7388
- * Used to silently acquire a new access token (from the cache or the network).
7389
- */
7390
- PerformanceEvents["AcquireTokenSilent"] = "acquireTokenSilent";
7391
- /**
7392
- * acquireTokenSilentAsync (msal-browser).
7393
- * Internal API for acquireTokenSilent.
7394
- */
7395
- PerformanceEvents["AcquireTokenSilentAsync"] = "acquireTokenSilentAsync";
7396
- /**
7397
- * acquireTokenPopup (msal-browser).
7398
- * Used to acquire a new access token interactively through pop ups
7399
- */
7400
- PerformanceEvents["AcquireTokenPopup"] = "acquireTokenPopup";
7401
- /**
7402
- * getPublicKeyThumbprint API in CryptoOpts class (msal-browser).
7403
- * Used to generate a public/private keypair and generate a public key thumbprint for pop requests.
7404
- */
7405
- PerformanceEvents["CryptoOptsGetPublicKeyThumbprint"] = "cryptoOptsGetPublicKeyThumbprint";
7406
- /**
7407
- * signJwt API in CryptoOpts class (msal-browser).
7408
- * Used to signed a pop token.
7409
- */
7410
- PerformanceEvents["CryptoOptsSignJwt"] = "cryptoOptsSignJwt";
7411
- /**
7412
- * acquireToken API in the SilentCacheClient class (msal-browser).
7413
- * Used to read access tokens from the cache.
7414
- */
7415
- PerformanceEvents["SilentCacheClientAcquireToken"] = "silentCacheClientAcquireToken";
7416
- /**
7417
- * acquireToken API in the SilentIframeClient class (msal-browser).
7418
- * Used to acquire a new set of tokens from the authorize endpoint in a hidden iframe.
7419
- */
7420
- PerformanceEvents["SilentIframeClientAcquireToken"] = "silentIframeClientAcquireToken";
7421
- /**
7422
- * acquireToken API in SilentRereshClient (msal-browser).
7423
- * Used to acquire a new set of tokens from the token endpoint using a refresh token.
7424
- */
7425
- PerformanceEvents["SilentRefreshClientAcquireToken"] = "silentRefreshClientAcquireToken";
7426
- /**
7427
- * ssoSilent API (msal-browser).
7428
- * Used to silently acquire an authorization code and set of tokens using a hidden iframe.
7429
- */
7430
- PerformanceEvents["SsoSilent"] = "ssoSilent";
7431
- /**
7432
- * getDiscoveredAuthority API in StandardInteractionClient class (msal-browser).
7433
- * Used to load authority metadata for a request.
7434
- */
7435
- PerformanceEvents["StandardInteractionClientGetDiscoveredAuthority"] = "standardInteractionClientGetDiscoveredAuthority";
7436
- /**
7437
- * acquireToken APIs in msal-browser.
7438
- * Used to make an /authorize endpoint call with native brokering enabled.
7439
- */
7440
- PerformanceEvents["FetchAccountIdWithNativeBroker"] = "fetchAccountIdWithNativeBroker";
7441
- /**
7442
- * acquireToken API in NativeInteractionClient class (msal-browser).
7443
- * Used to acquire a token from Native component when native brokering is enabled.
7444
- */
7445
- PerformanceEvents["NativeInteractionClientAcquireToken"] = "nativeInteractionClientAcquireToken";
7446
- /**
7447
- * Used to measure the time taken for completing embedded-broker handshake (PW-Broker).
7448
- */
7449
- PerformanceEvents["BrokerHandhshake"] = "brokerHandshake";
7450
- /**
7451
- * acquireTokenByRefreshToken API in BrokerClientApplication (PW-Broker) .
7452
- */
7453
- PerformanceEvents["AcquireTokenByRefreshTokenInBroker"] = "acquireTokenByRefreshTokenInBroker";
7454
- /**
7455
- * acquireToken API in BrokerClientApplication.
7456
- * Used to acquire a token on behalf of the embedded application (PW-Broker).
7457
- */
7458
- PerformanceEvents["AcquireTokenByBroker"] = "acquireTokenByBroker";
7459
- })(exports.PerformanceEvents || (exports.PerformanceEvents = {}));
7460
- /**
7461
- * State of the performance event.
7462
- *
7463
- * @export
7464
- * @enum {number}
7465
- */
7466
- var PerformanceEventStatus;
7467
- (function (PerformanceEventStatus) {
7468
- PerformanceEventStatus[PerformanceEventStatus["NotStarted"] = 0] = "NotStarted";
7469
- PerformanceEventStatus[PerformanceEventStatus["InProgress"] = 1] = "InProgress";
7470
- PerformanceEventStatus[PerformanceEventStatus["Completed"] = 2] = "Completed";
7471
- })(PerformanceEventStatus || (PerformanceEventStatus = {}));
7472
-
7473
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7546
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
7474
7547
 
7475
7548
  /*
7476
7549
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7746,7 +7819,7 @@ var PerformanceClient = /** @class */ (function () {
7746
7819
  return PerformanceClient;
7747
7820
  }());
7748
7821
 
7749
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7822
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
7750
7823
 
7751
7824
  /*
7752
7825
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -9574,7 +9647,7 @@ var DEFAULT_BROWSER_CACHE_MANAGER = function (clientId, logger) {
9574
9647
 
9575
9648
  /* eslint-disable header/header */
9576
9649
  var name = "@azure/msal-browser";
9577
- var version = "2.28.0";
9650
+ var version = "2.28.1";
9578
9651
 
9579
9652
  /*
9580
9653
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -10895,7 +10968,7 @@ var SilentCacheClient = /** @class */ (function (_super) {
10895
10968
  case 0: return [4 /*yield*/, this.getClientConfiguration(serverTelemetryManager, authorityUrl, azureCloudOptions)];
10896
10969
  case 1:
10897
10970
  clientConfig = _a.sent();
10898
- return [2 /*return*/, new SilentFlowClient(clientConfig)];
10971
+ return [2 /*return*/, new SilentFlowClient(clientConfig, this.performanceClient)];
10899
10972
  }
10900
10973
  });
10901
10974
  });
@@ -11004,7 +11077,7 @@ var NativeInteractionClient = /** @class */ (function (_super) {
11004
11077
  return {
11005
11078
  authority: request.authority,
11006
11079
  correlationId: this.correlationId,
11007
- scopes: ScopeSet.fromString(request.scopes).asArray(),
11080
+ scopes: ScopeSet.fromString(request.scope).asArray(),
11008
11081
  account: cachedAccount,
11009
11082
  forceRefresh: false,
11010
11083
  };
@@ -11170,7 +11243,7 @@ var NativeInteractionClient = /** @class */ (function (_super) {
11170
11243
  homeAccountIdentifier = AccountEntity.generateHomeAccountId(response.client_info || Constants.EMPTY_STRING, AuthorityType.Default, this.logger, this.browserCrypto, idTokenObj);
11171
11244
  accountEntity = AccountEntity.createAccount(response.client_info, homeAccountIdentifier, idTokenObj, undefined, undefined, undefined, authorityPreferredCache, response.account.id);
11172
11245
  this.browserStorage.setAccount(accountEntity);
11173
- responseScopes = response.scopes ? ScopeSet.fromString(response.scopes) : ScopeSet.fromString(request.scopes);
11246
+ responseScopes = response.scope ? ScopeSet.fromString(response.scope) : ScopeSet.fromString(request.scope);
11174
11247
  accountProperties = response.account.properties || {};
11175
11248
  uid = accountProperties["UID"] || idTokenObj.claims.oid || idTokenObj.claims.sub || Constants.EMPTY_STRING;
11176
11249
  tid = accountProperties["TenantId"] || idTokenObj.claims.tid || Constants.EMPTY_STRING;
@@ -11258,7 +11331,7 @@ var NativeInteractionClient = /** @class */ (function (_super) {
11258
11331
  response.hasOwnProperty("id_token") &&
11259
11332
  response.hasOwnProperty("client_info") &&
11260
11333
  response.hasOwnProperty("account") &&
11261
- response.hasOwnProperty("scopes") &&
11334
+ response.hasOwnProperty("scope") &&
11262
11335
  response.hasOwnProperty("expires_in")) {
11263
11336
  return response;
11264
11337
  }
@@ -11300,7 +11373,7 @@ var NativeInteractionClient = /** @class */ (function (_super) {
11300
11373
  */
11301
11374
  NativeInteractionClient.prototype.initializeNativeRequest = function (request) {
11302
11375
  return __awaiter$1(this, void 0, void 0, function () {
11303
- var authority, canonicalAuthority, scopes, scopeSet, getPrompt, validatedRequest, shrParameters, popTokenGenerator, reqCnfData;
11376
+ var authority, canonicalAuthority, scopes, remainingProperties, scopeSet, getPrompt, validatedRequest, shrParameters, popTokenGenerator, reqCnfData;
11304
11377
  var _this = this;
11305
11378
  return __generator$1(this, function (_a) {
11306
11379
  switch (_a.label) {
@@ -11309,8 +11382,8 @@ var NativeInteractionClient = /** @class */ (function (_super) {
11309
11382
  authority = request.authority || this.config.auth.authority;
11310
11383
  canonicalAuthority = new UrlString(authority);
11311
11384
  canonicalAuthority.validateAsUri();
11312
- scopes = request && request.scopes || [];
11313
- scopeSet = new ScopeSet(scopes);
11385
+ scopes = request.scopes, remainingProperties = __rest(request, ["scopes"]);
11386
+ scopeSet = new ScopeSet(scopes || []);
11314
11387
  scopeSet.appendScopes(OIDC_DEFAULT_SCOPES);
11315
11388
  getPrompt = function () {
11316
11389
  // If request is silent, prompt is always none
@@ -11337,7 +11410,7 @@ var NativeInteractionClient = /** @class */ (function (_super) {
11337
11410
  throw BrowserAuthError.createNativePromptParameterNotSupportedError();
11338
11411
  }
11339
11412
  };
11340
- 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), prompt: getPrompt(), 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?
11413
+ validatedRequest = __assign$1(__assign$1({}, remainingProperties), { accountId: this.accountId, clientId: this.config.auth.clientId, authority: canonicalAuthority.urlString, scope: scopeSet.printScopes(), redirectUri: this.getRedirectUri(request.redirectUri), prompt: getPrompt(), 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?
11341
11414
  });
11342
11415
  if (!(request.authenticationScheme === exports.AuthenticationScheme.POP)) return [3 /*break*/, 2];
11343
11416
  shrParameters = {
@@ -12887,7 +12960,7 @@ var SilentRefreshClient = /** @class */ (function (_super) {
12887
12960
  case 0: return [4 /*yield*/, this.getClientConfiguration(serverTelemetryManager, authorityUrl, azureCloudOptions)];
12888
12961
  case 1:
12889
12962
  clientConfig = _a.sent();
12890
- return [2 /*return*/, new RefreshTokenClient(clientConfig)];
12963
+ return [2 /*return*/, new RefreshTokenClient(clientConfig, this.performanceClient)];
12891
12964
  }
12892
12965
  });
12893
12966
  });