@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
@@ -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
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -46,6 +46,18 @@
46
46
  return __assign$1.apply(this, arguments);
47
47
  };
48
48
 
49
+ function __rest(s, e) {
50
+ var t = {};
51
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
52
+ t[p] = s[p];
53
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
54
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
55
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
56
+ t[p[i]] = s[p[i]];
57
+ }
58
+ return t;
59
+ }
60
+
49
61
  function __awaiter$1(thisArg, _arguments, P, generator) {
50
62
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
51
63
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -107,7 +119,7 @@
107
119
  return ar;
108
120
  }
109
121
 
110
- /*! @azure/msal-common v7.2.0 2022-07-18 */
122
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
111
123
  /*! *****************************************************************************
112
124
  Copyright (c) Microsoft Corporation.
113
125
 
@@ -194,7 +206,7 @@
194
206
  return r;
195
207
  }
196
208
 
197
- /*! @azure/msal-common v7.2.0 2022-07-18 */
209
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
198
210
 
199
211
  /*
200
212
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -571,7 +583,7 @@
571
583
  JsonTypes["Jwk"] = "JWK";
572
584
  })(JsonTypes || (JsonTypes = {}));
573
585
 
574
- /*! @azure/msal-common v7.2.0 2022-07-18 */
586
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
575
587
 
576
588
  /*
577
589
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -584,6 +596,10 @@
584
596
  unexpectedError: {
585
597
  code: "unexpected_error",
586
598
  desc: "Unexpected error in authentication."
599
+ },
600
+ postRequestFailed: {
601
+ code: "post_request_failed",
602
+ desc: "Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."
587
603
  }
588
604
  };
589
605
  /**
@@ -612,10 +628,18 @@
612
628
  AuthError.createUnexpectedError = function (errDesc) {
613
629
  return new AuthError(AuthErrorMessage.unexpectedError.code, AuthErrorMessage.unexpectedError.desc + ": " + errDesc);
614
630
  };
631
+ /**
632
+ * Creates an error for post request failures.
633
+ * @param errDesc
634
+ * @returns
635
+ */
636
+ AuthError.createPostRequestFailed = function (errDesc) {
637
+ return new AuthError(AuthErrorMessage.postRequestFailed.code, AuthErrorMessage.postRequestFailed.desc + ": " + errDesc);
638
+ };
615
639
  return AuthError;
616
640
  }(Error));
617
641
 
618
- /*! @azure/msal-common v7.2.0 2022-07-18 */
642
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
619
643
 
620
644
  /*
621
645
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -690,7 +714,7 @@
690
714
  }
691
715
  };
692
716
 
693
- /*! @azure/msal-common v7.2.0 2022-07-18 */
717
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
694
718
 
695
719
  /*
696
720
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1162,7 +1186,7 @@
1162
1186
  return ClientAuthError;
1163
1187
  }(AuthError));
1164
1188
 
1165
- /*! @azure/msal-common v7.2.0 2022-07-18 */
1189
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
1166
1190
 
1167
1191
  /*
1168
1192
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1287,7 +1311,7 @@
1287
1311
  return StringUtils;
1288
1312
  }());
1289
1313
 
1290
- /*! @azure/msal-common v7.2.0 2022-07-18 */
1314
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
1291
1315
 
1292
1316
  /*
1293
1317
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1467,12 +1491,12 @@
1467
1491
  return Logger;
1468
1492
  }());
1469
1493
 
1470
- /*! @azure/msal-common v7.2.0 2022-07-18 */
1494
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
1471
1495
  /* eslint-disable header/header */
1472
1496
  var name$1 = "@azure/msal-common";
1473
- var version$1 = "7.2.0";
1497
+ var version$1 = "7.3.0";
1474
1498
 
1475
- /*! @azure/msal-common v7.2.0 2022-07-18 */
1499
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
1476
1500
  /*
1477
1501
  * Copyright (c) Microsoft Corporation. All rights reserved.
1478
1502
  * Licensed under the MIT License.
@@ -1493,7 +1517,7 @@
1493
1517
  AzureCloudInstance["AzureUsGovernment"] = "https://login.microsoftonline.us";
1494
1518
  })(exports.AzureCloudInstance || (exports.AzureCloudInstance = {}));
1495
1519
 
1496
- /*! @azure/msal-common v7.2.0 2022-07-18 */
1520
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
1497
1521
 
1498
1522
  /*
1499
1523
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1652,7 +1676,7 @@
1652
1676
  return CredentialEntity;
1653
1677
  }());
1654
1678
 
1655
- /*! @azure/msal-common v7.2.0 2022-07-18 */
1679
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
1656
1680
 
1657
1681
  /*
1658
1682
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1907,7 +1931,7 @@
1907
1931
  return ClientConfigurationError;
1908
1932
  }(ClientAuthError));
1909
1933
 
1910
- /*! @azure/msal-common v7.2.0 2022-07-18 */
1934
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
1911
1935
 
1912
1936
  /*
1913
1937
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2091,7 +2115,7 @@
2091
2115
  return ScopeSet;
2092
2116
  }());
2093
2117
 
2094
- /*! @azure/msal-common v7.2.0 2022-07-18 */
2118
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
2095
2119
 
2096
2120
  /*
2097
2121
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2129,7 +2153,7 @@
2129
2153
  };
2130
2154
  }
2131
2155
 
2132
- /*! @azure/msal-common v7.2.0 2022-07-18 */
2156
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
2133
2157
  /*
2134
2158
  * Copyright (c) Microsoft Corporation. All rights reserved.
2135
2159
  * Licensed under the MIT License.
@@ -2143,7 +2167,7 @@
2143
2167
  AuthorityType[AuthorityType["Adfs"] = 1] = "Adfs";
2144
2168
  })(AuthorityType || (AuthorityType = {}));
2145
2169
 
2146
- /*! @azure/msal-common v7.2.0 2022-07-18 */
2170
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
2147
2171
 
