@azure/msal-browser 2.30.0 → 2.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/dist/_virtual/_tslib.js +1 -1
- package/dist/app/ClientApplication.d.ts.map +1 -1
- package/dist/app/ClientApplication.js +13 -9
- package/dist/app/ClientApplication.js.map +1 -1
- package/dist/app/IPublicClientApplication.js +1 -1
- package/dist/app/PublicClientApplication.d.ts.map +1 -1
- package/dist/app/PublicClientApplication.js +8 -6
- package/dist/app/PublicClientApplication.js.map +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.d.ts +11 -0
- package/dist/broker/nativeBroker/NativeMessageHandler.d.ts.map +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.js +16 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.js.map +1 -1
- package/dist/cache/AsyncMemoryStorage.js +1 -1
- package/dist/cache/BrowserCacheManager.js +1 -1
- package/dist/cache/BrowserStorage.js +1 -1
- package/dist/cache/CryptoKeyStore.js +1 -1
- package/dist/cache/DatabaseStorage.js +1 -1
- package/dist/cache/MemoryStorage.js +1 -1
- package/dist/cache/TokenCache.js +2 -2
- package/dist/cache/TokenCache.js.map +1 -1
- package/dist/config/Configuration.js +1 -1
- package/dist/crypto/BrowserCrypto.js +1 -1
- package/dist/crypto/CryptoOps.js +1 -1
- package/dist/crypto/GuidGenerator.js +1 -1
- package/dist/crypto/ModernBrowserCrypto.js +1 -1
- package/dist/crypto/MsBrowserCrypto.js +1 -1
- package/dist/crypto/MsrBrowserCrypto.js +1 -1
- package/dist/crypto/PkceGenerator.js +1 -1
- package/dist/crypto/SignedHttpRequest.js +1 -1
- package/dist/encode/Base64Decode.js +1 -1
- package/dist/encode/Base64Encode.js +1 -1
- package/dist/error/BrowserAuthError.js +1 -1
- package/dist/error/BrowserConfigurationAuthError.js +1 -1
- package/dist/error/NativeAuthError.js +1 -1
- package/dist/event/EventHandler.js +1 -1
- package/dist/event/EventMessage.js +1 -1
- package/dist/event/EventType.js +1 -1
- package/dist/index.cjs.js +203 -120
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/interaction_client/BaseInteractionClient.js +3 -3
- package/dist/interaction_client/BaseInteractionClient.js.map +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +1 -1
- package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.js +28 -7
- package/dist/interaction_client/NativeInteractionClient.js.map +1 -1
- package/dist/interaction_client/PopupClient.js +1 -1
- package/dist/interaction_client/RedirectClient.js +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.js +1 -1
- package/dist/interaction_client/SilentCacheClient.js +1 -1
- package/dist/interaction_client/SilentIframeClient.js +1 -1
- package/dist/interaction_client/SilentRefreshClient.js +1 -1
- package/dist/interaction_client/StandardInteractionClient.js +2 -2
- package/dist/interaction_client/StandardInteractionClient.js.map +1 -1
- package/dist/interaction_handler/InteractionHandler.js +2 -2
- package/dist/interaction_handler/InteractionHandler.js.map +1 -1
- package/dist/interaction_handler/RedirectHandler.js +1 -1
- package/dist/interaction_handler/SilentHandler.js +1 -1
- package/dist/internals.js +1 -1
- package/dist/navigation/NavigationClient.js +1 -1
- package/dist/network/FetchClient.js +1 -1
- package/dist/network/XhrClient.js +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.js +2 -2
- package/dist/packageMetadata.js.map +1 -1
- package/dist/telemetry/BrowserPerformanceClient.js +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.js +1 -1
- package/dist/utils/BrowserConstants.js +1 -1
- package/dist/utils/BrowserProtocolUtils.js +1 -1
- package/dist/utils/BrowserStringUtils.js +1 -1
- package/dist/utils/BrowserUtils.js +1 -1
- package/dist/utils/MathUtils.js +1 -1
- package/lib/msal-browser.js +203 -120
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +44 -44
- package/package.json +2 -2
package/lib/msal-browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v2.
|
|
1
|
+
/*! @azure/msal-browser v2.32.0 2022-11-22 */
|
|
2
2
|
'use strict';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
return ar;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
/*! @azure/msal-common
|
|
122
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
123
123
|
/*! *****************************************************************************
|
|
124
124
|
Copyright (c) Microsoft Corporation.
|
|
125
125
|
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
return r;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
/*! @azure/msal-common
|
|
209
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
210
210
|
|
|
211
211
|
/*
|
|
212
212
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -249,6 +249,7 @@
|
|
|
249
249
|
AUTHORIZATION_PENDING: "authorization_pending",
|
|
250
250
|
NOT_DEFINED: "not_defined",
|
|
251
251
|
EMPTY_STRING: "",
|
|
252
|
+
NOT_APPLICABLE: "N/A",
|
|
252
253
|
FORWARD_SLASH: "/",
|
|
253
254
|
IMDS_ENDPOINT: "http://169.254.169.254/metadata/instance/compute/location",
|
|
254
255
|
IMDS_VERSION: "2020-06-01",
|
|
@@ -587,7 +588,7 @@
|
|
|
587
588
|
JsonTypes["Jwk"] = "JWK";
|
|
588
589
|
})(JsonTypes || (JsonTypes = {}));
|
|
589
590
|
|
|
590
|
-
/*! @azure/msal-common
|
|
591
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
591
592
|
|
|
592
593
|
/*
|
|
593
594
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -643,7 +644,7 @@
|
|
|
643
644
|
return AuthError;
|
|
644
645
|
}(Error));
|
|
645
646
|
|
|
646
|
-
/*! @azure/msal-common
|
|
647
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
647
648
|
|
|
648
649
|
/*
|
|
649
650
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -718,7 +719,7 @@
|
|
|
718
719
|
}
|
|
719
720
|
};
|
|
720
721
|
|
|
721
|
-
/*! @azure/msal-common
|
|
722
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
722
723
|
|
|
723
724
|
/*
|
|
724
725
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1213,7 +1214,7 @@
|
|
|
1213
1214
|
return ClientAuthError;
|
|
1214
1215
|
}(AuthError));
|
|
1215
1216
|
|
|
1216
|
-
/*! @azure/msal-common
|
|
1217
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
1217
1218
|
|
|
1218
1219
|
/*
|
|
1219
1220
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1338,7 +1339,7 @@
|
|
|
1338
1339
|
return StringUtils;
|
|
1339
1340
|
}());
|
|
1340
1341
|
|
|
1341
|
-
/*! @azure/msal-common
|
|
1342
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
1342
1343
|
|
|
1343
1344
|
/*
|
|
1344
1345
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1518,12 +1519,12 @@
|
|
|
1518
1519
|
return Logger;
|
|
1519
1520
|
}());
|
|
1520
1521
|
|
|
1521
|
-
/*! @azure/msal-common
|
|
1522
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
1522
1523
|
/* eslint-disable header/header */
|
|
1523
1524
|
var name$1 = "@azure/msal-common";
|
|
1524
|
-
var version$1 = "
|
|
1525
|
+
var version$1 = "9.0.0";
|
|
1525
1526
|
|
|
1526
|
-
/*! @azure/msal-common
|
|
1527
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
1527
1528
|
/*
|
|
1528
1529
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1529
1530
|
* Licensed under the MIT License.
|
|
@@ -1544,7 +1545,7 @@
|
|
|
1544
1545
|
AzureCloudInstance["AzureUsGovernment"] = "https://login.microsoftonline.us";
|
|
1545
1546
|
})(exports.AzureCloudInstance || (exports.AzureCloudInstance = {}));
|
|
1546
1547
|
|
|
1547
|
-
/*! @azure/msal-common
|
|
1548
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
1548
1549
|
|
|
1549
1550
|
/*
|
|
1550
1551
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1703,7 +1704,7 @@
|
|
|
1703
1704
|
return CredentialEntity;
|
|
1704
1705
|
}());
|
|
1705
1706
|
|
|
1706
|
-
/*! @azure/msal-common
|
|
1707
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
1707
1708
|
|
|
1708
1709
|
/*
|
|
1709
1710
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1958,7 +1959,7 @@
|
|
|
1958
1959
|
return ClientConfigurationError;
|
|
1959
1960
|
}(ClientAuthError));
|
|
1960
1961
|
|
|
1961
|
-
/*! @azure/msal-common
|
|
1962
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
1962
1963
|
|
|
1963
1964
|
/*
|
|
1964
1965
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2142,7 +2143,7 @@
|
|
|
2142
2143
|
return ScopeSet;
|
|
2143
2144
|
}());
|
|
2144
2145
|
|
|
2145
|
-
/*! @azure/msal-common
|
|
2146
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
2146
2147
|
|
|
2147
2148
|
/*
|
|
2148
2149
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2180,7 +2181,7 @@
|
|
|
2180
2181
|
};
|
|
2181
2182
|
}
|
|
2182
2183
|
|
|
2183
|
-
/*! @azure/msal-common
|
|
2184
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
2184
2185
|
/*
|
|
2185
2186
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2186
2187
|
* Licensed under the MIT License.
|
|
@@ -2195,7 +2196,7 @@
|
|
|
2195
2196
|
AuthorityType[AuthorityType["Dsts"] = 2] = "Dsts";
|
|
2196
2197
|
})(AuthorityType || (AuthorityType = {}));
|
|
2197
2198
|
|
|
2198
|
-
/*! @azure/msal-common
|
|
2199
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
2199
2200
|
|
|
2200
2201
|
/*
|
|
2201
2202
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2434,7 +2435,7 @@
|
|
|
2434
2435
|
return AccountEntity;
|
|
2435
2436
|
}());
|
|
2436
2437
|
|
|
2437
|
-
/*! @azure/msal-common
|
|
2438
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
2438
2439
|
|
|
2439
2440
|
/*
|
|
2440
2441
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2486,7 +2487,7 @@
|
|
|
2486
2487
|
return AuthToken;
|
|
2487
2488
|
}());
|
|
2488
2489
|
|
|
2489
|
-
/*! @azure/msal-common
|
|
2490
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
2490
2491
|
|
|
2491
2492
|
/*
|
|
2492
2493
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3365,7 +3366,7 @@
|
|
|
3365
3366
|
return DefaultStorageClass;
|
|
3366
3367
|
}(CacheManager));
|
|
3367
3368
|
|
|
3368
|
-
/*! @azure/msal-common
|
|
3369
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
3369
3370
|
|
|
3370
3371
|
/*
|
|
3371
3372
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3459,7 +3460,7 @@
|
|
|
3459
3460
|
return __assign({ clientCapabilities: [], azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS, skipAuthorityMetadataCache: false }, authOptions);
|
|
3460
3461
|
}
|
|
3461
3462
|
|
|
3462
|
-
/*! @azure/msal-common
|
|
3463
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
3463
3464
|
|
|
3464
3465
|
/*
|
|
3465
3466
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3479,7 +3480,7 @@
|
|
|
3479
3480
|
return ServerError;
|
|
3480
3481
|
}(AuthError));
|
|
3481
3482
|
|
|
3482
|
-
/*! @azure/msal-common
|
|
3483
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
3483
3484
|
|
|
3484
3485
|
/*
|
|
3485
3486
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3575,7 +3576,7 @@
|
|
|
3575
3576
|
return ThrottlingUtils;
|
|
3576
3577
|
}());
|
|
3577
3578
|
|
|
3578
|
-
/*! @azure/msal-common
|
|
3579
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
3579
3580
|
|
|
3580
3581
|
/*
|
|
3581
3582
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3624,7 +3625,7 @@
|
|
|
3624
3625
|
return NetworkManager;
|
|
3625
3626
|
}());
|
|
3626
3627
|
|
|
3627
|
-
/*! @azure/msal-common
|
|
3628
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
3628
3629
|
/*
|
|
3629
3630
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3630
3631
|
* Licensed under the MIT License.
|
|
@@ -3635,7 +3636,7 @@
|
|
|
3635
3636
|
CcsCredentialType["UPN"] = "UPN";
|
|
3636
3637
|
})(CcsCredentialType || (CcsCredentialType = {}));
|
|
3637
3638
|
|
|
3638
|
-
/*! @azure/msal-common
|
|
3639
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
3639
3640
|
|
|
3640
3641
|
/*
|
|
3641
3642
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3726,7 +3727,7 @@
|
|
|
3726
3727
|
return BaseClient;
|
|
3727
3728
|
}());
|
|
3728
3729
|
|
|
3729
|
-
/*! @azure/msal-common
|
|
3730
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
3730
3731
|
|
|
3731
3732
|
/*
|
|
3732
3733
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3812,7 +3813,7 @@
|
|
|
3812
3813
|
return RequestValidator;
|
|
3813
3814
|
}());
|
|
3814
3815
|
|
|
3815
|
-
/*! @azure/msal-common
|
|
3816
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
3816
3817
|
|
|
3817
3818
|
/*
|
|
3818
3819
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4190,7 +4191,7 @@
|
|
|
4190
4191
|
return RequestParameterBuilder;
|
|
4191
4192
|
}());
|
|
4192
4193
|
|
|
4193
|
-
/*! @azure/msal-common
|
|
4194
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
4194
4195
|
|
|
4195
4196
|
/*
|
|
4196
4197
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4254,7 +4255,7 @@
|
|
|
4254
4255
|
return IdTokenEntity;
|
|
4255
4256
|
}(CredentialEntity));
|
|
4256
4257
|
|
|
4257
|
-
/*! @azure/msal-common
|
|
4258
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
4258
4259
|
/*
|
|
4259
4260
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4260
4261
|
* Licensed under the MIT License.
|
|
@@ -4304,7 +4305,7 @@
|
|
|
4304
4305
|
return TimeUtils;
|
|
4305
4306
|
}());
|
|
4306
4307
|
|
|
4307
|
-
/*! @azure/msal-common
|
|
4308
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
4308
4309
|
|
|
4309
4310
|
/*
|
|
4310
4311
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4418,7 +4419,7 @@
|
|
|
4418
4419
|
return AccessTokenEntity;
|
|
4419
4420
|
}(CredentialEntity));
|
|
4420
4421
|
|
|
4421
|
-
/*! @azure/msal-common
|
|
4422
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
4422
4423
|
|
|
4423
4424
|
/*
|
|
4424
4425
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4485,7 +4486,7 @@
|
|
|
4485
4486
|
return RefreshTokenEntity;
|
|
4486
4487
|
}(CredentialEntity));
|
|
4487
4488
|
|
|
4488
|
-
/*! @azure/msal-common
|
|
4489
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
4489
4490
|
|
|
4490
4491
|
/*
|
|
4491
4492
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4560,7 +4561,7 @@
|
|
|
4560
4561
|
return InteractionRequiredAuthError;
|
|
4561
4562
|
}(AuthError));
|
|
4562
4563
|
|
|
4563
|
-
/*! @azure/msal-common
|
|
4564
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
4564
4565
|
/*
|
|
4565
4566
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4566
4567
|
* Licensed under the MIT License.
|
|
@@ -4576,7 +4577,7 @@
|
|
|
4576
4577
|
return CacheRecord;
|
|
4577
4578
|
}());
|
|
4578
4579
|
|
|
4579
|
-
/*! @azure/msal-common
|
|
4580
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
4580
4581
|
|
|
4581
4582
|
/*
|
|
4582
4583
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4647,7 +4648,7 @@
|
|
|
4647
4648
|
return ProtocolUtils;
|
|
4648
4649
|
}());
|
|
4649
4650
|
|
|
4650
|
-
/*! @azure/msal-common
|
|
4651
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
4651
4652
|
|
|
4652
4653
|
/*
|
|
4653
4654
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4881,7 +4882,7 @@
|
|
|
4881
4882
|
return UrlString;
|
|
4882
4883
|
}());
|
|
4883
4884
|
|
|
4884
|
-
/*! @azure/msal-common
|
|
4885
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
4885
4886
|
|
|
4886
4887
|
/*
|
|
4887
4888
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4982,7 +4983,7 @@
|
|
|
4982
4983
|
return PopTokenGenerator;
|
|
4983
4984
|
}());
|
|
4984
4985
|
|
|
4985
|
-
/*! @azure/msal-common
|
|
4986
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
4986
4987
|
|
|
4987
4988
|
/*
|
|
4988
4989
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5052,7 +5053,7 @@
|
|
|
5052
5053
|
return AppMetadataEntity;
|
|
5053
5054
|
}());
|
|
5054
5055
|
|
|
5055
|
-
/*! @azure/msal-common
|
|
5056
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
5056
5057
|
/*
|
|
5057
5058
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5058
5059
|
* Licensed under the MIT License.
|
|
@@ -5088,7 +5089,7 @@
|
|
|
5088
5089
|
return TokenCacheContext;
|
|
5089
5090
|
}());
|
|
5090
5091
|
|
|
5091
|
-
/*! @azure/msal-common
|
|
5092
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
5092
5093
|
|
|
5093
5094
|
/*
|
|
5094
5095
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5368,7 +5369,7 @@
|
|
|
5368
5369
|
return ResponseHandler;
|
|
5369
5370
|
}());
|
|
5370
5371
|
|
|
5371
|
-
/*! @azure/msal-common
|
|
5372
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
5372
5373
|
|
|
5373
5374
|
/*
|
|
5374
5375
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5821,7 +5822,7 @@
|
|
|
5821
5822
|
return AuthorizationCodeClient;
|
|
5822
5823
|
}(BaseClient));
|
|
5823
5824
|
|
|
5824
|
-
/*! @azure/msal-common
|
|
5825
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
5825
5826
|
/*
|
|
5826
5827
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5827
5828
|
* Licensed under the MIT License.
|
|
@@ -5946,7 +5947,7 @@
|
|
|
5946
5947
|
PerformanceEventStatus[PerformanceEventStatus["Completed"] = 2] = "Completed";
|
|
5947
5948
|
})(PerformanceEventStatus || (PerformanceEventStatus = {}));
|
|
5948
5949
|
|
|
5949
|
-
/*! @azure/msal-common
|
|
5950
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
5950
5951
|
|
|
5951
5952
|
/*
|
|
5952
5953
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5961,27 +5962,28 @@
|
|
|
5961
5962
|
return _super.call(this, configuration, performanceClient) || this;
|
|
5962
5963
|
}
|
|
5963
5964
|
RefreshTokenClient.prototype.acquireToken = function (request) {
|
|
5964
|
-
var _a, _b;
|
|
5965
|
+
var _a, _b, _c;
|
|
5965
5966
|
return __awaiter(this, void 0, void 0, function () {
|
|
5966
5967
|
var atsMeasurement, reqTimestamp, response, requestId, responseHandler;
|
|
5967
5968
|
var _this = this;
|
|
5968
|
-
return __generator(this, function (
|
|
5969
|
-
switch (
|
|
5969
|
+
return __generator(this, function (_d) {
|
|
5970
|
+
switch (_d.label) {
|
|
5970
5971
|
case 0:
|
|
5971
5972
|
atsMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement(exports.PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId);
|
|
5972
5973
|
this.logger.verbose("RefreshTokenClientAcquireToken called", request.correlationId);
|
|
5973
5974
|
reqTimestamp = TimeUtils.nowSeconds();
|
|
5974
5975
|
return [4 /*yield*/, this.executeTokenRequest(request, this.authority)];
|
|
5975
5976
|
case 1:
|
|
5976
|
-
response =
|
|
5977
|
-
|
|
5977
|
+
response = _d.sent();
|
|
5978
|
+
atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.addStaticFields({
|
|
5979
|
+
refreshTokenSize: ((_b = response.body.refresh_token) === null || _b === void 0 ? void 0 : _b.length) || 0
|
|
5980
|
+
});
|
|
5981
|
+
requestId = (_c = response.headers) === null || _c === void 0 ? void 0 : _c[HeaderNames.X_MS_REQUEST_ID];
|
|
5978
5982
|
responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
|
|
5979
5983
|
responseHandler.validateTokenResponse(response.body);
|
|
5980
5984
|
return [2 /*return*/, responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, undefined, undefined, true, request.forceCache, requestId).then(function (result) {
|
|
5981
|
-
var _a;
|
|
5982
5985
|
atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.endMeasurement({
|
|
5983
|
-
success: true
|
|
5984
|
-
refreshTokenSize: ((_a = response.body.refresh_token) === null || _a === void 0 ? void 0 : _a.length) || 0
|
|
5986
|
+
success: true
|
|
5985
5987
|
});
|
|
5986
5988
|
return result;
|
|
5987
5989
|
})
|
|
@@ -5990,8 +5992,7 @@
|
|
|
5990
5992
|
atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.endMeasurement({
|
|
5991
5993
|
errorCode: error.errorCode,
|
|
5992
5994
|
subErrorCode: error.subError,
|
|
5993
|
-
success: false
|
|
5994
|
-
refreshTokenSize: undefined
|
|
5995
|
+
success: false
|
|
5995
5996
|
});
|
|
5996
5997
|
throw error;
|
|
5997
5998
|
})];
|
|
@@ -6211,7 +6212,7 @@
|
|
|
6211
6212
|
return RefreshTokenClient;
|
|
6212
6213
|
}(BaseClient));
|
|
6213
6214
|
|
|
6214
|
-
/*! @azure/msal-common
|
|
6215
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
6215
6216
|
|
|
6216
6217
|
/*
|
|
6217
6218
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6335,7 +6336,7 @@
|
|
|
6335
6336
|
return SilentFlowClient;
|
|
6336
6337
|
}(BaseClient));
|
|
6337
6338
|
|
|
6338
|
-
/*! @azure/msal-common
|
|
6339
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
6339
6340
|
/*
|
|
6340
6341
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6341
6342
|
* Licensed under the MIT License.
|
|
@@ -6347,7 +6348,7 @@
|
|
|
6347
6348
|
response.hasOwnProperty("jwks_uri"));
|
|
6348
6349
|
}
|
|
6349
6350
|
|
|
6350
|
-
/*! @azure/msal-common
|
|
6351
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
6351
6352
|
/*
|
|
6352
6353
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6353
6354
|
* Licensed under the MIT License.
|
|
@@ -6356,7 +6357,7 @@
|
|
|
6356
6357
|
var EndpointMetadata = rawMetdataJSON.endpointMetadata;
|
|
6357
6358
|
var InstanceDiscoveryMetadata = rawMetdataJSON.instanceDiscoveryMetadata;
|
|
6358
6359
|
|
|
6359
|
-
/*! @azure/msal-common
|
|
6360
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
6360
6361
|
/*
|
|
6361
6362
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6362
6363
|
* Licensed under the MIT License.
|
|
@@ -6370,7 +6371,7 @@
|
|
|
6370
6371
|
ProtocolMode["OIDC"] = "OIDC";
|
|
6371
6372
|
})(exports.ProtocolMode || (exports.ProtocolMode = {}));
|
|
6372
6373
|
|
|
6373
|
-
/*! @azure/msal-common
|
|
6374
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
6374
6375
|
|
|
6375
6376
|
/*
|
|
6376
6377
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6447,7 +6448,7 @@
|
|
|
6447
6448
|
return AuthorityMetadataEntity;
|
|
6448
6449
|
}());
|
|
6449
6450
|
|
|
6450
|
-
/*! @azure/msal-common
|
|
6451
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
6451
6452
|
/*
|
|
6452
6453
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6453
6454
|
* Licensed under the MIT License.
|
|
@@ -6457,7 +6458,7 @@
|
|
|
6457
6458
|
response.hasOwnProperty("metadata"));
|
|
6458
6459
|
}
|
|
6459
6460
|
|
|
6460
|
-
/*! @azure/msal-common
|
|
6461
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
6461
6462
|
|
|
6462
6463
|
/*
|
|
6463
6464
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6579,7 +6580,7 @@
|
|
|
6579
6580
|
return RegionDiscovery;
|
|
6580
6581
|
}());
|
|
6581
6582
|
|
|
6582
|
-
/*! @azure/msal-common
|
|
6583
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
6583
6584
|
|
|
6584
6585
|
/*
|
|
6585
6586
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6590,7 +6591,7 @@
|
|
|
6590
6591
|
* endpoint. It will store the pertinent config data in this object for use during token calls.
|
|
6591
6592
|
*/
|
|
6592
6593
|
var Authority = /** @class */ (function () {
|
|
6593
|
-
function Authority(authority, networkInterface, cacheManager, authorityOptions, proxyUrl) {
|
|
6594
|
+
function Authority(authority, networkInterface, cacheManager, authorityOptions, logger, proxyUrl) {
|
|
6594
6595
|
this.canonicalAuthority = authority;
|
|
6595
6596
|
this._canonicalAuthority.validateAsUri();
|
|
6596
6597
|
this.networkInterface = networkInterface;
|
|
@@ -6599,6 +6600,7 @@
|
|
|
6599
6600
|
this.regionDiscovery = new RegionDiscovery(networkInterface);
|
|
6600
6601
|
this.regionDiscoveryMetadata = { region_used: undefined, region_source: undefined, region_outcome: undefined };
|
|
6601
6602
|
this.proxyUrl = proxyUrl || Constants.EMPTY_STRING;
|
|
6603
|
+
this.logger = logger;
|
|
6602
6604
|
}
|
|
6603
6605
|
Object.defineProperty(Authority.prototype, "authorityType", {
|
|
6604
6606
|
// See above for AuthorityType
|
|
@@ -7025,36 +7027,50 @@
|
|
|
7025
7027
|
*/
|
|
7026
7028
|
Authority.prototype.updateCloudDiscoveryMetadata = function (metadataEntity) {
|
|
7027
7029
|
return __awaiter(this, void 0, void 0, function () {
|
|
7028
|
-
var metadata, harcodedMetadata;
|
|
7030
|
+
var metadata, metadataEntityExpired, harcodedMetadata;
|
|
7029
7031
|
return __generator(this, function (_a) {
|
|
7030
7032
|
switch (_a.label) {
|
|
7031
7033
|
case 0:
|
|
7034
|
+
this.logger.verbose("Attempting to get cloud discovery metadata in the config");
|
|
7035
|
+
this.logger.verbosePii("Known Authorities: " + (this.authorityOptions.knownAuthorities || Constants.NOT_APPLICABLE));
|
|
7036
|
+
this.logger.verbosePii("Authority Metadata: " + (this.authorityOptions.authorityMetadata || Constants.NOT_APPLICABLE));
|
|
7037
|
+
this.logger.verbosePii("Canonical Authority: " + (metadataEntity.canonical_authority || Constants.NOT_APPLICABLE));
|
|
7032
7038
|
metadata = this.getCloudDiscoveryMetadataFromConfig();
|
|
7033
7039
|
if (metadata) {
|
|
7040
|
+
this.logger.verbose("Found cloud discovery metadata in the config.");
|
|
7034
7041
|
metadataEntity.updateCloudDiscoveryMetadata(metadata, false);
|
|
7035
7042
|
return [2 /*return*/, AuthorityMetadataSource.CONFIG];
|
|
7036
7043
|
}
|
|
7037
|
-
// If
|
|
7038
|
-
|
|
7044
|
+
// If the cached metadata came from config but that config was not passed to this instance, we must go to the network
|
|
7045
|
+
this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the cache.");
|
|
7046
|
+
metadataEntityExpired = metadataEntity.isExpired();
|
|
7047
|
+
if (this.isAuthoritySameType(metadataEntity) && metadataEntity.aliasesFromNetwork && !metadataEntityExpired) {
|
|
7048
|
+
this.logger.verbose("Found metadata in the cache.");
|
|
7039
7049
|
// No need to update
|
|
7040
7050
|
return [2 /*return*/, AuthorityMetadataSource.CACHE];
|
|
7041
7051
|
}
|
|
7042
|
-
|
|
7052
|
+
else if (metadataEntityExpired) {
|
|
7053
|
+
this.logger.verbose("The metadata entity is expired.");
|
|
7054
|
+
}
|
|
7055
|
+
this.logger.verbose("Did not find cloud discovery metadata in the cache... Attempting to get cloud discovery metadata from the network.");
|
|
7043
7056
|
return [4 /*yield*/, this.getCloudDiscoveryMetadataFromNetwork()];
|
|
7044
7057
|
case 1:
|
|
7045
7058
|
metadata = _a.sent();
|
|
7046
7059
|
if (metadata) {
|
|
7060
|
+
this.logger.verbose("Found cloud discovery metadata from the network.");
|
|
7047
7061
|
metadataEntity.updateCloudDiscoveryMetadata(metadata, true);
|
|
7048
7062
|
return [2 /*return*/, AuthorityMetadataSource.NETWORK];
|
|
7049
7063
|
}
|
|
7064
|
+
this.logger.verbose("Did not find cloud discovery metadata from the network... Attempting to get cloud discovery metadata from hardcoded values.");
|
|
7065
|
+
harcodedMetadata = this.getCloudDiscoveryMetadataFromHarcodedValues();
|
|
7050
7066
|
if (harcodedMetadata && !this.options.skipAuthorityMetadataCache) {
|
|
7067
|
+
this.logger.verbose("Found cloud discovery metadata from hardcoded values.");
|
|
7051
7068
|
metadataEntity.updateCloudDiscoveryMetadata(harcodedMetadata, false);
|
|
7052
7069
|
return [2 /*return*/, AuthorityMetadataSource.HARDCODED_VALUES];
|
|
7053
7070
|
}
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
}
|
|
7071
|
+
// Metadata could not be obtained from config, cache or network
|
|
7072
|
+
this.logger.verbose("Did not find cloud discovery metadata from hardcoded values... Metadata could not be obtained from config, cache, network or hardcoded value. Throwing Untrusted Authority Error.");
|
|
7073
|
+
throw ClientConfigurationError.createUntrustedAuthorityError();
|
|
7058
7074
|
}
|
|
7059
7075
|
});
|
|
7060
7076
|
});
|
|
@@ -7065,19 +7081,28 @@
|
|
|
7065
7081
|
Authority.prototype.getCloudDiscoveryMetadataFromConfig = function () {
|
|
7066
7082
|
// Check if network response was provided in config
|
|
7067
7083
|
if (this.authorityOptions.cloudDiscoveryMetadata) {
|
|
7084
|
+
this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");
|
|
7068
7085
|
try {
|
|
7086
|
+
this.logger.verbose("Attempting to parse the cloud discovery metadata.");
|
|
7069
7087
|
var parsedResponse = JSON.parse(this.authorityOptions.cloudDiscoveryMetadata);
|
|
7070
7088
|
var metadata = Authority.getCloudDiscoveryMetadataFromNetworkResponse(parsedResponse.metadata, this.hostnameAndPort);
|
|
7089
|
+
this.logger.verbose("Parsed the cloud discovery metadata.");
|
|
7071
7090
|
if (metadata) {
|
|
7091
|
+
this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata.");
|
|
7072
7092
|
return metadata;
|
|
7073
7093
|
}
|
|
7094
|
+
else {
|
|
7095
|
+
this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.");
|
|
7096
|
+
}
|
|
7074
7097
|
}
|
|
7075
7098
|
catch (e) {
|
|
7099
|
+
this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error.");
|
|
7076
7100
|
throw ClientConfigurationError.createInvalidCloudDiscoveryMetadataError();
|
|
7077
7101
|
}
|
|
7078
7102
|
}
|
|
7079
7103
|
// If cloudDiscoveryMetadata is empty or does not contain the host, check knownAuthorities
|
|
7080
7104
|
if (this.isInKnownAuthorities()) {
|
|
7105
|
+
this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host.");
|
|
7081
7106
|
return Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);
|
|
7082
7107
|
}
|
|
7083
7108
|
return null;
|
|
@@ -7251,7 +7276,7 @@
|
|
|
7251
7276
|
return Authority;
|
|
7252
7277
|
}());
|
|
7253
7278
|
|
|
7254
|
-
/*! @azure/msal-common
|
|
7279
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
7255
7280
|
|
|
7256
7281
|
/*
|
|
7257
7282
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7270,13 +7295,13 @@
|
|
|
7270
7295
|
* @param networkClient
|
|
7271
7296
|
* @param protocolMode
|
|
7272
7297
|
*/
|
|
7273
|
-
AuthorityFactory.createDiscoveredInstance = function (authorityUri, networkClient, cacheManager, authorityOptions, proxyUrl) {
|
|
7298
|
+
AuthorityFactory.createDiscoveredInstance = function (authorityUri, networkClient, cacheManager, authorityOptions, logger, proxyUrl) {
|
|
7274
7299
|
return __awaiter(this, void 0, void 0, function () {
|
|
7275
7300
|
var acquireTokenAuthority, e_1;
|
|
7276
7301
|
return __generator(this, function (_a) {
|
|
7277
7302
|
switch (_a.label) {
|
|
7278
7303
|
case 0:
|
|
7279
|
-
acquireTokenAuthority = AuthorityFactory.createInstance(authorityUri, networkClient, cacheManager, authorityOptions, proxyUrl);
|
|
7304
|
+
acquireTokenAuthority = AuthorityFactory.createInstance(authorityUri, networkClient, cacheManager, authorityOptions, logger, proxyUrl);
|
|
7280
7305
|
_a.label = 1;
|
|
7281
7306
|
case 1:
|
|
7282
7307
|
_a.trys.push([1, 3, , 4]);
|
|
@@ -7302,17 +7327,17 @@
|
|
|
7302
7327
|
* @param networkInterface
|
|
7303
7328
|
* @param protocolMode
|
|
7304
7329
|
*/
|
|
7305
|
-
AuthorityFactory.createInstance = function (authorityUrl, networkInterface, cacheManager, authorityOptions, proxyUrl) {
|
|
7330
|
+
AuthorityFactory.createInstance = function (authorityUrl, networkInterface, cacheManager, authorityOptions, logger, proxyUrl) {
|
|
7306
7331
|
// Throw error if authority url is empty
|
|
7307
7332
|
if (StringUtils.isEmpty(authorityUrl)) {
|
|
7308
7333
|
throw ClientConfigurationError.createUrlEmptyError();
|
|
7309
7334
|
}
|
|
7310
|
-
return new Authority(authorityUrl, networkInterface, cacheManager, authorityOptions, proxyUrl);
|
|
7335
|
+
return new Authority(authorityUrl, networkInterface, cacheManager, authorityOptions, logger, proxyUrl);
|
|
7311
7336
|
};
|
|
7312
7337
|
return AuthorityFactory;
|
|
7313
7338
|
}());
|
|
7314
7339
|
|
|
7315
|
-
/*! @azure/msal-common
|
|
7340
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
7316
7341
|
|
|
7317
7342
|
/*
|
|
7318
7343
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7343,7 +7368,7 @@
|
|
|
7343
7368
|
return ServerTelemetryEntity;
|
|
7344
7369
|
}());
|
|
7345
7370
|
|
|
7346
|
-
/*! @azure/msal-common
|
|
7371
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
7347
7372
|
|
|
7348
7373
|
/*
|
|
7349
7374
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7371,7 +7396,7 @@
|
|
|
7371
7396
|
return ThrottlingEntity;
|
|
7372
7397
|
}());
|
|
7373
7398
|
|
|
7374
|
-
/*! @azure/msal-common
|
|
7399
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
7375
7400
|
|
|
7376
7401
|
/*
|
|
7377
7402
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7388,7 +7413,7 @@
|
|
|
7388
7413
|
}
|
|
7389
7414
|
};
|
|
7390
7415
|
|
|
7391
|
-
/*! @azure/msal-common
|
|
7416
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
7392
7417
|
|
|
7393
7418
|
/*
|
|
7394
7419
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7433,7 +7458,7 @@
|
|
|
7433
7458
|
return JoseHeaderError;
|
|
7434
7459
|
}(AuthError));
|
|
7435
7460
|
|
|
7436
|
-
/*! @azure/msal-common
|
|
7461
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
7437
7462
|
|
|
7438
7463
|
/*
|
|
7439
7464
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7473,7 +7498,7 @@
|
|
|
7473
7498
|
return JoseHeader;
|
|
7474
7499
|
}());
|
|
7475
7500
|
|
|
7476
|
-
/*! @azure/msal-common
|
|
7501
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
7477
7502
|
|
|
7478
7503
|
/*
|
|
7479
7504
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7532,7 +7557,7 @@
|
|
|
7532
7557
|
return AuthenticationHeaderParser;
|
|
7533
7558
|
}());
|
|
7534
7559
|
|
|
7535
|
-
/*! @azure/msal-common
|
|
7560
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
7536
7561
|
|
|
7537
7562
|
/*
|
|
7538
7563
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7694,7 +7719,7 @@
|
|
|
7694
7719
|
return ServerTelemetryManager;
|
|
7695
7720
|
}());
|
|
7696
7721
|
|
|
7697
|
-
/*! @azure/msal-common
|
|
7722
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
7698
7723
|
|
|
7699
7724
|
/*
|
|
7700
7725
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7721,6 +7746,7 @@
|
|
|
7721
7746
|
this.logger = logger;
|
|
7722
7747
|
this.callbacks = new Map();
|
|
7723
7748
|
this.eventsByCorrelationId = new Map();
|
|
7749
|
+
this.staticFieldsByCorrelationId = new Map();
|
|
7724
7750
|
this.measurementsById = new Map();
|
|
7725
7751
|
}
|
|
7726
7752
|
/**
|
|
@@ -7747,8 +7773,6 @@
|
|
|
7747
7773
|
authority: this.authority,
|
|
7748
7774
|
libraryName: this.libraryName,
|
|
7749
7775
|
libraryVersion: this.libraryVersion,
|
|
7750
|
-
appName: (_a = this.applicationTelemetry) === null || _a === void 0 ? void 0 : _a.appName,
|
|
7751
|
-
appVersion: (_b = this.applicationTelemetry) === null || _b === void 0 ? void 0 : _b.appVersion,
|
|
7752
7776
|
clientId: this.clientId,
|
|
7753
7777
|
name: measureName,
|
|
7754
7778
|
startTimeMs: Date.now(),
|
|
@@ -7756,6 +7780,11 @@
|
|
|
7756
7780
|
};
|
|
7757
7781
|
// Store in progress events so they can be discarded if not ended properly
|
|
7758
7782
|
this.cacheEventByCorrelationId(inProgressEvent);
|
|
7783
|
+
var staticFields = {
|
|
7784
|
+
appName: (_a = this.applicationTelemetry) === null || _a === void 0 ? void 0 : _a.appName,
|
|
7785
|
+
appVersion: (_b = this.applicationTelemetry) === null || _b === void 0 ? void 0 : _b.appVersion,
|
|
7786
|
+
};
|
|
7787
|
+
this.addStaticFields(staticFields, eventCorrelationId);
|
|
7759
7788
|
this.cacheMeasurement(inProgressEvent, performanceMeasurement);
|
|
7760
7789
|
// Return the event and functions the caller can use to properly end/flush the measurement
|
|
7761
7790
|
return {
|
|
@@ -7773,6 +7802,9 @@
|
|
|
7773
7802
|
discardMeasurement: function () {
|
|
7774
7803
|
return _this.discardMeasurements(inProgressEvent.correlationId);
|
|
7775
7804
|
},
|
|
7805
|
+
addStaticFields: function (fields) {
|
|
7806
|
+
return _this.addStaticFields(fields, inProgressEvent.correlationId);
|
|
7807
|
+
},
|
|
7776
7808
|
measurement: performanceMeasurement,
|
|
7777
7809
|
event: inProgressEvent
|
|
7778
7810
|
};
|
|
@@ -7808,6 +7840,22 @@
|
|
|
7808
7840
|
}
|
|
7809
7841
|
return null;
|
|
7810
7842
|
};
|
|
7843
|
+
/**
|
|
7844
|
+
* Saves extra information to be emitted when the measurements are flushed
|
|
7845
|
+
* @param fields
|
|
7846
|
+
* @param correlationId
|
|
7847
|
+
*/
|
|
7848
|
+
PerformanceClient.prototype.addStaticFields = function (fields, correlationId) {
|
|
7849
|
+
var existingStaticFields = this.staticFieldsByCorrelationId.get(correlationId);
|
|
7850
|
+
if (existingStaticFields) {
|
|
7851
|
+
this.logger.trace("PerformanceClient: Updating static fields");
|
|
7852
|
+
this.staticFieldsByCorrelationId.set(correlationId, __assign(__assign({}, existingStaticFields), fields));
|
|
7853
|
+
}
|
|
7854
|
+
else {
|
|
7855
|
+
this.logger.trace("PerformanceClient: Adding static fields");
|
|
7856
|
+
this.staticFieldsByCorrelationId.set(correlationId, fields);
|
|
7857
|
+
}
|
|
7858
|
+
};
|
|
7811
7859
|
/**
|
|
7812
7860
|
* Upserts event into event cache.
|
|
7813
7861
|
* First key is the correlation id, second key is the event id.
|
|
@@ -7897,19 +7945,12 @@
|
|
|
7897
7945
|
else {
|
|
7898
7946
|
_this.logger.verbose("PerformanceClient: Submeasurement for " + measureName + " already exists for " + current.name + ", ignoring", correlationId);
|
|
7899
7947
|
}
|
|
7900
|
-
if (current.accessTokenSize) {
|
|
7901
|
-
previous.accessTokenSize = current.accessTokenSize;
|
|
7902
|
-
}
|
|
7903
|
-
if (current.idTokenSize) {
|
|
7904
|
-
previous.idTokenSize = current.idTokenSize;
|
|
7905
|
-
}
|
|
7906
|
-
if (current.refreshTokenSize) {
|
|
7907
|
-
previous.refreshTokenSize = current.refreshTokenSize;
|
|
7908
|
-
}
|
|
7909
7948
|
}
|
|
7910
7949
|
return previous;
|
|
7911
7950
|
}, topLevelEvent);
|
|
7912
|
-
this.
|
|
7951
|
+
var staticFields = this.staticFieldsByCorrelationId.get(correlationId);
|
|
7952
|
+
var finalEvent = __assign(__assign({}, eventToEmit), staticFields);
|
|
7953
|
+
this.emitEvents([finalEvent], eventToEmit.correlationId);
|
|
7913
7954
|
}
|
|
7914
7955
|
else {
|
|
7915
7956
|
this.logger.verbose("PerformanceClient: No completed top-level measurements found for " + measureName, correlationId);
|
|
@@ -7973,7 +8014,7 @@
|
|
|
7973
8014
|
return PerformanceClient;
|
|
7974
8015
|
}());
|
|
7975
8016
|
|
|
7976
|
-
/*! @azure/msal-common
|
|
8017
|
+
/*! @azure/msal-common v9.0.0 2022-11-22 */
|
|
7977
8018
|
|
|
7978
8019
|
/*
|
|
7979
8020
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -9848,7 +9889,7 @@
|
|
|
9848
9889
|
|
|
9849
9890
|
/* eslint-disable header/header */
|
|
9850
9891
|
var name = "@azure/msal-browser";
|
|
9851
|
-
var version = "2.
|
|
9892
|
+
var version = "2.32.0";
|
|
9852
9893
|
|
|
9853
9894
|
/*
|
|
9854
9895
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -10401,11 +10442,11 @@
|
|
|
10401
10442
|
};
|
|
10402
10443
|
if (!requestAuthority) return [3 /*break*/, 2];
|
|
10403
10444
|
this.logger.verbose("Creating discovered authority with request authority");
|
|
10404
|
-
return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(requestAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions)];
|
|
10445
|
+
return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(requestAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions, this.logger)];
|
|
10405
10446
|
case 1: return [2 /*return*/, _a.sent()];
|
|
10406
10447
|
case 2:
|
|
10407
10448
|
this.logger.verbose("Creating discovered authority with configured authority");
|
|
10408
|
-
return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(this.config.auth.authority, this.config.system.networkClient, this.browserStorage, authorityOptions)];
|
|
10449
|
+
return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(this.config.auth.authority, this.config.system.networkClient, this.browserStorage, authorityOptions, this.logger)];
|
|
10409
10450
|
case 3: return [2 /*return*/, _a.sent()];
|
|
10410
10451
|
}
|
|
10411
10452
|
});
|
|
@@ -10634,7 +10675,7 @@
|
|
|
10634
10675
|
userAuthority = requestAuthority ? requestAuthority : this.config.auth.authority;
|
|
10635
10676
|
builtAuthority = Authority.generateAuthority(userAuthority, requestAzureCloudOptions || this.config.auth.azureCloudOptions);
|
|
10636
10677
|
this.logger.verbose("Creating discovered authority with configured authority", this.correlationId);
|
|
10637
|
-
return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(builtAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions)
|
|
10678
|
+
return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(builtAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions, this.logger)
|
|
10638
10679
|
.then(function (result) {
|
|
10639
10680
|
getAuthorityMeasurement.endMeasurement({
|
|
10640
10681
|
success: true
|
|
@@ -10812,7 +10853,7 @@
|
|
|
10812
10853
|
switch (_a.label) {
|
|
10813
10854
|
case 0:
|
|
10814
10855
|
cloudInstanceAuthorityUri = "https://" + cloudInstanceHostname + "/" + authority.tenant + "/";
|
|
10815
|
-
return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(cloudInstanceAuthorityUri, networkModule, this.browserStorage, authority.options)];
|
|
10856
|
+
return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(cloudInstanceAuthorityUri, networkModule, this.browserStorage, authority.options, this.logger)];
|
|
10816
10857
|
case 1:
|
|
10817
10858
|
cloudInstanceAuthority = _a.sent();
|
|
10818
10859
|
this.authModule.updateAuthority(cloudInstanceAuthority);
|
|
@@ -11229,7 +11270,7 @@
|
|
|
11229
11270
|
result = _a.sent();
|
|
11230
11271
|
nativeATMeasurement.endMeasurement({
|
|
11231
11272
|
success: true,
|
|
11232
|
-
isNativeBroker:
|
|
11273
|
+
isNativeBroker: false,
|
|
11233
11274
|
fromCache: true
|
|
11234
11275
|
});
|
|
11235
11276
|
return [2 /*return*/, result];
|
|
@@ -11371,7 +11412,7 @@
|
|
|
11371
11412
|
*/
|
|
11372
11413
|
NativeInteractionClient.prototype.handleRedirectPromise = function () {
|
|
11373
11414
|
return __awaiter$1(this, void 0, void 0, function () {
|
|
11374
|
-
var cachedRequest, messageBody, reqTimestamp, response, result, e_4;
|
|
11415
|
+
var cachedRequest, prompt, request, messageBody, reqTimestamp, response, result, e_4;
|
|
11375
11416
|
return __generator$1(this, function (_a) {
|
|
11376
11417
|
switch (_a.label) {
|
|
11377
11418
|
case 0:
|
|
@@ -11385,10 +11426,14 @@
|
|
|
11385
11426
|
this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null.");
|
|
11386
11427
|
return [2 /*return*/, null];
|
|
11387
11428
|
}
|
|
11429
|
+
prompt = cachedRequest.prompt, request = __rest(cachedRequest, ["prompt"]);
|
|
11430
|
+
if (prompt) {
|
|
11431
|
+
this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window.");
|
|
11432
|
+
}
|
|
11388
11433
|
this.browserStorage.removeItem(this.browserStorage.generateCacheKey(TemporaryCacheKeys.NATIVE_REQUEST));
|
|
11389
11434
|
messageBody = {
|
|
11390
11435
|
method: NativeExtensionMethod.GetToken,
|
|
11391
|
-
request:
|
|
11436
|
+
request: request
|
|
11392
11437
|
};
|
|
11393
11438
|
reqTimestamp = TimeUtils.nowSeconds();
|
|
11394
11439
|
_a.label = 1;
|
|
@@ -11399,7 +11444,7 @@
|
|
|
11399
11444
|
case 2:
|
|
11400
11445
|
response = _a.sent();
|
|
11401
11446
|
this.validateNativeResponse(response);
|
|
11402
|
-
result = this.handleNativeResponse(response,
|
|
11447
|
+
result = this.handleNativeResponse(response, request, reqTimestamp);
|
|
11403
11448
|
this.browserStorage.setInteractionInProgress(false);
|
|
11404
11449
|
return [2 /*return*/, result];
|
|
11405
11450
|
case 3:
|
|
@@ -11427,12 +11472,30 @@
|
|
|
11427
11472
|
*/
|
|
11428
11473
|
NativeInteractionClient.prototype.handleNativeResponse = function (response, request, reqTimestamp) {
|
|
11429
11474
|
return __awaiter$1(this, void 0, void 0, function () {
|
|
11430
|
-
var idTokenObj, authority, authorityPreferredCache, homeAccountIdentifier, accountEntity, responseScopes, accountProperties, uid, tid, responseAccessToken, responseTokenType, _a, popTokenGenerator, shrParameters,
|
|
11475
|
+
var mats, idTokenObj, authority, authorityPreferredCache, homeAccountIdentifier, accountEntity, responseScopes, accountProperties, uid, tid, responseAccessToken, responseTokenType, _a, popTokenGenerator, shrParameters, result, idTokenEntity, expiresIn, tokenExpirationSeconds, accessTokenEntity;
|
|
11431
11476
|
var _this = this;
|
|
11432
11477
|
return __generator$1(this, function (_b) {
|
|
11433
11478
|
switch (_b.label) {
|
|
11434
11479
|
case 0:
|
|
11435
11480
|
this.logger.trace("NativeInteractionClient - handleNativeResponse called.");
|
|
11481
|
+
mats = this.getMATSFromResponse(response);
|
|
11482
|
+
this.performanceClient.addStaticFields({
|
|
11483
|
+
extensionId: this.nativeMessageHandler.getExtensionId(),
|
|
11484
|
+
extensionVersion: this.nativeMessageHandler.getExtensionVersion(),
|
|
11485
|
+
matsBrokerVersion: mats ? mats.broker_version : undefined,
|
|
11486
|
+
matsAccountJoinOnStart: mats ? mats.account_join_on_start : undefined,
|
|
11487
|
+
matsAccountJoinOnEnd: mats ? mats.account_join_on_end : undefined,
|
|
11488
|
+
matsDeviceJoin: mats ? mats.device_join : undefined,
|
|
11489
|
+
matsPromptBehavior: mats ? mats.prompt_behavior : undefined,
|
|
11490
|
+
matsApiErrorCode: mats ? mats.api_error_code : undefined,
|
|
11491
|
+
matsUiVisible: mats ? mats.ui_visible : undefined,
|
|
11492
|
+
matsSilentCode: mats ? mats.silent_code : undefined,
|
|
11493
|
+
matsSilentBiSubCode: mats ? mats.silent_bi_sub_code : undefined,
|
|
11494
|
+
matsSilentMessage: mats ? mats.silent_message : undefined,
|
|
11495
|
+
matsSilentStatus: mats ? mats.silent_status : undefined,
|
|
11496
|
+
matsHttpStatus: mats ? mats.http_status : undefined,
|
|
11497
|
+
matsHttpEventCount: mats ? mats.http_event_count : undefined
|
|
11498
|
+
}, this.correlationId);
|
|
11436
11499
|
if (response.account.id !== request.accountId) {
|
|
11437
11500
|
// User switch in native broker prompt is not supported. All users must first sign in through web flow to ensure server state is in sync
|
|
11438
11501
|
throw NativeAuthError.createUserSwitchError();
|
|
@@ -11488,7 +11551,6 @@
|
|
|
11488
11551
|
}
|
|
11489
11552
|
_b.label = 5;
|
|
11490
11553
|
case 5:
|
|
11491
|
-
mats = this.getMATSFromResponse(response);
|
|
11492
11554
|
result = {
|
|
11493
11555
|
authority: authority.canonicalAuthority,
|
|
11494
11556
|
uniqueId: uid,
|
|
@@ -11820,6 +11882,7 @@
|
|
|
11820
11882
|
clearTimeout(this.timeoutId); // Clear setTimeout
|
|
11821
11883
|
window.removeEventListener("message", this.windowListener, false); // Remove 'No extension' listener
|
|
11822
11884
|
this.extensionId = request.extensionId;
|
|
11885
|
+
this.extensionVersion = request.body.version;
|
|
11823
11886
|
this.logger.verbose("NativeMessageHandler - Received HandshakeResponse from extension: " + this.extensionId);
|
|
11824
11887
|
handshakeResolver.resolve();
|
|
11825
11888
|
this.handshakeResolvers.delete(request.responseId);
|
|
@@ -11838,6 +11901,20 @@
|
|
|
11838
11901
|
}
|
|
11839
11902
|
}
|
|
11840
11903
|
};
|
|
11904
|
+
/**
|
|
11905
|
+
* Returns the Id for the browser extension this handler is communicating with
|
|
11906
|
+
* @returns
|
|
11907
|
+
*/
|
|
11908
|
+
NativeMessageHandler.prototype.getExtensionId = function () {
|
|
11909
|
+
return this.extensionId;
|
|
11910
|
+
};
|
|
11911
|
+
/**
|
|
11912
|
+
* Returns the version for the browser extension this handler is communicating with
|
|
11913
|
+
* @returns
|
|
11914
|
+
*/
|
|
11915
|
+
NativeMessageHandler.prototype.getExtensionVersion = function () {
|
|
11916
|
+
return this.extensionVersion;
|
|
11917
|
+
};
|
|
11841
11918
|
/**
|
|
11842
11919
|
* Returns boolean indicating whether or not the request should attempt to use native broker
|
|
11843
11920
|
* @param logger
|
|
@@ -14895,7 +14972,7 @@
|
|
|
14895
14972
|
authorityMetadata: this.config.auth.authorityMetadata,
|
|
14896
14973
|
skipAuthorityMetadataCache: this.config.auth.skipAuthorityMetadataCache,
|
|
14897
14974
|
};
|
|
14898
|
-
authority = new Authority(authorityUrl, this.config.system.networkClient, this.storage, authorityOptions);
|
|
14975
|
+
authority = new Authority(authorityUrl, this.config.system.networkClient, this.storage, authorityOptions, this.logger);
|
|
14899
14976
|
// "clientInfo" from options takes precedence over "clientInfo" in response
|
|
14900
14977
|
if (options.clientInfo) {
|
|
14901
14978
|
this.logger.trace("TokenCache - homeAccountId from options");
|
|
@@ -15531,8 +15608,6 @@
|
|
|
15531
15608
|
atPopupMeasurement.endMeasurement({
|
|
15532
15609
|
success: true,
|
|
15533
15610
|
isNativeBroker: true,
|
|
15534
|
-
accessTokenSize: response.accessToken.length,
|
|
15535
|
-
idTokenSize: response.idToken.length,
|
|
15536
15611
|
requestId: response.requestId
|
|
15537
15612
|
});
|
|
15538
15613
|
atPopupMeasurement.flushMeasurement();
|
|
@@ -15567,10 +15642,12 @@
|
|
|
15567
15642
|
else {
|
|
15568
15643
|
_this.eventHandler.emitEvent(exports.EventType.ACQUIRE_TOKEN_SUCCESS, exports.InteractionType.Popup, result);
|
|
15569
15644
|
}
|
|
15645
|
+
atPopupMeasurement.addStaticFields({
|
|
15646
|
+
accessTokenSize: result.accessToken.length,
|
|
15647
|
+
idTokenSize: result.idToken.length
|
|
15648
|
+
});
|
|
15570
15649
|
atPopupMeasurement.endMeasurement({
|
|
15571
15650
|
success: true,
|
|
15572
|
-
accessTokenSize: result.accessToken.length,
|
|
15573
|
-
idTokenSize: result.idToken.length,
|
|
15574
15651
|
requestId: result.requestId
|
|
15575
15652
|
});
|
|
15576
15653
|
atPopupMeasurement.flushMeasurement();
|
|
@@ -15639,11 +15716,13 @@
|
|
|
15639
15716
|
}
|
|
15640
15717
|
return [2 /*return*/, result.then(function (response) {
|
|
15641
15718
|
_this.eventHandler.emitEvent(exports.EventType.SSO_SILENT_SUCCESS, exports.InteractionType.Silent, response);
|
|
15719
|
+
ssoSilentMeasurement.addStaticFields({
|
|
15720
|
+
accessTokenSize: response.accessToken.length,
|
|
15721
|
+
idTokenSize: response.idToken.length
|
|
15722
|
+
});
|
|
15642
15723
|
ssoSilentMeasurement.endMeasurement({
|
|
15643
15724
|
success: true,
|
|
15644
15725
|
isNativeBroker: response.fromNativeBroker,
|
|
15645
|
-
accessTokenSize: response.accessToken.length,
|
|
15646
|
-
idTokenSize: response.idToken.length,
|
|
15647
15726
|
requestId: response.requestId
|
|
15648
15727
|
});
|
|
15649
15728
|
ssoSilentMeasurement.flushMeasurement();
|
|
@@ -15691,10 +15770,12 @@
|
|
|
15691
15770
|
.then(function (result) {
|
|
15692
15771
|
_this.eventHandler.emitEvent(exports.EventType.ACQUIRE_TOKEN_BY_CODE_SUCCESS, exports.InteractionType.Silent, result);
|
|
15693
15772
|
_this.hybridAuthCodeResponses.delete(hybridAuthCode_1);
|
|
15773
|
+
atbcMeasurement.addStaticFields({
|
|
15774
|
+
accessTokenSize: result.accessToken.length,
|
|
15775
|
+
idTokenSize: result.idToken.length
|
|
15776
|
+
});
|
|
15694
15777
|
atbcMeasurement.endMeasurement({
|
|
15695
15778
|
success: true,
|
|
15696
|
-
accessTokenSize: result.accessToken.length,
|
|
15697
|
-
idTokenSize: result.idToken.length,
|
|
15698
15779
|
isNativeBroker: result.fromNativeBroker,
|
|
15699
15780
|
requestId: result.requestId
|
|
15700
15781
|
});
|
|
@@ -16295,6 +16376,9 @@
|
|
|
16295
16376
|
return __generator$1(this, function (_a) {
|
|
16296
16377
|
correlationId = this.getRequestCorrelationId(request);
|
|
16297
16378
|
atsMeasurement = this.performanceClient.startMeasurement(exports.PerformanceEvents.AcquireTokenSilent, correlationId);
|
|
16379
|
+
atsMeasurement.addStaticFields({
|
|
16380
|
+
cacheLookupPolicy: request.cacheLookupPolicy
|
|
16381
|
+
});
|
|
16298
16382
|
this.preflightBrowserEnvironmentCheck(exports.InteractionType.Silent);
|
|
16299
16383
|
this.logger.verbose("acquireTokenSilent called", correlationId);
|
|
16300
16384
|
account = request.account || this.getActiveAccount();
|
|
@@ -16320,13 +16404,14 @@
|
|
|
16320
16404
|
response = this.acquireTokenSilentAsync(__assign$1(__assign$1({}, request), { correlationId: correlationId }), account)
|
|
16321
16405
|
.then(function (result) {
|
|
16322
16406
|
_this.activeSilentTokenRequests.delete(silentRequestKey);
|
|
16407
|
+
atsMeasurement.addStaticFields({
|
|
16408
|
+
accessTokenSize: result.accessToken.length,
|
|
16409
|
+
idTokenSize: result.idToken.length
|
|
16410
|
+
});
|
|
16323
16411
|
atsMeasurement.endMeasurement({
|
|
16324
16412
|
success: true,
|
|
16325
16413
|
fromCache: result.fromCache,
|
|
16326
|
-
accessTokenSize: result.accessToken.length,
|
|
16327
|
-
idTokenSize: result.idToken.length,
|
|
16328
16414
|
isNativeBroker: result.fromNativeBroker,
|
|
16329
|
-
cacheLookupPolicy: request.cacheLookupPolicy,
|
|
16330
16415
|
requestId: result.requestId
|
|
16331
16416
|
});
|
|
16332
16417
|
atsMeasurement.flushMeasurement();
|
|
@@ -16427,8 +16512,6 @@
|
|
|
16427
16512
|
astsAsyncMeasurement.endMeasurement({
|
|
16428
16513
|
success: true,
|
|
16429
16514
|
fromCache: response.fromCache,
|
|
16430
|
-
accessTokenSize: response.accessToken.length,
|
|
16431
|
-
idTokenSize: response.idToken.length,
|
|
16432
16515
|
isNativeBroker: response.fromNativeBroker,
|
|
16433
16516
|
requestId: response.requestId
|
|
16434
16517
|
});
|