2148
2172
  /*
2149
2173
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2378,7 +2402,7 @@
2378
2402
  return AccountEntity;
2379
2403
  }());
2380
2404
 
2381
- /*! @azure/msal-common v7.2.0 2022-07-18 */
2405
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
2382
2406
 
2383
2407
  /*
2384
2408
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2416,7 +2440,7 @@
2416
2440
  return AuthToken;
2417
2441
  }());
2418
2442
 
2419
- /*! @azure/msal-common v7.2.0 2022-07-18 */
2443
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
2420
2444
 
2421
2445
  /*
2422
2446
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3290,7 +3314,7 @@
3290
3314
  return DefaultStorageClass;
3291
3315
  }(CacheManager));
3292
3316
 
3293
- /*! @azure/msal-common v7.2.0 2022-07-18 */
3317
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
3294
3318
 
3295
3319
  /*
3296
3320
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3384,7 +3408,7 @@
3384
3408
  return __assign({ clientCapabilities: [], azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS, skipAuthorityMetadataCache: false }, authOptions);
3385
3409
  }
3386
3410
 
3387
- /*! @azure/msal-common v7.2.0 2022-07-18 */
3411
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
3388
3412
 
3389
3413
  /*
3390
3414
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3404,7 +3428,7 @@
3404
3428
  return ServerError;
3405
3429
  }(AuthError));
3406
3430
 
3407
- /*! @azure/msal-common v7.2.0 2022-07-18 */
3431
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
3408
3432
 
3409
3433
  /*
3410
3434
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3500,7 +3524,7 @@
3500
3524
  return ThrottlingUtils;
3501
3525
  }());
3502
3526
 
3503
- /*! @azure/msal-common v7.2.0 2022-07-18 */
3527
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
3504
3528
 
3505
3529
  /*
3506
3530
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3549,7 +3573,7 @@
3549
3573
  return NetworkManager;
3550
3574
  }());
3551
3575
 
3552
- /*! @azure/msal-common v7.2.0 2022-07-18 */
3576
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
3553
3577
  /*
3554
3578
  * Copyright (c) Microsoft Corporation. All rights reserved.
3555
3579
  * Licensed under the MIT License.
@@ -3560,7 +3584,7 @@
3560
3584
  CcsCredentialType["UPN"] = "UPN";
3561
3585
  })(CcsCredentialType || (CcsCredentialType = {}));
3562
3586
 
3563
- /*! @azure/msal-common v7.2.0 2022-07-18 */
3587
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
3564
3588
 
3565
3589
  /*
3566
3590
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3570,7 +3594,7 @@
3570
3594
  * Base application class which will construct requests to send to and handle responses from the Microsoft STS using the authorization code flow.
3571
3595
  */
3572
3596
  var BaseClient = /** @class */ (function () {
3573
- function BaseClient(configuration) {
3597
+ function BaseClient(configuration, performanceClient) {
3574
3598
  // Set the configuration
3575
3599
  this.config = buildClientConfiguration(configuration);
3576
3600
  // Initialize the logger
@@ -3587,6 +3611,8 @@
3587
3611
  this.serverTelemetryManager = this.config.serverTelemetryManager;
3588
3612
  // set Authority
3589
3613
  this.authority = this.config.authOptions.authority;
3614
+ // set performance telemetry client
3615
+ this.performanceClient = performanceClient;
3590
3616
  }
3591
3617
  /**
3592
3618
  * Creates default headers for requests to token endpoint
@@ -3649,7 +3675,7 @@
3649
3675
  return BaseClient;
3650
3676
  }());
3651
3677
 
3652
- /*! @azure/msal-common v7.2.0 2022-07-18 */
3678
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
3653
3679
 
3654
3680
  /*
3655
3681
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -3735,7 +3761,7 @@
3735
3761
  return RequestValidator;
3736
3762
  }());
3737
3763
 
3738
- /*! @azure/msal-common v7.2.0 2022-07-18 */
3764
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
3739
3765
 
3740
3766
  /*
3741
3767
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4113,7 +4139,7 @@
4113
4139
  return RequestParameterBuilder;
4114
4140
  }());
4115
4141
 
4116
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4142
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4117
4143
 
4118
4144
  /*
4119
4145
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4177,7 +4203,7 @@
4177
4203
  return IdTokenEntity;
4178
4204
  }(CredentialEntity));
4179
4205
 
4180
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4206
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4181
4207
  /*
4182
4208
  * Copyright (c) Microsoft Corporation. All rights reserved.
4183
4209
  * Licensed under the MIT License.
@@ -4227,7 +4253,7 @@
4227
4253
  return TimeUtils;
4228
4254
  }());
4229
4255
 
4230
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4256
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4231
4257
 
4232
4258
  /*
4233
4259
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4341,7 +4367,7 @@
4341
4367
  return AccessTokenEntity;
4342
4368
  }(CredentialEntity));
4343
4369
 
4344
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4370
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4345
4371
 
4346
4372
  /*
4347
4373
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4408,7 +4434,7 @@
4408
4434
  return RefreshTokenEntity;
4409
4435
  }(CredentialEntity));
4410
4436
 
4411
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4437
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4412
4438
 
4413
4439
  /*
4414
4440
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4483,7 +4509,7 @@
4483
4509
  return InteractionRequiredAuthError;
4484
4510
  }(AuthError));
4485
4511
 
4486
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4512
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4487
4513
  /*
4488
4514
  * Copyright (c) Microsoft Corporation. All rights reserved.
4489
4515
  * Licensed under the MIT License.
@@ -4499,7 +4525,7 @@
4499
4525
  return CacheRecord;
4500
4526
  }());
4501
4527
 
4502
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4528
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4503
4529
 
4504
4530
  /*
4505
4531
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4570,7 +4596,7 @@
4570
4596
  return ProtocolUtils;
4571
4597
  }());
4572
4598
 
4573
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4599
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4574
4600
 
4575
4601
  /*
4576
4602
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4771,7 +4797,7 @@
4771
4797
  return UrlString;
4772
4798
  }());
4773
4799
 
4774
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4800
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4775
4801
 
4776
4802
  /*
4777
4803
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4872,7 +4898,7 @@
4872
4898
  return PopTokenGenerator;
4873
4899
  }());
4874
4900
 
4875
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4901
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4876
4902
 
4877
4903
  /*
4878
4904
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -4942,7 +4968,7 @@
4942
4968
  return AppMetadataEntity;
4943
4969
  }());
4944
4970
 
4945
- /*! @azure/msal-common v7.2.0 2022-07-18 */
4971
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4946
4972
  /*
4947
4973
  * Copyright (c) Microsoft Corporation. All rights reserved.
4948
4974
  * Licensed under the MIT License.
@@ -4978,7 +5004,7 @@
4978
5004
  return TokenCacheContext;
4979
5005
  }());
4980
5006
 
4981
- /*! @azure/msal-common v7.2.0 2022-07-18 */
5007
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
4982
5008
 
4983
5009
  /*
4984
5010
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5249,7 +5275,7 @@
5249
5275
  return ResponseHandler;
5250
5276
  }());
5251
5277
 
5252
- /*! @azure/msal-common v7.2.0 2022-07-18 */
5278
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
5253
5279
 
5254
5280
  /*
5255
5281
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5537,7 +5563,7 @@
5537
5563
  */
5538
5564
  AuthorizationCodeClient.prototype.createAuthCodeUrlQueryString = function (request) {
5539
5565
  return __awaiter(this, void 0, void 0, function () {
5540
- var parameterBuilder, requestScopes, correlationId, accountSid, clientInfo, clientInfo, popTokenGenerator, reqCnfData;
5566
+ var parameterBuilder, requestScopes, correlationId, accountSid, accountLoginHintClaim, clientInfo, clientInfo, clientInfo, popTokenGenerator, reqCnfData;
5541
5567
  return __generator(this, function (_a) {
5542
5568
  switch (_a.label) {
5543
5569
  case 0:
@@ -5567,7 +5593,7 @@
5567
5593
  if (request.domainHint) {
5568
5594
  parameterBuilder.addDomainHint(request.domainHint);
5569
5595
  }
5570
- // Add sid or loginHint with preference for sid -> loginHint -> username of AccountInfo object
5596
+ // Add sid or loginHint with preference for login_hint claim (in request) -> sid -> loginHint (upn/email) -> username of AccountInfo object
5571
5597
  if (request.prompt !== PromptValue.SELECT_ACCOUNT) {
5572
5598
  // AAD will throw if prompt=select_account is passed with an account hint
5573
5599
  if (request.sid && request.prompt === PromptValue.NONE) {
@@ -5577,9 +5603,24 @@
5577
5603
  }
5578
5604
  else if (request.account) {
5579
5605
  accountSid = this.extractAccountSid(request.account);
5580
- // If account and loginHint are provided, we will check account first for sid before adding loginHint
5581
- if (accountSid && request.prompt === PromptValue.NONE) {
5582
- // SessionId is only used in silent calls
5606
+ accountLoginHintClaim = this.extractLoginHint(request.account);
5607
+ // If login_hint claim is present, use it over sid/username
5608
+ if (accountLoginHintClaim) {
5609
+ this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account");
5610
+ parameterBuilder.addLoginHint(accountLoginHintClaim);
5611
+ try {
5612
+ clientInfo = buildClientInfoFromHomeAccountId(request.account.homeAccountId);
5613
+ parameterBuilder.addCcsOid(clientInfo);
5614
+ }
5615
+ catch (e) {
5616
+ this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header");
5617
+ }
5618
+ }
5619
+ else if (accountSid && request.prompt === PromptValue.NONE) {
5620
+ /*
5621
+ * If account and loginHint are provided, we will check account first for sid before adding loginHint
5622
+ * SessionId is only used in silent calls
5623
+ */
5583
5624
  this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account");
5584
5625
  parameterBuilder.addSid(accountSid);
5585
5626
  try {
@@ -5587,7 +5628,7 @@
5587
5628
  parameterBuilder.addCcsOid(clientInfo);
5588
5629
  }
5589
5630
  catch (e) {
5590
- this.logger.verbose("Could not parse home account ID for CCS Header: " + e);
5631
+ this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header");
5591
5632
  }
5592
5633
  }
5593
5634
  else if (request.loginHint) {
@@ -5604,7 +5645,7 @@
5604
5645
  parameterBuilder.addCcsOid(clientInfo);
5605
5646
  }
5606
5647
  catch (e) {
5607
- this.logger.verbose("Could not parse home account ID for CCS Header: " + e);
5648
+ this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header");
5608
5649
  }
5609
5650
  }
5610
5651
  }
@@ -5675,16 +5716,135 @@
5675
5716
  * @param account
5676
5717
  */
5677
5718
  AuthorizationCodeClient.prototype.extractAccountSid = function (account) {
5678
- if (account.idTokenClaims) {
5679
- var tokenClaims = account.idTokenClaims;
5680
- return tokenClaims.sid || null;
5681
- }
5682
- return null;
5719
+ var _a;
5720
+ return ((_a = account.idTokenClaims) === null || _a === void 0 ? void 0 : _a.sid) || null;
5721
+ };
5722
+ AuthorizationCodeClient.prototype.extractLoginHint = function (account) {
5723
+ var _a;
5724
+ return ((_a = account.idTokenClaims) === null || _a === void 0 ? void 0 : _a.login_hint) || null;
5683
5725
  };
5684
5726
  return AuthorizationCodeClient;
5685
5727
  }(BaseClient));
5686
5728
 
5687
- /*! @azure/msal-common v7.2.0 2022-07-18 */
5729
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
5730
+ /*
5731
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5732
+ * Licensed under the MIT License.
5733
+ */
5734
+ /**
5735
+ * Enumeration of operations that are instrumented by have their performance measured by the PerformanceClient.
5736
+ *
5737
+ * @export
5738
+ * @enum {number}
5739
+ */
5740
+ exports.PerformanceEvents = void 0;
5741
+ (function (PerformanceEvents) {
5742
+ /**
5743
+ * acquireTokenByCode API (msal-browser and msal-node).
5744
+ * Used to acquire tokens by trading an authorization code against the token endpoint.
5745
+ */
5746
+ PerformanceEvents["AcquireTokenByCode"] = "acquireTokenByCode";
5747
+ /**
5748
+ * acquireTokenByRefreshToken API (msal-browser and msal-node).
5749
+ * Used to renew an access token using a refresh token against the token endpoint.
5750
+ */
5751
+ PerformanceEvents["AcquireTokenByRefreshToken"] = "acquireTokenByRefreshToken";
5752
+ /**
5753
+ * acquireTokenSilent API (msal-browser and msal-node).
5754
+ * Used to silently acquire a new access token (from the cache or the network).
5755
+ */
5756
+ PerformanceEvents["AcquireTokenSilent"] = "acquireTokenSilent";
5757
+ /**
5758
+ * acquireTokenSilentAsync (msal-browser).
5759
+ * Internal API for acquireTokenSilent.
5760
+ */
5761
+ PerformanceEvents["AcquireTokenSilentAsync"] = "acquireTokenSilentAsync";
5762
+ /**
5763
+ * acquireTokenPopup (msal-browser).
5764
+ * Used to acquire a new access token interactively through pop ups
5765
+ */
5766
+ PerformanceEvents["AcquireTokenPopup"] = "acquireTokenPopup";
5767
+ /**
5768
+ * getPublicKeyThumbprint API in CryptoOpts class (msal-browser).
5769
+ * Used to generate a public/private keypair and generate a public key thumbprint for pop requests.
5770
+ */
5771
+ PerformanceEvents["CryptoOptsGetPublicKeyThumbprint"] = "cryptoOptsGetPublicKeyThumbprint";
5772
+ /**
5773
+ * signJwt API in CryptoOpts class (msal-browser).
5774
+ * Used to signed a pop token.
5775
+ */
5776
+ PerformanceEvents["CryptoOptsSignJwt"] = "cryptoOptsSignJwt";
5777
+ /**
5778
+ * acquireToken API in the SilentCacheClient class (msal-browser).
5779
+ * Used to read access tokens from the cache.
5780
+ */
5781
+ PerformanceEvents["SilentCacheClientAcquireToken"] = "silentCacheClientAcquireToken";
5782
+ /**
5783
+ * acquireToken API in the SilentIframeClient class (msal-browser).
5784
+ * Used to acquire a new set of tokens from the authorize endpoint in a hidden iframe.
5785
+ */
5786
+ PerformanceEvents["SilentIframeClientAcquireToken"] = "silentIframeClientAcquireToken";
5787
+ /**
5788
+ * acquireToken API in SilentRereshClient (msal-browser).
5789
+ * Used to acquire a new set of tokens from the token endpoint using a refresh token.
5790
+ */
5791
+ PerformanceEvents["SilentRefreshClientAcquireToken"] = "silentRefreshClientAcquireToken";
5792
+ /**
5793
+ * ssoSilent API (msal-browser).
5794
+ * Used to silently acquire an authorization code and set of tokens using a hidden iframe.
5795
+ */
5796
+ PerformanceEvents["SsoSilent"] = "ssoSilent";
5797
+ /**
5798
+ * getDiscoveredAuthority API in StandardInteractionClient class (msal-browser).
5799
+ * Used to load authority metadata for a request.
5800
+ */
5801
+ PerformanceEvents["StandardInteractionClientGetDiscoveredAuthority"] = "standardInteractionClientGetDiscoveredAuthority";
5802
+ /**
5803
+ * acquireToken APIs in msal-browser.
5804
+ * Used to make an /authorize endpoint call with native brokering enabled.
5805
+ */
5806
+ PerformanceEvents["FetchAccountIdWithNativeBroker"] = "fetchAccountIdWithNativeBroker";
5807
+ /**
5808
+ * acquireToken API in NativeInteractionClient class (msal-browser).
5809
+ * Used to acquire a token from Native component when native brokering is enabled.
5810
+ */
5811
+ PerformanceEvents["NativeInteractionClientAcquireToken"] = "nativeInteractionClientAcquireToken";
5812
+ /**
5813
+ * Time spent on the network for refresh token acquisition
5814
+ */
5815
+ PerformanceEvents["RefreshTokenClientExecuteTokenRequest"] = "refreshTokenClientExecuteTokenRequest";
5816
+ /**
5817
+ * Time spent creating default headers for requests to token endpoint
5818
+ */
5819
+ PerformanceEvents["BaseClientCreateTokenRequestHeaders"] = "baseClientCreateTokenRequestHeaders";
5820
+ /**
5821
+ * Used to measure the time taken for completing embedded-broker handshake (PW-Broker).
5822
+ */
5823
+ PerformanceEvents["BrokerHandhshake"] = "brokerHandshake";
5824
+ /**
5825
+ * acquireTokenByRefreshToken API in BrokerClientApplication (PW-Broker) .
5826
+ */
5827
+ PerformanceEvents["AcquireTokenByRefreshTokenInBroker"] = "acquireTokenByRefreshTokenInBroker";
5828
+ /**
5829
+ * acquireToken API in BrokerClientApplication.
5830
+ * Used to acquire a token on behalf of the embedded application (PW-Broker).
5831
+ */
5832
+ PerformanceEvents["AcquireTokenByBroker"] = "acquireTokenByBroker";
5833
+ })(exports.PerformanceEvents || (exports.PerformanceEvents = {}));
5834
+ /**
5835
+ * State of the performance event.
5836
+ *
5837
+ * @export
5838
+ * @enum {number}
5839
+ */
5840
+ var PerformanceEventStatus;
5841
+ (function (PerformanceEventStatus) {
5842
+ PerformanceEventStatus[PerformanceEventStatus["NotStarted"] = 0] = "NotStarted";
5843
+ PerformanceEventStatus[PerformanceEventStatus["InProgress"] = 1] = "InProgress";
5844
+ PerformanceEventStatus[PerformanceEventStatus["Completed"] = 2] = "Completed";
5845
+ })(PerformanceEventStatus || (PerformanceEventStatus = {}));
5846
+
5847
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
5688
5848
 
5689
5849
  /*
5690
5850
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5695,8 +5855,8 @@
5695
5855
  */
5696
5856
  var RefreshTokenClient = /** @class */ (function (_super) {
5697
5857
  __extends(RefreshTokenClient, _super);
5698
- function RefreshTokenClient(configuration) {
5699
- return _super.call(this, configuration) || this;
5858
+ function RefreshTokenClient(configuration, performanceClient) {
5859
+ return _super.call(this, configuration, performanceClient) || this;
5700
5860
  }
5701
5861
  RefreshTokenClient.prototype.acquireToken = function (request) {
5702
5862
  return __awaiter(this, void 0, void 0, function () {
@@ -5782,13 +5942,16 @@
5782
5942
  * @param authority
5783
5943
  */
5784
5944
  RefreshTokenClient.prototype.executeTokenRequest = function (request, authority) {
5945
+ var _a;
5785
5946
  return __awaiter(this, void 0, void 0, function () {
5786
- var requestBody, queryParameters, headers, thumbprint, endpoint;
5787
- return __generator(this, function (_a) {
5788
- switch (_a.label) {
5789
- case 0: return [4 /*yield*/, this.createTokenRequestBody(request)];
5947
+ var acquireTokenMeasurement, requestBody, queryParameters, headers, thumbprint, endpoint;
5948
+ return __generator(this, function (_b) {
5949
+ switch (_b.label) {
5950
+ case 0:
5951
+ acquireTokenMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement(exports.PerformanceEvents.RefreshTokenClientExecuteTokenRequest, request.correlationId);
5952
+ return [4 /*yield*/, this.createTokenRequestBody(request)];
5790
5953
  case 1:
5791
- requestBody = _a.sent();
5954
+ requestBody = _b.sent();
5792
5955
  queryParameters = this.createTokenQueryParameters(request);
5793
5956
  headers = this.createTokenRequestHeaders(request.ccsCredential);
5794
5957
  thumbprint = {
@@ -5803,7 +5966,19 @@
5803
5966
  sshKid: request.sshKid
5804
5967
  };
5805
5968
  endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParameters);
5806
- return [2 /*return*/, this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint)];
5969
+ return [2 /*return*/, this.executePostToTokenEndpoint(endpoint, requestBody, headers, thumbprint)
5970
+ .then(function (result) {
5971
+ acquireTokenMeasurement === null || acquireTokenMeasurement === void 0 ? void 0 : acquireTokenMeasurement.endMeasurement({
5972
+ success: true
5973
+ });
5974
+ return result;
5975
+ })
5976
+ .catch(function (error) {
5977
+ acquireTokenMeasurement === null || acquireTokenMeasurement === void 0 ? void 0 : acquireTokenMeasurement.endMeasurement({
5978
+ success: false
5979
+ });
5980
+ throw error;
5981
+ })];
5807
5982
  }
5808
5983
  });
5809
5984
  });
@@ -5824,11 +5999,14 @@
5824
5999
  * @param request
5825
6000
  */
5826
6001
  RefreshTokenClient.prototype.createTokenRequestBody = function (request) {
6002
+ var _a;
5827
6003
  return __awaiter(this, void 0, void 0, function () {
5828
- var parameterBuilder, correlationId, clientAssertion, popTokenGenerator, reqCnfData, clientInfo;
5829
- return __generator(this, function (_a) {
5830
- switch (_a.label) {
6004
+ var correlationId, acquireTokenMeasurement, parameterBuilder, clientAssertion, popTokenGenerator, reqCnfData, clientInfo;
6005
+ return __generator(this, function (_b) {
6006
+ switch (_b.label) {
5831
6007
  case 0:
6008
+ correlationId = request.correlationId;
6009
+ acquireTokenMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement(exports.PerformanceEvents.BaseClientCreateTokenRequestHeaders, correlationId);
5832
6010
  parameterBuilder = new RequestParameterBuilder();
5833
6011
  parameterBuilder.addClientId(this.config.authOptions.clientId);
5834
6012
  parameterBuilder.addScopes(request.scopes);
@@ -5840,7 +6018,6 @@
5840
6018
  if (this.serverTelemetryManager) {
5841
6019
  parameterBuilder.addServerTelemetry(this.serverTelemetryManager);
5842
6020
  }
5843
- correlationId = request.correlationId || this.config.cryptoInterface.createNewGuid();
5844
6021
  parameterBuilder.addCorrelationId(correlationId);
5845
6022
  parameterBuilder.addRefreshToken(request.refreshToken);
5846
6023
  if (this.config.clientCredentials.clientSecret) {
@@ -5855,7 +6032,7 @@
5855
6032
  popTokenGenerator = new PopTokenGenerator(this.cryptoUtils);
5856
6033
  return [4 /*yield*/, popTokenGenerator.generateCnf(request)];
5857
6034
  case 1:
5858
- reqCnfData = _a.sent();
6035
+ reqCnfData = _b.sent();
5859
6036
  // SPA PoP requires full Base64Url encoded req_cnf string (unhashed)
5860
6037
  parameterBuilder.addPopToken(reqCnfData.reqCnfString);
5861
6038
  return [3 /*break*/, 3];
@@ -5865,10 +6042,13 @@
5865
6042
  parameterBuilder.addSshJwk(request.sshJwk);
5866
6043
  }
5867
6044
  else {
6045
+ acquireTokenMeasurement === null || acquireTokenMeasurement === void 0 ? void 0 : acquireTokenMeasurement.endMeasurement({
6046
+ success: false
6047
+ });
5868
6048
  throw ClientConfigurationError.createMissingSshJwkError();
5869
6049
  }
5870
6050
  }
5871
- _a.label = 3;
6051
+ _b.label = 3;
5872
6052
  case 3:
5873
6053
  if (!StringUtils.isEmptyObj(request.claims) || this.config.authOptions.clientCapabilities && this.config.authOptions.clientCapabilities.length > 0) {
5874
6054
  parameterBuilder.addClaims(request.claims, this.config.authOptions.clientCapabilities);
@@ -5889,6 +6069,9 @@
5889
6069
  break;
5890
6070
  }
5891
6071
  }
6072
+ acquireTokenMeasurement === null || acquireTokenMeasurement === void 0 ? void 0 : acquireTokenMeasurement.endMeasurement({
6073
+ success: true
6074
+ });
5892
6075
  return [2 /*return*/, parameterBuilder.createQueryString()];
5893
6076
  }
5894
6077
  });
@@ -5897,7 +6080,7 @@
5897
6080
  return RefreshTokenClient;
5898
6081
  }(BaseClient));
5899
6082
 
5900
- /*! @azure/msal-common v7.2.0 2022-07-18 */
6083
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
5901
6084
 
5902
6085
  /*
5903
6086
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5905,8 +6088,8 @@
5905
6088
  */
5906
6089
  var SilentFlowClient = /** @class */ (function (_super) {
5907
6090
  __extends(SilentFlowClient, _super);
5908
- function SilentFlowClient(configuration) {
5909
- return _super.call(this, configuration) || this;
6091
+ function SilentFlowClient(configuration, performanceClient) {
6092
+ return _super.call(this, configuration, performanceClient) || this;
5910
6093
  }
5911
6094
  /**
5912
6095
  * Retrieves a token from cache if it is still valid, or uses the cached refresh token to renew
@@ -5925,7 +6108,7 @@
5925
6108
  case 2:
5926
6109
  e_1 = _a.sent();
5927
6110
  if (e_1 instanceof ClientAuthError && e_1.errorCode === ClientAuthErrorMessage.tokenRefreshRequired.code) {
5928
- refreshTokenClient = new RefreshTokenClient(this.config);
6111
+ refreshTokenClient = new RefreshTokenClient(this.config, this.performanceClient);
5929
6112
  return [2 /*return*/, refreshTokenClient.acquireTokenByRefreshToken(request)];
5930
6113
  }
5931
6114
  else {
@@ -6013,7 +6196,7 @@
6013
6196
  return SilentFlowClient;
6014
6197
  }(BaseClient));
6015
6198
 
6016
- /*! @azure/msal-common v7.2.0 2022-07-18 */
6199
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
6017
6200
  /*
6018
6201
  * Copyright (c) Microsoft Corporation. All rights reserved.
6019
6202
  * Licensed under the MIT License.
@@ -6025,7 +6208,7 @@
6025
6208
  response.hasOwnProperty("jwks_uri"));
6026
6209
  }
6027
6210
 
6028
- /*! @azure/msal-common v7.2.0 2022-07-18 */
6211
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
6029
6212
  /*
6030
6213
  * Copyright (c) Microsoft Corporation. All rights reserved.
6031
6214
  * Licensed under the MIT License.
@@ -6034,7 +6217,7 @@
6034
6217
  var EndpointMetadata = rawMetdataJSON.endpointMetadata;
6035
6218
  var InstanceDiscoveryMetadata = rawMetdataJSON.instanceDiscoveryMetadata;
6036
6219
 
6037
- /*! @azure/msal-common v7.2.0 2022-07-18 */
6220
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
6038
6221
  /*
6039
6222
  * Copyright (c) Microsoft Corporation. All rights reserved.
6040
6223
  * Licensed under the MIT License.
@@ -6048,7 +6231,7 @@
6048
6231
  ProtocolMode["OIDC"] = "OIDC";
6049
6232
  })(exports.ProtocolMode || (exports.ProtocolMode = {}));
6050
6233
 
6051
- /*! @azure/msal-common v7.2.0 2022-07-18 */
6234
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
6052
6235
 
6053
6236
  /*
6054
6237
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6125,7 +6308,7 @@
6125
6308
  return AuthorityMetadataEntity;
6126
6309
  }());
6127
6310
 
6128
- /*! @azure/msal-common v7.2.0 2022-07-18 */
6311
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
6129
6312
  /*
6130
6313
  * Copyright (c) Microsoft Corporation. All rights reserved.
6131
6314
  * Licensed under the MIT License.
@@ -6135,7 +6318,7 @@
6135
6318
  response.hasOwnProperty("metadata"));
6136
6319
  }
6137
6320
 
6138
- /*! @azure/msal-common v7.2.0 2022-07-18 */
6321
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
6139
6322
 
6140
6323
  /*
6141
6324
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6257,7 +6440,7 @@
6257
6440
  return RegionDiscovery;
6258
6441
  }());
6259
6442
 
6260
- /*! @azure/msal-common v7.2.0 2022-07-18 */
6443
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
6261
6444
 
6262
6445
  /*
6263
6446
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6919,7 +7102,7 @@
6919
7102
  return Authority;
6920
7103
  }());
6921
7104
 
6922
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7105
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
6923
7106
 
6924
7107
  /*
6925
7108
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6980,7 +7163,7 @@
6980
7163
  return AuthorityFactory;
6981
7164
  }());
6982
7165
 
6983
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7166
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
6984
7167
 
6985
7168
  /*
6986
7169
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7011,7 +7194,7 @@
7011
7194
  return ServerTelemetryEntity;
7012
7195
  }());
7013
7196
 
7014
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7197
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
7015
7198
 
7016
7199
  /*
7017
7200
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7039,7 +7222,7 @@
7039
7222
  return ThrottlingEntity;
7040
7223
  }());
7041
7224
 
7042
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7225
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
7043
7226
 
7044
7227
  /*
7045
7228
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7056,7 +7239,7 @@
7056
7239
  }
7057
7240
  };
7058
7241
 
7059
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7242
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
7060
7243
 
7061
7244
  /*
7062
7245
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7101,7 +7284,7 @@
7101
7284
  return JoseHeaderError;
7102
7285
  }(AuthError));
7103
7286
 
7104
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7287
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
7105
7288
 
7106
7289
  /*
7107
7290
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7141,7 +7324,7 @@
7141
7324
  return JoseHeader;
7142
7325
  }());
7143
7326
 
7144
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7327
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
7145
7328
 
7146
7329
  /*
7147
7330
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7200,7 +7383,7 @@
7200
7383
  return AuthenticationHeaderParser;
7201
7384
  }());
7202
7385
 
7203
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7386
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
7204
7387
 
7205
7388
  /*
7206
7389
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7362,117 +7545,7 @@
7362
7545
  return ServerTelemetryManager;
7363
7546
  }());
7364
7547
 
7365
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7366
- /*
7367
- * Copyright (c) Microsoft Corporation. All rights reserved.
7368
- * Licensed under the MIT License.
7369
- */
7370
- /**
7371
- * Enumeration of operations that are instrumented by have their performance measured by the PerformanceClient.
7372
- *
7373
- * @export
7374
- * @enum {number}
7375
- */
7376
- exports.PerformanceEvents = void 0;
7377
- (function (PerformanceEvents) {
7378
- /**
7379
- * acquireTokenByCode API (msal-browser and msal-node).
7380
- * Used to acquire tokens by trading an authorization code against the token endpoint.
7381
- */
7382
- PerformanceEvents["AcquireTokenByCode"] = "acquireTokenByCode";
7383
- /**
7384
- * acquireTokenByRefreshToken API (msal-browser and msal-node).
7385
- * Used to renew an access token using a refresh token against the token endpoint.
7386
- */
7387
- PerformanceEvents["AcquireTokenByRefreshToken"] = "acquireTokenByRefreshToken";
7388
- /**
7389
- * acquireTokenSilent API (msal-browser and msal-node).
7390
- * Used to silently acquire a new access token (from the cache or the network).
7391
- */
7392
- PerformanceEvents["AcquireTokenSilent"] = "acquireTokenSilent";
7393
- /**
7394
- * acquireTokenSilentAsync (msal-browser).
7395
- * Internal API for acquireTokenSilent.
7396
- */
7397
- PerformanceEvents["AcquireTokenSilentAsync"] = "acquireTokenSilentAsync";
7398
- /**
7399
- * acquireTokenPopup (msal-browser).
7400
- * Used to acquire a new access token interactively through pop ups
7401
- */
7402
- PerformanceEvents["AcquireTokenPopup"] = "acquireTokenPopup";
7403
- /**
7404
- * getPublicKeyThumbprint API in CryptoOpts class (msal-browser).
7405
- * Used to generate a public/private keypair and generate a public key thumbprint for pop requests.
7406
- */
7407
- PerformanceEvents["CryptoOptsGetPublicKeyThumbprint"] = "cryptoOptsGetPublicKeyThumbprint";
7408
- /**
7409
- * signJwt API in CryptoOpts class (msal-browser).
7410
- * Used to signed a pop token.
7411
- */
7412
- PerformanceEvents["CryptoOptsSignJwt"] = "cryptoOptsSignJwt";
7413
- /**
7414
- * acquireToken API in the SilentCacheClient class (msal-browser).
7415
- * Used to read access tokens from the cache.
7416
- */
7417
- PerformanceEvents["SilentCacheClientAcquireToken"] = "silentCacheClientAcquireToken";
7418
- /**
7419
- * acquireToken API in the SilentIframeClient class (msal-browser).
7420
- * Used to acquire a new set of tokens from the authorize endpoint in a hidden iframe.
7421
- */
7422
- PerformanceEvents["SilentIframeClientAcquireToken"] = "silentIframeClientAcquireToken";
7423
- /**
7424
- * acquireToken API in SilentRereshClient (msal-browser).
7425
- * Used to acquire a new set of tokens from the token endpoint using a refresh token.
7426
- */
7427
- PerformanceEvents["SilentRefreshClientAcquireToken"] = "silentRefreshClientAcquireToken";
7428
- /**
7429
- * ssoSilent API (msal-browser).
7430
- * Used to silently acquire an authorization code and set of tokens using a hidden iframe.
7431
- */
7432
- PerformanceEvents["SsoSilent"] = "ssoSilent";
7433
- /**
7434
- * getDiscoveredAuthority API in StandardInteractionClient class (msal-browser).
7435
- * Used to load authority metadata for a request.
7436
- */
7437
- PerformanceEvents["StandardInteractionClientGetDiscoveredAuthority"] = "standardInteractionClientGetDiscoveredAuthority";
7438
- /**
7439
- * acquireToken APIs in msal-browser.
7440
- * Used to make an /authorize endpoint call with native brokering enabled.
7441
- */
7442
- PerformanceEvents["FetchAccountIdWithNativeBroker"] = "fetchAccountIdWithNativeBroker";
7443
- /**
7444
- * acquireToken API in NativeInteractionClient class (msal-browser).
7445
- * Used to acquire a token from Native component when native brokering is enabled.
7446
- */
7447
- PerformanceEvents["NativeInteractionClientAcquireToken"] = "nativeInteractionClientAcquireToken";
7448
- /**
7449
- * Used to measure the time taken for completing embedded-broker handshake (PW-Broker).
7450
- */
7451
- PerformanceEvents["BrokerHandhshake"] = "brokerHandshake";
7452
- /**
7453
- * acquireTokenByRefreshToken API in BrokerClientApplication (PW-Broker) .
7454
- */
7455
- PerformanceEvents["AcquireTokenByRefreshTokenInBroker"] = "acquireTokenByRefreshTokenInBroker";
7456
- /**
7457
- * acquireToken API in BrokerClientApplication.
7458
- * Used to acquire a token on behalf of the embedded application (PW-Broker).
7459
- */
7460
- PerformanceEvents["AcquireTokenByBroker"] = "acquireTokenByBroker";
7461
- })(exports.PerformanceEvents || (exports.PerformanceEvents = {}));
7462
- /**
7463
- * State of the performance event.
7464
- *
7465
- * @export
7466
- * @enum {number}
7467
- */
7468
- var PerformanceEventStatus;
7469
- (function (PerformanceEventStatus) {
7470
- PerformanceEventStatus[PerformanceEventStatus["NotStarted"] = 0] = "NotStarted";
7471
- PerformanceEventStatus[PerformanceEventStatus["InProgress"] = 1] = "InProgress";
7472
- PerformanceEventStatus[PerformanceEventStatus["Completed"] = 2] = "Completed";
7473
- })(PerformanceEventStatus || (PerformanceEventStatus = {}));
7474
-
7475
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7548
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
7476
7549
 
7477
7550
  /*
7478
7551
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7748,7 +7821,7 @@
7748
7821
  return PerformanceClient;
7749
7822
  }());
7750
7823
 
7751
- /*! @azure/msal-common v7.2.0 2022-07-18 */
7824
+ /*! @azure/msal-common v7.3.0 2022-08-01 */
7752
7825
 
7753
7826
  /*
7754
7827
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -9576,7 +9649,7 @@
9576
9649
 
9577
9650
  /* eslint-disable header/header */
9578
9651
  var name = "@azure/msal-browser";
9579
- var version = "2.28.0";
9652
+ var version = "2.28.1";
9580
9653
 
9581
9654
  /*
9582
9655
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -10897,7 +10970,7 @@
10897
10970
  case 0: return [4 /*yield*/, this.getClientConfiguration(serverTelemetryManager, authorityUrl, azureCloudOptions)];
10898
10971
  case 1:
10899
10972
  clientConfig = _a.sent();
10900
- return [2 /*return*/, new SilentFlowClient(clientConfig)];
10973
+ return [2 /*return*/, new SilentFlowClient(clientConfig, this.performanceClient)];
10901
10974
  }
10902
10975
  });
10903
10976
  });
@@ -11006,7 +11079,7 @@
11006
11079
  return {
11007
11080
  authority: request.authority,
11008
11081
  correlationId: this.correlationId,
11009
- scopes: ScopeSet.fromString(request.scopes).asArray(),
11082
+ scopes: ScopeSet.fromString(request.scope).asArray(),
11010
11083
  account: cachedAccount,
11011
11084
  forceRefresh: false,
11012
11085
  };
@@ -11172,7 +11245,7 @@
11172
11245
  homeAccountIdentifier = AccountEntity.generateHomeAccountId(response.client_info || Constants.EMPTY_STRING, AuthorityType.Default, this.logger, this.browserCrypto, idTokenObj);
11173
11246
  accountEntity = AccountEntity.createAccount(response.client_info, homeAccountIdentifier, idTokenObj, undefined, undefined, undefined, authorityPreferredCache, response.account.id);
11174
11247
  this.browserStorage.setAccount(accountEntity);
11175
- responseScopes = response.scopes ? ScopeSet.fromString(response.scopes) : ScopeSet.fromString(request.scopes);
11248
+ responseScopes = response.scope ? ScopeSet.fromString(response.scope) : ScopeSet.fromString(request.scope);
11176
11249
  accountProperties = response.account.properties || {};
11177
11250
  uid = accountProperties["UID"] || idTokenObj.claims.oid || idTokenObj.claims.sub || Constants.EMPTY_STRING;
11178
11251
  tid = accountProperties["TenantId"] || idTokenObj.claims.tid || Constants.EMPTY_STRING;
@@ -11260,7 +11333,7 @@
11260
11333
  response.hasOwnProperty("id_token") &&
11261
11334
  response.hasOwnProperty("client_info") &&
11262
11335
  response.hasOwnProperty("account") &&
11263
- response.hasOwnProperty("scopes") &&
11336
+ response.hasOwnProperty("scope") &&
11264
11337
  response.hasOwnProperty("expires_in")) {
11265
11338
  return response;
11266
11339
  }
@@ -11302,7 +11375,7 @@
11302
11375
  */
11303
11376
  NativeInteractionClient.prototype.initializeNativeRequest = function (request) {
11304
11377
  return __awaiter$1(this, void 0, void 0, function () {
11305
- var authority, canonicalAuthority, scopes, scopeSet, getPrompt, validatedRequest, shrParameters, popTokenGenerator, reqCnfData;
11378
+ var authority, canonicalAuthority, scopes, remainingProperties, scopeSet, getPrompt, validatedRequest, shrParameters, popTokenGenerator, reqCnfData;
11306
11379
  var _this = this;
11307
11380
  return __generator$1(this, function (_a) {
11308
11381
  switch (_a.label) {
@@ -11311,8 +11384,8 @@
11311
11384
  authority = request.authority || this.config.auth.authority;
11312
11385
  canonicalAuthority = new UrlString(authority);
11313
11386
  canonicalAuthority.validateAsUri();
11314
- scopes = request && request.scopes || [];
11315
- scopeSet = new ScopeSet(scopes);
11387
+ scopes = request.scopes, remainingProperties = __rest(request, ["scopes"]);
11388
+ scopeSet = new ScopeSet(scopes || []);
11316
11389
  scopeSet.appendScopes(OIDC_DEFAULT_SCOPES);
11317
11390
  getPrompt = function () {
11318
11391
  // If request is silent, prompt is always none
@@ -11339,7 +11412,7 @@
11339
11412
  throw BrowserAuthError.createNativePromptParameterNotSupportedError();
11340
11413
  }
11341
11414
  };
11342
- 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?
11415
+ 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?
11343
11416
  });
11344
11417
  if (!(request.authenticationScheme === exports.AuthenticationScheme.POP)) return [3 /*break*/, 2];
11345
11418
  shrParameters = {
@@ -12889,7 +12962,7 @@
12889
12962
  case 0: return [4 /*yield*/, this.getClientConfiguration(serverTelemetryManager, authorityUrl, azureCloudOptions)];
12890
12963
  case 1:
12891
12964
  clientConfig = _a.sent();
12892
- return [2 /*return*/, new RefreshTokenClient(clientConfig)];
12965
+ return [2 /*return*/, new RefreshTokenClient(clientConfig, this.performanceClient)];
12893
12966
  }
12894
12967
  });
12895
12968
  });