@azure/msal-browser 2.32.0 → 2.32.2
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 -1
- package/dist/_virtual/_tslib.js +1 -1
- package/dist/app/ClientApplication.js +1 -1
- 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 +7 -6
- package/dist/app/PublicClientApplication.js.map +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.js +1 -1
- package/dist/cache/AsyncMemoryStorage.js +1 -1
- package/dist/cache/BrowserCacheManager.d.ts +9 -0
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.js +21 -7
- package/dist/cache/BrowserCacheManager.js.map +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 +1 -1
- package/dist/config/Configuration.d.ts.map +1 -1
- package/dist/config/Configuration.js +6 -3
- package/dist/config/Configuration.js.map +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 +254 -154
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/interaction_client/BaseInteractionClient.js +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +1 -1
- package/dist/interaction_client/NativeInteractionClient.js +1 -1
- 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.d.ts.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.js +12 -10
- package/dist/interaction_client/StandardInteractionClient.js.map +1 -1
- package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
- package/dist/interaction_handler/InteractionHandler.js +1 -1
- 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.d.ts +2 -0
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +3 -1
- package/dist/internals.js.map +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.d.ts +1 -1
- package/dist/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/BrowserPerformanceClient.js +2 -2
- package/dist/telemetry/BrowserPerformanceClient.js.map +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.js +1 -1
- package/dist/utils/BrowserConstants.d.ts +2 -1
- package/dist/utils/BrowserConstants.d.ts.map +1 -1
- package/dist/utils/BrowserConstants.js +2 -1
- package/dist/utils/BrowserConstants.js.map +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 +254 -154
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +42 -41
- package/package.json +2 -2
package/lib/msal-browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v2.32.
|
|
1
|
+
/*! @azure/msal-browser v2.32.2 2023-01-10 */
|
|
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 v9.0.
|
|
122
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
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 v9.0.
|
|
209
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
210
210
|
|
|
211
211
|
/*
|
|
212
212
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -260,7 +260,8 @@
|
|
|
260
260
|
KNOWN_PUBLIC_CLOUDS: ["login.microsoftonline.com", "login.windows.net", "login.microsoft.com", "sts.windows.net"],
|
|
261
261
|
TOKEN_RESPONSE_TYPE: "token",
|
|
262
262
|
ID_TOKEN_RESPONSE_TYPE: "id_token",
|
|
263
|
-
SHR_NONCE_VALIDITY: 240
|
|
263
|
+
SHR_NONCE_VALIDITY: 240,
|
|
264
|
+
INVALID_INSTANCE: "invalid_instance",
|
|
264
265
|
};
|
|
265
266
|
var OIDC_DEFAULT_SCOPES = [
|
|
266
267
|
Constants.OPENID_SCOPE,
|
|
@@ -281,6 +282,7 @@
|
|
|
281
282
|
HeaderNames["WWWAuthenticate"] = "WWW-Authenticate";
|
|
282
283
|
HeaderNames["AuthenticationInfo"] = "Authentication-Info";
|
|
283
284
|
HeaderNames["X_MS_REQUEST_ID"] = "x-ms-request-id";
|
|
285
|
+
HeaderNames["X_MS_HTTP_VERSION"] = "x-ms-httpver";
|
|
284
286
|
})(HeaderNames || (HeaderNames = {}));
|
|
285
287
|
/**
|
|
286
288
|
* Persistent cache keys MSAL which stay while user is logged in.
|
|
@@ -588,7 +590,7 @@
|
|
|
588
590
|
JsonTypes["Jwk"] = "JWK";
|
|
589
591
|
})(JsonTypes || (JsonTypes = {}));
|
|
590
592
|
|
|
591
|
-
/*! @azure/msal-common v9.0.
|
|
593
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
592
594
|
|
|
593
595
|
/*
|
|
594
596
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -644,7 +646,7 @@
|
|
|
644
646
|
return AuthError;
|
|
645
647
|
}(Error));
|
|
646
648
|
|
|
647
|
-
/*! @azure/msal-common v9.0.
|
|
649
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
648
650
|
|
|
649
651
|
/*
|
|
650
652
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -719,7 +721,7 @@
|
|
|
719
721
|
}
|
|
720
722
|
};
|
|
721
723
|
|
|
722
|
-
/*! @azure/msal-common v9.0.
|
|
724
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
723
725
|
|
|
724
726
|
/*
|
|
725
727
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1214,7 +1216,7 @@
|
|
|
1214
1216
|
return ClientAuthError;
|
|
1215
1217
|
}(AuthError));
|
|
1216
1218
|
|
|
1217
|
-
/*! @azure/msal-common v9.0.
|
|
1219
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
1218
1220
|
|
|
1219
1221
|
/*
|
|
1220
1222
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1339,7 +1341,7 @@
|
|
|
1339
1341
|
return StringUtils;
|
|
1340
1342
|
}());
|
|
1341
1343
|
|
|
1342
|
-
/*! @azure/msal-common v9.0.
|
|
1344
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
1343
1345
|
|
|
1344
1346
|
/*
|
|
1345
1347
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1366,13 +1368,23 @@
|
|
|
1366
1368
|
var defaultLoggerCallback = function () {
|
|
1367
1369
|
return;
|
|
1368
1370
|
};
|
|
1369
|
-
|
|
1370
|
-
this.
|
|
1371
|
-
this.
|
|
1372
|
-
this.
|
|
1371
|
+
var setLoggerOptions = loggerOptions || Logger.createDefaultLoggerOptions();
|
|
1372
|
+
this.localCallback = setLoggerOptions.loggerCallback || defaultLoggerCallback;
|
|
1373
|
+
this.piiLoggingEnabled = setLoggerOptions.piiLoggingEnabled || false;
|
|
1374
|
+
this.level = typeof (setLoggerOptions.logLevel) === "number" ? setLoggerOptions.logLevel : exports.LogLevel.Info;
|
|
1375
|
+
this.correlationId = setLoggerOptions.correlationId || Constants.EMPTY_STRING;
|
|
1373
1376
|
this.packageName = packageName || Constants.EMPTY_STRING;
|
|
1374
1377
|
this.packageVersion = packageVersion || Constants.EMPTY_STRING;
|
|
1375
1378
|
}
|
|
1379
|
+
Logger.createDefaultLoggerOptions = function () {
|
|
1380
|
+
return {
|
|
1381
|
+
loggerCallback: function () {
|
|
1382
|
+
// allow users to not set loggerCallback
|
|
1383
|
+
},
|
|
1384
|
+
piiLoggingEnabled: false,
|
|
1385
|
+
logLevel: exports.LogLevel.Info
|
|
1386
|
+
};
|
|
1387
|
+
};
|
|
1376
1388
|
/**
|
|
1377
1389
|
* Create new Logger with existing configurations.
|
|
1378
1390
|
*/
|
|
@@ -1519,12 +1531,12 @@
|
|
|
1519
1531
|
return Logger;
|
|
1520
1532
|
}());
|
|
1521
1533
|
|
|
1522
|
-
/*! @azure/msal-common v9.0.
|
|
1534
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
1523
1535
|
/* eslint-disable header/header */
|
|
1524
1536
|
var name$1 = "@azure/msal-common";
|
|
1525
|
-
var version$1 = "9.0.
|
|
1537
|
+
var version$1 = "9.0.2";
|
|
1526
1538
|
|
|
1527
|
-
/*! @azure/msal-common v9.0.
|
|
1539
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
1528
1540
|
/*
|
|
1529
1541
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1530
1542
|
* Licensed under the MIT License.
|
|
@@ -1545,7 +1557,7 @@
|
|
|
1545
1557
|
AzureCloudInstance["AzureUsGovernment"] = "https://login.microsoftonline.us";
|
|
1546
1558
|
})(exports.AzureCloudInstance || (exports.AzureCloudInstance = {}));
|
|
1547
1559
|
|
|
1548
|
-
/*! @azure/msal-common v9.0.
|
|
1560
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
1549
1561
|
|
|
1550
1562
|
/*
|
|
1551
1563
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1622,19 +1634,16 @@
|
|
|
1622
1634
|
* @param key
|
|
1623
1635
|
*/
|
|
1624
1636
|
CredentialEntity.getCredentialType = function (key) {
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1637
|
+
var separator = Separators.CACHE_KEY_SEPARATOR;
|
|
1638
|
+
// Match host names like "login.microsoftonline.com", "https://accounts.google.com:4000", etc.
|
|
1639
|
+
var domainRe = "(https?:\\/\\/)?([\\w-]+\\.)*([\\w-]{1,63})(\\.(\\w{2,3}))(\\:[0-9]{4,5})?";
|
|
1640
|
+
for (var _i = 0, _a = Object.keys(CredentialType); _i < _a.length; _i++) {
|
|
1641
|
+
var credKey = _a[_i];
|
|
1642
|
+
var credVal = CredentialType[credKey].toLowerCase();
|
|
1643
|
+
// Verify credential type is preceded by a valid host name (environment)
|
|
1644
|
+
if (key.toLowerCase().search("(?<=" + separator + domainRe + ")" + separator + credVal + separator) !== -1) {
|
|
1645
|
+
return CredentialType[credKey];
|
|
1630
1646
|
}
|
|
1631
|
-
return CredentialType.ACCESS_TOKEN;
|
|
1632
|
-
}
|
|
1633
|
-
else if (key.indexOf(CredentialType.ID_TOKEN.toLowerCase()) !== -1) {
|
|
1634
|
-
return CredentialType.ID_TOKEN;
|
|
1635
|
-
}
|
|
1636
|
-
else if (key.indexOf(CredentialType.REFRESH_TOKEN.toLowerCase()) !== -1) {
|
|
1637
|
-
return CredentialType.REFRESH_TOKEN;
|
|
1638
1647
|
}
|
|
1639
1648
|
return Constants.NOT_DEFINED;
|
|
1640
1649
|
};
|
|
@@ -1704,7 +1713,7 @@
|
|
|
1704
1713
|
return CredentialEntity;
|
|
1705
1714
|
}());
|
|
1706
1715
|
|
|
1707
|
-
/*! @azure/msal-common v9.0.
|
|
1716
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
1708
1717
|
|
|
1709
1718
|
/*
|
|
1710
1719
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1959,7 +1968,7 @@
|
|
|
1959
1968
|
return ClientConfigurationError;
|
|
1960
1969
|
}(ClientAuthError));
|
|
1961
1970
|
|
|
1962
|
-
/*! @azure/msal-common v9.0.
|
|
1971
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
1963
1972
|
|
|
1964
1973
|
/*
|
|
1965
1974
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2143,7 +2152,7 @@
|
|
|
2143
2152
|
return ScopeSet;
|
|
2144
2153
|
}());
|
|
2145
2154
|
|
|
2146
|
-
/*! @azure/msal-common v9.0.
|
|
2155
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
2147
2156
|
|
|
2148
2157
|
/*
|
|
2149
2158
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2181,7 +2190,7 @@
|
|
|
2181
2190
|
};
|
|
2182
2191
|
}
|
|
2183
2192
|
|
|
2184
|
-
/*! @azure/msal-common v9.0.
|
|
2193
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
2185
2194
|
/*
|
|
2186
2195
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2187
2196
|
* Licensed under the MIT License.
|
|
@@ -2196,7 +2205,7 @@
|
|
|
2196
2205
|
AuthorityType[AuthorityType["Dsts"] = 2] = "Dsts";
|
|
2197
2206
|
})(AuthorityType || (AuthorityType = {}));
|
|
2198
2207
|
|
|
2199
|
-
/*! @azure/msal-common v9.0.
|
|
2208
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
2200
2209
|
|
|
2201
2210
|
/*
|
|
2202
2211
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2435,7 +2444,7 @@
|
|
|
2435
2444
|
return AccountEntity;
|
|
2436
2445
|
}());
|
|
2437
2446
|
|
|
2438
|
-
/*! @azure/msal-common v9.0.
|
|
2447
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
2439
2448
|
|
|
2440
2449
|
/*
|
|
2441
2450
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2487,7 +2496,7 @@
|
|
|
2487
2496
|
return AuthToken;
|
|
2488
2497
|
}());
|
|
2489
2498
|
|
|
2490
|
-
/*! @azure/msal-common v9.0.
|
|
2499
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
2491
2500
|
|
|
2492
2501
|
/*
|
|
2493
2502
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3366,7 +3375,7 @@
|
|
|
3366
3375
|
return DefaultStorageClass;
|
|
3367
3376
|
}(CacheManager));
|
|
3368
3377
|
|
|
3369
|
-
/*! @azure/msal-common v9.0.
|
|
3378
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
3370
3379
|
|
|
3371
3380
|
/*
|
|
3372
3381
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3460,7 +3469,7 @@
|
|
|
3460
3469
|
return __assign({ clientCapabilities: [], azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS, skipAuthorityMetadataCache: false }, authOptions);
|
|
3461
3470
|
}
|
|
3462
3471
|
|
|
3463
|
-
/*! @azure/msal-common v9.0.
|
|
3472
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
3464
3473
|
|
|
3465
3474
|
/*
|
|
3466
3475
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3480,7 +3489,7 @@
|
|
|
3480
3489
|
return ServerError;
|
|
3481
3490
|
}(AuthError));
|
|
3482
3491
|
|
|
3483
|
-
/*! @azure/msal-common v9.0.
|
|
3492
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
3484
3493
|
|
|
3485
3494
|
/*
|
|
3486
3495
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3576,7 +3585,7 @@
|
|
|
3576
3585
|
return ThrottlingUtils;
|
|
3577
3586
|
}());
|
|
3578
3587
|
|
|
3579
|
-
/*! @azure/msal-common v9.0.
|
|
3588
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
3580
3589
|
|
|
3581
3590
|
/*
|
|
3582
3591
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3625,7 +3634,7 @@
|
|
|
3625
3634
|
return NetworkManager;
|
|
3626
3635
|
}());
|
|
3627
3636
|
|
|
3628
|
-
/*! @azure/msal-common v9.0.
|
|
3637
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
3629
3638
|
/*
|
|
3630
3639
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3631
3640
|
* Licensed under the MIT License.
|
|
@@ -3636,7 +3645,7 @@
|
|
|
3636
3645
|
CcsCredentialType["UPN"] = "UPN";
|
|
3637
3646
|
})(CcsCredentialType || (CcsCredentialType = {}));
|
|
3638
3647
|
|
|
3639
|
-
/*! @azure/msal-common v9.0.
|
|
3648
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
3640
3649
|
|
|
3641
3650
|
/*
|
|
3642
3651
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3727,7 +3736,7 @@
|
|
|
3727
3736
|
return BaseClient;
|
|
3728
3737
|
}());
|
|
3729
3738
|
|
|
3730
|
-
/*! @azure/msal-common v9.0.
|
|
3739
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
3731
3740
|
|
|
3732
3741
|
/*
|
|
3733
3742
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3813,7 +3822,7 @@
|
|
|
3813
3822
|
return RequestValidator;
|
|
3814
3823
|
}());
|
|
3815
3824
|
|
|
3816
|
-
/*! @azure/msal-common v9.0.
|
|
3825
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
3817
3826
|
|
|
3818
3827
|
/*
|
|
3819
3828
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4191,7 +4200,7 @@
|
|
|
4191
4200
|
return RequestParameterBuilder;
|
|
4192
4201
|
}());
|
|
4193
4202
|
|
|
4194
|
-
/*! @azure/msal-common v9.0.
|
|
4203
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
4195
4204
|
|
|
4196
4205
|
/*
|
|
4197
4206
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4255,7 +4264,7 @@
|
|
|
4255
4264
|
return IdTokenEntity;
|
|
4256
4265
|
}(CredentialEntity));
|
|
4257
4266
|
|
|
4258
|
-
/*! @azure/msal-common v9.0.
|
|
4267
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
4259
4268
|
/*
|
|
4260
4269
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4261
4270
|
* Licensed under the MIT License.
|
|
@@ -4305,7 +4314,7 @@
|
|
|
4305
4314
|
return TimeUtils;
|
|
4306
4315
|
}());
|
|
4307
4316
|
|
|
4308
|
-
/*! @azure/msal-common v9.0.
|
|
4317
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
4309
4318
|
|
|
4310
4319
|
/*
|
|
4311
4320
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4419,7 +4428,7 @@
|
|
|
4419
4428
|
return AccessTokenEntity;
|
|
4420
4429
|
}(CredentialEntity));
|
|
4421
4430
|
|
|
4422
|
-
/*! @azure/msal-common v9.0.
|
|
4431
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
4423
4432
|
|
|
4424
4433
|
/*
|
|
4425
4434
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4486,7 +4495,7 @@
|
|
|
4486
4495
|
return RefreshTokenEntity;
|
|
4487
4496
|
}(CredentialEntity));
|
|
4488
4497
|
|
|
4489
|
-
/*! @azure/msal-common v9.0.
|
|
4498
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
4490
4499
|
|
|
4491
4500
|
/*
|
|
4492
4501
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4561,7 +4570,7 @@
|
|
|
4561
4570
|
return InteractionRequiredAuthError;
|
|
4562
4571
|
}(AuthError));
|
|
4563
4572
|
|
|
4564
|
-
/*! @azure/msal-common v9.0.
|
|
4573
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
4565
4574
|
/*
|
|
4566
4575
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4567
4576
|
* Licensed under the MIT License.
|
|
@@ -4577,7 +4586,7 @@
|
|
|
4577
4586
|
return CacheRecord;
|
|
4578
4587
|
}());
|
|
4579
4588
|
|
|
4580
|
-
/*! @azure/msal-common v9.0.
|
|
4589
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
4581
4590
|
|
|
4582
4591
|
/*
|
|
4583
4592
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4648,7 +4657,7 @@
|
|
|
4648
4657
|
return ProtocolUtils;
|
|
4649
4658
|
}());
|
|
4650
4659
|
|
|
4651
|
-
/*! @azure/msal-common v9.0.
|
|
4660
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
4652
4661
|
|
|
4653
4662
|
/*
|
|
4654
4663
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4882,7 +4891,7 @@
|
|
|
4882
4891
|
return UrlString;
|
|
4883
4892
|
}());
|
|
4884
4893
|
|
|
4885
|
-
/*! @azure/msal-common v9.0.
|
|
4894
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
4886
4895
|
|
|
4887
4896
|
/*
|
|
4888
4897
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4983,7 +4992,7 @@
|
|
|
4983
4992
|
return PopTokenGenerator;
|
|
4984
4993
|
}());
|
|
4985
4994
|
|
|
4986
|
-
/*! @azure/msal-common v9.0.
|
|
4995
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
4987
4996
|
|
|
4988
4997
|
/*
|
|
4989
4998
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5053,7 +5062,7 @@
|
|
|
5053
5062
|
return AppMetadataEntity;
|
|
5054
5063
|
}());
|
|
5055
5064
|
|
|
5056
|
-
/*! @azure/msal-common v9.0.
|
|
5065
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
5057
5066
|
/*
|
|
5058
5067
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5059
5068
|
* Licensed under the MIT License.
|
|
@@ -5089,7 +5098,7 @@
|
|
|
5089
5098
|
return TokenCacheContext;
|
|
5090
5099
|
}());
|
|
5091
5100
|
|
|
5092
|
-
/*! @azure/msal-common v9.0.
|
|
5101
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
5093
5102
|
|
|
5094
5103
|
/*
|
|
5095
5104
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5360,7 +5369,7 @@
|
|
|
5360
5369
|
cloudGraphHostName: ((_b = cacheRecord.account) === null || _b === void 0 ? void 0 : _b.cloudGraphHostName) || Constants.EMPTY_STRING,
|
|
5361
5370
|
msGraphHost: ((_c = cacheRecord.account) === null || _c === void 0 ? void 0 : _c.msGraphHost) || Constants.EMPTY_STRING,
|
|
5362
5371
|
code: code,
|
|
5363
|
-
fromNativeBroker: false
|
|
5372
|
+
fromNativeBroker: false,
|
|
5364
5373
|
}];
|
|
5365
5374
|
}
|
|
5366
5375
|
});
|
|
@@ -5369,7 +5378,7 @@
|
|
|
5369
5378
|
return ResponseHandler;
|
|
5370
5379
|
}());
|
|
5371
5380
|
|
|
5372
|
-
/*! @azure/msal-common v9.0.
|
|
5381
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
5373
5382
|
|
|
5374
5383
|
/*
|
|
5375
5384
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5380,8 +5389,8 @@
|
|
|
5380
5389
|
*/
|
|
5381
5390
|
var AuthorizationCodeClient = /** @class */ (function (_super) {
|
|
5382
5391
|
__extends(AuthorizationCodeClient, _super);
|
|
5383
|
-
function AuthorizationCodeClient(configuration) {
|
|
5384
|
-
var _this = _super.call(this, configuration) || this;
|
|
5392
|
+
function AuthorizationCodeClient(configuration, performanceClient) {
|
|
5393
|
+
var _this = _super.call(this, configuration, performanceClient) || this;
|
|
5385
5394
|
// Flag to indicate if client is for hybrid spa auth code redemption
|
|
5386
5395
|
_this.includeRedirectUri = true;
|
|
5387
5396
|
return _this;
|
|
@@ -5415,26 +5424,47 @@
|
|
|
5415
5424
|
* @param request
|
|
5416
5425
|
*/
|
|
5417
5426
|
AuthorizationCodeClient.prototype.acquireToken = function (request, authCodePayload) {
|
|
5418
|
-
var _a;
|
|
5427
|
+
var _a, _b, _c;
|
|
5419
5428
|
return __awaiter(this, void 0, void 0, function () {
|
|
5420
|
-
var reqTimestamp, response, requestId, responseHandler;
|
|
5421
|
-
|
|
5422
|
-
|
|
5429
|
+
var atsMeasurement, reqTimestamp, response, requestId, httpVerAuthority, responseHandler;
|
|
5430
|
+
var _this = this;
|
|
5431
|
+
return __generator(this, function (_d) {
|
|
5432
|
+
switch (_d.label) {
|
|
5423
5433
|
case 0:
|
|
5424
|
-
this.
|
|
5434
|
+
atsMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement("AuthCodeClientAcquireToken", request.correlationId);
|
|
5435
|
+
this.logger.info("in acquireToken call in auth-code client");
|
|
5425
5436
|
if (!request || StringUtils.isEmpty(request.code)) {
|
|
5426
5437
|
throw ClientAuthError.createTokenRequestCannotBeMadeError();
|
|
5427
5438
|
}
|
|
5428
5439
|
reqTimestamp = TimeUtils.nowSeconds();
|
|
5429
5440
|
return [4 /*yield*/, this.executeTokenRequest(this.authority, request)];
|
|
5430
5441
|
case 1:
|
|
5431
|
-
response =
|
|
5432
|
-
requestId = (
|
|
5442
|
+
response = _d.sent();
|
|
5443
|
+
requestId = (_b = response.headers) === null || _b === void 0 ? void 0 : _b[HeaderNames.X_MS_REQUEST_ID];
|
|
5444
|
+
httpVerAuthority = (_c = response.headers) === null || _c === void 0 ? void 0 : _c[HeaderNames.X_MS_HTTP_VERSION];
|
|
5445
|
+
if (httpVerAuthority) {
|
|
5446
|
+
atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.addStaticFields({
|
|
5447
|
+
httpVerAuthority: httpVerAuthority
|
|
5448
|
+
});
|
|
5449
|
+
}
|
|
5433
5450
|
responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
|
|
5434
5451
|
// Validate response. This function throws a server error if an error is returned by the server.
|
|
5435
5452
|
responseHandler.validateTokenResponse(response.body);
|
|
5436
|
-
return [
|
|
5437
|
-
|
|
5453
|
+
return [2 /*return*/, responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, authCodePayload, undefined, undefined, undefined, requestId).then(function (result) {
|
|
5454
|
+
atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.endMeasurement({
|
|
5455
|
+
success: true
|
|
5456
|
+
});
|
|
5457
|
+
return result;
|
|
5458
|
+
})
|
|
5459
|
+
.catch(function (error) {
|
|
5460
|
+
_this.logger.verbose("Error in fetching token in ACC", request.correlationId);
|
|
5461
|
+
atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.endMeasurement({
|
|
5462
|
+
errorCode: error.errorCode,
|
|
5463
|
+
subErrorCode: error.subError,
|
|
5464
|
+
success: false
|
|
5465
|
+
});
|
|
5466
|
+
throw error;
|
|
5467
|
+
})];
|
|
5438
5468
|
}
|
|
5439
5469
|
});
|
|
5440
5470
|
});
|
|
@@ -5822,7 +5852,7 @@
|
|
|
5822
5852
|
return AuthorizationCodeClient;
|
|
5823
5853
|
}(BaseClient));
|
|
5824
5854
|
|
|
5825
|
-
/*! @azure/msal-common v9.0.
|
|
5855
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
5826
5856
|
/*
|
|
5827
5857
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5828
5858
|
* Licensed under the MIT License.
|
|
@@ -5933,6 +5963,11 @@
|
|
|
5933
5963
|
* Time taken for acquiring cached refresh token
|
|
5934
5964
|
*/
|
|
5935
5965
|
PerformanceEvents["RefreshTokenClientAcquireTokenWithCachedRefreshToken"] = "refreshTokenClientAcquireTokenWithCachedRefreshToken";
|
|
5966
|
+
PerformanceEvents["GetEndpointMetadataFromNetwork"] = "getEndpointMetadataFromNetwork";
|
|
5967
|
+
PerformanceEvents["GetCloudDiscoveryMetadataFromNetworkMeasurement"] = "getCloudDiscoveryMetadataFromNetworkMeasurement";
|
|
5968
|
+
PerformanceEvents["HandleRedirectPromiseMeasurement"] = "handleRedirectPromiseMeasurement";
|
|
5969
|
+
PerformanceEvents["UpdateCloudDiscoveryMetadataMeasurement"] = "updateCloudDiscoveryMetadataMeasurement";
|
|
5970
|
+
PerformanceEvents["UsernamePasswordClientAcquireToken"] = "usernamePasswordClientAcquireToken";
|
|
5936
5971
|
})(exports.PerformanceEvents || (exports.PerformanceEvents = {}));
|
|
5937
5972
|
/**
|
|
5938
5973
|
* State of the performance event.
|
|
@@ -5947,7 +5982,7 @@
|
|
|
5947
5982
|
PerformanceEventStatus[PerformanceEventStatus["Completed"] = 2] = "Completed";
|
|
5948
5983
|
})(PerformanceEventStatus || (PerformanceEventStatus = {}));
|
|
5949
5984
|
|
|
5950
|
-
/*! @azure/msal-common v9.0.
|
|
5985
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
5951
5986
|
|
|
5952
5987
|
/*
|
|
5953
5988
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5962,23 +5997,29 @@
|
|
|
5962
5997
|
return _super.call(this, configuration, performanceClient) || this;
|
|
5963
5998
|
}
|
|
5964
5999
|
RefreshTokenClient.prototype.acquireToken = function (request) {
|
|
5965
|
-
var _a, _b, _c;
|
|
6000
|
+
var _a, _b, _c, _d;
|
|
5966
6001
|
return __awaiter(this, void 0, void 0, function () {
|
|
5967
|
-
var atsMeasurement, reqTimestamp, response, requestId, responseHandler;
|
|
6002
|
+
var atsMeasurement, reqTimestamp, response, httpVerToken, requestId, responseHandler;
|
|
5968
6003
|
var _this = this;
|
|
5969
|
-
return __generator(this, function (
|
|
5970
|
-
switch (
|
|
6004
|
+
return __generator(this, function (_e) {
|
|
6005
|
+
switch (_e.label) {
|
|
5971
6006
|
case 0:
|
|
5972
6007
|
atsMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement(exports.PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId);
|
|
5973
6008
|
this.logger.verbose("RefreshTokenClientAcquireToken called", request.correlationId);
|
|
5974
6009
|
reqTimestamp = TimeUtils.nowSeconds();
|
|
5975
6010
|
return [4 /*yield*/, this.executeTokenRequest(request, this.authority)];
|
|
5976
6011
|
case 1:
|
|
5977
|
-
response =
|
|
6012
|
+
response = _e.sent();
|
|
6013
|
+
httpVerToken = (_b = response.headers) === null || _b === void 0 ? void 0 : _b[HeaderNames.X_MS_HTTP_VERSION];
|
|
5978
6014
|
atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.addStaticFields({
|
|
5979
|
-
refreshTokenSize: ((
|
|
6015
|
+
refreshTokenSize: ((_c = response.body.refresh_token) === null || _c === void 0 ? void 0 : _c.length) || 0,
|
|
5980
6016
|
});
|
|
5981
|
-
|
|
6017
|
+
if (httpVerToken) {
|
|
6018
|
+
atsMeasurement === null || atsMeasurement === void 0 ? void 0 : atsMeasurement.addStaticFields({
|
|
6019
|
+
httpVerToken: httpVerToken,
|
|
6020
|
+
});
|
|
6021
|
+
}
|
|
6022
|
+
requestId = (_d = response.headers) === null || _d === void 0 ? void 0 : _d[HeaderNames.X_MS_REQUEST_ID];
|
|
5982
6023
|
responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
|
|
5983
6024
|
responseHandler.validateTokenResponse(response.body);
|
|
5984
6025
|
return [2 /*return*/, responseHandler.handleServerTokenResponse(response.body, this.authority, reqTimestamp, request, undefined, undefined, true, request.forceCache, requestId).then(function (result) {
|
|
@@ -6212,7 +6253,7 @@
|
|
|
6212
6253
|
return RefreshTokenClient;
|
|
6213
6254
|
}(BaseClient));
|
|
6214
6255
|
|
|
6215
|
-
/*! @azure/msal-common v9.0.
|
|
6256
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
6216
6257
|
|
|
6217
6258
|
/*
|
|
6218
6259
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6336,7 +6377,7 @@
|
|
|
6336
6377
|
return SilentFlowClient;
|
|
6337
6378
|
}(BaseClient));
|
|
6338
6379
|
|
|
6339
|
-
/*! @azure/msal-common v9.0.
|
|
6380
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
6340
6381
|
/*
|
|
6341
6382
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6342
6383
|
* Licensed under the MIT License.
|
|
@@ -6348,7 +6389,7 @@
|
|
|
6348
6389
|
response.hasOwnProperty("jwks_uri"));
|
|
6349
6390
|
}
|
|
6350
6391
|
|
|
6351
|
-
/*! @azure/msal-common v9.0.
|
|
6392
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
6352
6393
|
/*
|
|
6353
6394
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6354
6395
|
* Licensed under the MIT License.
|
|
@@ -6357,7 +6398,7 @@
|
|
|
6357
6398
|
var EndpointMetadata = rawMetdataJSON.endpointMetadata;
|
|
6358
6399
|
var InstanceDiscoveryMetadata = rawMetdataJSON.instanceDiscoveryMetadata;
|
|
6359
6400
|
|
|
6360
|
-
/*! @azure/msal-common v9.0.
|
|
6401
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
6361
6402
|
/*
|
|
6362
6403
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6363
6404
|
* Licensed under the MIT License.
|
|
@@ -6371,7 +6412,7 @@
|
|
|
6371
6412
|
ProtocolMode["OIDC"] = "OIDC";
|
|
6372
6413
|
})(exports.ProtocolMode || (exports.ProtocolMode = {}));
|
|
6373
6414
|
|
|
6374
|
-
/*! @azure/msal-common v9.0.
|
|
6415
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
6375
6416
|
|
|
6376
6417
|
/*
|
|
6377
6418
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6448,7 +6489,7 @@
|
|
|
6448
6489
|
return AuthorityMetadataEntity;
|
|
6449
6490
|
}());
|
|
6450
6491
|
|
|
6451
|
-
/*! @azure/msal-common v9.0.
|
|
6492
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
6452
6493
|
/*
|
|
6453
6494
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6454
6495
|
* Licensed under the MIT License.
|
|
@@ -6458,7 +6499,17 @@
|
|
|
6458
6499
|
response.hasOwnProperty("metadata"));
|
|
6459
6500
|
}
|
|
6460
6501
|
|
|
6461
|
-
/*! @azure/msal-common v9.0.
|
|
6502
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
6503
|
+
/*
|
|
6504
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6505
|
+
* Licensed under the MIT License.
|
|
6506
|
+
*/
|
|
6507
|
+
function isCloudInstanceDiscoveryErrorResponse(response) {
|
|
6508
|
+
return (response.hasOwnProperty("error") &&
|
|
6509
|
+
response.hasOwnProperty("error_description"));
|
|
6510
|
+
}
|
|
6511
|
+
|
|
6512
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
6462
6513
|
|
|
6463
6514
|
/*
|
|
6464
6515
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6580,7 +6631,7 @@
|
|
|
6580
6631
|
return RegionDiscovery;
|
|
6581
6632
|
}());
|
|
6582
6633
|
|
|
6583
|
-
/*! @azure/msal-common v9.0.
|
|
6634
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
6584
6635
|
|
|
6585
6636
|
/*
|
|
6586
6637
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7057,7 +7108,7 @@
|
|
|
7057
7108
|
case 1:
|
|
7058
7109
|
metadata = _a.sent();
|
|
7059
7110
|
if (metadata) {
|
|
7060
|
-
this.logger.verbose("
|
|
7111
|
+
this.logger.verbose("cloud discovery metadata was successfully returned from getCloudDiscoveryMetadataFromNetwork()");
|
|
7061
7112
|
metadataEntity.updateCloudDiscoveryMetadata(metadata, true);
|
|
7062
7113
|
return [2 /*return*/, AuthorityMetadataSource.NETWORK];
|
|
7063
7114
|
}
|
|
@@ -7068,8 +7119,8 @@
|
|
|
7068
7119
|
metadataEntity.updateCloudDiscoveryMetadata(harcodedMetadata, false);
|
|
7069
7120
|
return [2 /*return*/, AuthorityMetadataSource.HARDCODED_VALUES];
|
|
7070
7121
|
}
|
|
7071
|
-
// Metadata could not be obtained from config, cache or
|
|
7072
|
-
this.logger.
|
|
7122
|
+
// Metadata could not be obtained from the config, cache, network or hardcoded values
|
|
7123
|
+
this.logger.error("Did not find cloud discovery metadata from hardcoded values... Metadata could not be obtained from config, cache, network or hardcoded values. Throwing Untrusted Authority Error.");
|
|
7073
7124
|
throw ClientConfigurationError.createUntrustedAuthorityError();
|
|
7074
7125
|
}
|
|
7075
7126
|
});
|
|
@@ -7114,7 +7165,7 @@
|
|
|
7114
7165
|
*/
|
|
7115
7166
|
Authority.prototype.getCloudDiscoveryMetadataFromNetwork = function () {
|
|
7116
7167
|
return __awaiter(this, void 0, void 0, function () {
|
|
7117
|
-
var instanceDiscoveryEndpoint, options, match, response, metadata;
|
|
7168
|
+
var instanceDiscoveryEndpoint, options, match, response, typedResponseBody, metadata, error_1, typedError;
|
|
7118
7169
|
return __generator(this, function (_a) {
|
|
7119
7170
|
switch (_a.label) {
|
|
7120
7171
|
case 0:
|
|
@@ -7130,21 +7181,47 @@
|
|
|
7130
7181
|
return [4 /*yield*/, this.networkInterface.sendGetRequestAsync(instanceDiscoveryEndpoint, options)];
|
|
7131
7182
|
case 2:
|
|
7132
7183
|
response = _a.sent();
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
|
|
7184
|
+
typedResponseBody = void 0;
|
|
7185
|
+
metadata = void 0;
|
|
7186
|
+
if (isCloudInstanceDiscoveryResponse(response.body)) {
|
|
7187
|
+
typedResponseBody = response.body;
|
|
7188
|
+
metadata = typedResponseBody.metadata;
|
|
7189
|
+
this.logger.verbosePii("tenant_discovery_endpoint is: " + typedResponseBody.tenant_discovery_endpoint);
|
|
7190
|
+
}
|
|
7191
|
+
else if (isCloudInstanceDiscoveryErrorResponse(response.body)) {
|
|
7192
|
+
this.logger.warning("A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: " + response.status);
|
|
7193
|
+
typedResponseBody = response.body;
|
|
7194
|
+
if (typedResponseBody.error === Constants.INVALID_INSTANCE) {
|
|
7195
|
+
this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance.");
|
|
7196
|
+
return [2 /*return*/, null];
|
|
7197
|
+
}
|
|
7198
|
+
this.logger.warning("The CloudInstanceDiscoveryErrorResponse error is " + typedResponseBody.error);
|
|
7199
|
+
this.logger.warning("The CloudInstanceDiscoveryErrorResponse error description is " + typedResponseBody.error_description);
|
|
7200
|
+
this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []");
|
|
7201
|
+
metadata = [];
|
|
7202
|
+
}
|
|
7203
|
+
else {
|
|
7204
|
+
this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse");
|
|
7138
7205
|
return [2 /*return*/, null];
|
|
7139
7206
|
}
|
|
7207
|
+
this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request.");
|
|
7140
7208
|
match = Authority.getCloudDiscoveryMetadataFromNetworkResponse(metadata, this.hostnameAndPort);
|
|
7141
7209
|
return [3 /*break*/, 4];
|
|
7142
7210
|
case 3:
|
|
7143
|
-
_a.sent();
|
|
7211
|
+
error_1 = _a.sent();
|
|
7212
|
+
if (error_1 instanceof AuthError) {
|
|
7213
|
+
this.logger.error("There was a network error while attempting to get the cloud discovery instance metadata.\nError: " + error_1.errorCode + "\nError Description: " + error_1.errorMessage);
|
|
7214
|
+
}
|
|
7215
|
+
else {
|
|
7216
|
+
typedError = error_1;
|
|
7217
|
+
this.logger.error("A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.\nError: " + typedError.name + "\nError Description: " + typedError.message);
|
|
7218
|
+
}
|
|
7144
7219
|
return [2 /*return*/, null];
|
|
7145
7220
|
case 4:
|
|
7221
|
+
// Custom Domain scenario, host is trusted because Instance Discovery call succeeded
|
|
7146
7222
|
if (!match) {
|
|
7147
|
-
|
|
7223
|
+
this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request.");
|
|
7224
|
+
this.logger.verbose("Creating custom Authority for custom domain scenario.");
|
|
7148
7225
|
match = Authority.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);
|
|
7149
7226
|
}
|
|
7150
7227
|
return [2 /*return*/, match];
|
|
@@ -7276,7 +7353,7 @@
|
|
|
7276
7353
|
return Authority;
|
|
7277
7354
|
}());
|
|
7278
7355
|
|
|
7279
|
-
/*! @azure/msal-common v9.0.
|
|
7356
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
7280
7357
|
|
|
7281
7358
|
/*
|
|
7282
7359
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7337,7 +7414,7 @@
|
|
|
7337
7414
|
return AuthorityFactory;
|
|
7338
7415
|
}());
|
|
7339
7416
|
|
|
7340
|
-
/*! @azure/msal-common v9.0.
|
|
7417
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
7341
7418
|
|
|
7342
7419
|
/*
|
|
7343
7420
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7368,7 +7445,7 @@
|
|
|
7368
7445
|
return ServerTelemetryEntity;
|
|
7369
7446
|
}());
|
|
7370
7447
|
|
|
7371
|
-
/*! @azure/msal-common v9.0.
|
|
7448
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
7372
7449
|
|
|
7373
7450
|
/*
|
|
7374
7451
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7396,7 +7473,7 @@
|
|
|
7396
7473
|
return ThrottlingEntity;
|
|
7397
7474
|
}());
|
|
7398
7475
|
|
|
7399
|
-
/*! @azure/msal-common v9.0.
|
|
7476
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
7400
7477
|
|
|
7401
7478
|
/*
|
|
7402
7479
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7413,7 +7490,7 @@
|
|
|
7413
7490
|
}
|
|
7414
7491
|
};
|
|
7415
7492
|
|
|
7416
|
-
/*! @azure/msal-common v9.0.
|
|
7493
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
7417
7494
|
|
|
7418
7495
|
/*
|
|
7419
7496
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7458,7 +7535,7 @@
|
|
|
7458
7535
|
return JoseHeaderError;
|
|
7459
7536
|
}(AuthError));
|
|
7460
7537
|
|
|
7461
|
-
/*! @azure/msal-common v9.0.
|
|
7538
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
7462
7539
|
|
|
7463
7540
|
/*
|
|
7464
7541
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7498,7 +7575,7 @@
|
|
|
7498
7575
|
return JoseHeader;
|
|
7499
7576
|
}());
|
|
7500
7577
|
|
|
7501
|
-
/*! @azure/msal-common v9.0.
|
|
7578
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
7502
7579
|
|
|
7503
7580
|
/*
|
|
7504
7581
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7557,7 +7634,7 @@
|
|
|
7557
7634
|
return AuthenticationHeaderParser;
|
|
7558
7635
|
}());
|
|
7559
7636
|
|
|
7560
|
-
/*! @azure/msal-common v9.0.
|
|
7637
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
7561
7638
|
|
|
7562
7639
|
/*
|
|
7563
7640
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7719,7 +7796,7 @@
|
|
|
7719
7796
|
return ServerTelemetryManager;
|
|
7720
7797
|
}());
|
|
7721
7798
|
|
|
7722
|
-
/*! @azure/msal-common v9.0.
|
|
7799
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
7723
7800
|
|
|
7724
7801
|
/*
|
|
7725
7802
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7765,7 +7842,7 @@
|
|
|
7765
7842
|
this.logger.info("PerformanceClient: No correlation id provided for " + measureName + ", generating", eventCorrelationId);
|
|
7766
7843
|
}
|
|
7767
7844
|
this.logger.trace("PerformanceClient: Performance measurement started for " + measureName, eventCorrelationId);
|
|
7768
|
-
var performanceMeasurement = this.
|
|
7845
|
+
var performanceMeasurement = this.startPerformanceMeasurement(measureName, eventCorrelationId);
|
|
7769
7846
|
performanceMeasurement.startMeasurement();
|
|
7770
7847
|
var inProgressEvent = {
|
|
7771
7848
|
eventId: this.generateId(),
|
|
@@ -8014,7 +8091,7 @@
|
|
|
8014
8091
|
return PerformanceClient;
|
|
8015
8092
|
}());
|
|
8016
8093
|
|
|
8017
|
-
/*! @azure/msal-common v9.0.
|
|
8094
|
+
/*! @azure/msal-common v9.0.2 2023-01-10 */
|
|
8018
8095
|
|
|
8019
8096
|
/*
|
|
8020
8097
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8040,7 +8117,7 @@
|
|
|
8040
8117
|
StubPerformanceClient.prototype.generateId = function () {
|
|
8041
8118
|
return "callback-id";
|
|
8042
8119
|
};
|
|
8043
|
-
StubPerformanceClient.prototype.
|
|
8120
|
+
StubPerformanceClient.prototype.startPerformanceMeasurement = function () {
|
|
8044
8121
|
return new StubPerformanceMeasurement();
|
|
8045
8122
|
};
|
|
8046
8123
|
return StubPerformanceClient;
|
|
@@ -8603,6 +8680,7 @@
|
|
|
8603
8680
|
TemporaryCacheKeys["CCS_CREDENTIAL"] = "ccs.credential";
|
|
8604
8681
|
TemporaryCacheKeys["CORRELATION_ID"] = "request.correlationId";
|
|
8605
8682
|
TemporaryCacheKeys["NATIVE_REQUEST"] = "request.native";
|
|
8683
|
+
TemporaryCacheKeys["REDIRECT_CONTEXT"] = "request.redirect.context";
|
|
8606
8684
|
})(TemporaryCacheKeys || (TemporaryCacheKeys = {}));
|
|
8607
8685
|
/**
|
|
8608
8686
|
* Cache keys stored in-memory
|
|
@@ -9285,17 +9363,17 @@
|
|
|
9285
9363
|
var activeAccountValueFilters = this.getItem(activeAccountKeyFilters);
|
|
9286
9364
|
if (!activeAccountValueFilters) {
|
|
9287
9365
|
// if new active account cache type isn't found, it's an old version, so look for that instead
|
|
9288
|
-
this.logger.trace("No active account filters cache schema found, looking for legacy schema");
|
|
9366
|
+
this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");
|
|
9289
9367
|
var activeAccountKeyLocal = this.generateCacheKey(PersistentCacheKeys.ACTIVE_ACCOUNT);
|
|
9290
9368
|
var activeAccountValueLocal = this.getItem(activeAccountKeyLocal);
|
|
9291
9369
|
if (!activeAccountValueLocal) {
|
|
9292
|
-
this.logger.trace("No active account found");
|
|
9370
|
+
this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found");
|
|
9293
9371
|
return null;
|
|
9294
9372
|
}
|
|
9295
9373
|
var activeAccount = this.getAccountInfoByFilter({ localAccountId: activeAccountValueLocal })[0] || null;
|
|
9296
9374
|
if (activeAccount) {
|
|
9297
|
-
this.logger.trace("Legacy active account cache schema found");
|
|
9298
|
-
this.logger.trace("Adding active account filters cache schema");
|
|
9375
|
+
this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found");
|
|
9376
|
+
this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema");
|
|
9299
9377
|
this.setActiveAccount(activeAccount);
|
|
9300
9378
|
return activeAccount;
|
|
9301
9379
|
}
|
|
@@ -9303,13 +9381,13 @@
|
|
|
9303
9381
|
}
|
|
9304
9382
|
var activeAccountValueObj = this.validateAndParseJson(activeAccountValueFilters);
|
|
9305
9383
|
if (activeAccountValueObj) {
|
|
9306
|
-
this.logger.trace("Active account filters schema found");
|
|
9384
|
+
this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found");
|
|
9307
9385
|
return this.getAccountInfoByFilter({
|
|
9308
9386
|
homeAccountId: activeAccountValueObj.homeAccountId,
|
|
9309
9387
|
localAccountId: activeAccountValueObj.localAccountId
|
|
9310
9388
|
})[0] || null;
|
|
9311
9389
|
}
|
|
9312
|
-
this.logger.trace("No active account found");
|
|
9390
|
+
this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found");
|
|
9313
9391
|
return null;
|
|
9314
9392
|
};
|
|
9315
9393
|
/**
|
|
@@ -9340,6 +9418,7 @@
|
|
|
9340
9418
|
*/
|
|
9341
9419
|
BrowserCacheManager.prototype.getAccountInfoByFilter = function (accountFilter) {
|
|
9342
9420
|
var allAccounts = this.getAllAccounts();
|
|
9421
|
+
this.logger.trace("BrowserCacheManager.getAccountInfoByFilter: total " + allAccounts.length + " accounts found");
|
|
9343
9422
|
return allAccounts.filter(function (accountObj) {
|
|
9344
9423
|
if (accountFilter.username && accountFilter.username.toLowerCase() !== accountObj.username.toLowerCase()) {
|
|
9345
9424
|
return false;
|
|
@@ -9876,6 +9955,19 @@
|
|
|
9876
9955
|
}
|
|
9877
9956
|
return currentCacheKey;
|
|
9878
9957
|
};
|
|
9958
|
+
/**
|
|
9959
|
+
* Returns application id as redirect context during AcquireTokenRedirect flow.
|
|
9960
|
+
*/
|
|
9961
|
+
BrowserCacheManager.prototype.getRedirectRequestContext = function () {
|
|
9962
|
+
return this.getTemporaryCache(TemporaryCacheKeys.REDIRECT_CONTEXT, true);
|
|
9963
|
+
};
|
|
9964
|
+
/**
|
|
9965
|
+
* Sets application id as the redirect context during AcquireTokenRedirect flow.
|
|
9966
|
+
* @param value
|
|
9967
|
+
*/
|
|
9968
|
+
BrowserCacheManager.prototype.setRedirectRequestContext = function (value) {
|
|
9969
|
+
this.setTemporaryCache(TemporaryCacheKeys.REDIRECT_CONTEXT, value, true);
|
|
9970
|
+
};
|
|
9879
9971
|
return BrowserCacheManager;
|
|
9880
9972
|
}(CacheManager));
|
|
9881
9973
|
var DEFAULT_BROWSER_CACHE_MANAGER = function (clientId, logger) {
|
|
@@ -9889,7 +9981,7 @@
|
|
|
9889
9981
|
|
|
9890
9982
|
/* eslint-disable header/header */
|
|
9891
9983
|
var name = "@azure/msal-browser";
|
|
9892
|
-
var version = "2.32.
|
|
9984
|
+
var version = "2.32.2";
|
|
9893
9985
|
|
|
9894
9986
|
/*
|
|
9895
9987
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -10593,7 +10685,7 @@
|
|
|
10593
10685
|
*/
|
|
10594
10686
|
StandardInteractionClient.prototype.getClientConfiguration = function (serverTelemetryManager, requestAuthority, requestAzureCloudOptions) {
|
|
10595
10687
|
return __awaiter$1(this, void 0, void 0, function () {
|
|
10596
|
-
var discoveredAuthority;
|
|
10688
|
+
var discoveredAuthority, logger;
|
|
10597
10689
|
return __generator$1(this, function (_a) {
|
|
10598
10690
|
switch (_a.label) {
|
|
10599
10691
|
case 0:
|
|
@@ -10601,6 +10693,7 @@
|
|
|
10601
10693
|
return [4 /*yield*/, this.getDiscoveredAuthority(requestAuthority, requestAzureCloudOptions)];
|
|
10602
10694
|
case 1:
|
|
10603
10695
|
discoveredAuthority = _a.sent();
|
|
10696
|
+
logger = this.config.system.loggerOptions;
|
|
10604
10697
|
return [2 /*return*/, {
|
|
10605
10698
|
authOptions: {
|
|
10606
10699
|
clientId: this.config.auth.clientId,
|
|
@@ -10612,9 +10705,9 @@
|
|
|
10612
10705
|
preventCorsPreflight: true
|
|
10613
10706
|
},
|
|
10614
10707
|
loggerOptions: {
|
|
10615
|
-
loggerCallback:
|
|
10616
|
-
piiLoggingEnabled:
|
|
10617
|
-
logLevel:
|
|
10708
|
+
loggerCallback: logger.loggerCallback,
|
|
10709
|
+
piiLoggingEnabled: logger.piiLoggingEnabled,
|
|
10710
|
+
logLevel: logger.logLevel,
|
|
10618
10711
|
correlationId: this.correlationId
|
|
10619
10712
|
},
|
|
10620
10713
|
cryptoInterface: this.browserCrypto,
|
|
@@ -10658,13 +10751,14 @@
|
|
|
10658
10751
|
* @param requestCorrelationId
|
|
10659
10752
|
*/
|
|
10660
10753
|
StandardInteractionClient.prototype.getDiscoveredAuthority = function (requestAuthority, requestAzureCloudOptions) {
|
|
10754
|
+
var _a;
|
|
10661
10755
|
return __awaiter$1(this, void 0, void 0, function () {
|
|
10662
10756
|
var getAuthorityMeasurement, authorityOptions, userAuthority, builtAuthority;
|
|
10663
|
-
return __generator$1(this, function (
|
|
10664
|
-
switch (
|
|
10757
|
+
return __generator$1(this, function (_b) {
|
|
10758
|
+
switch (_b.label) {
|
|
10665
10759
|
case 0:
|
|
10666
10760
|
this.logger.verbose("getDiscoveredAuthority called", this.correlationId);
|
|
10667
|
-
getAuthorityMeasurement = this.performanceClient.startMeasurement(exports.PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.correlationId);
|
|
10761
|
+
getAuthorityMeasurement = (_a = this.performanceClient) === null || _a === void 0 ? void 0 : _a.startMeasurement(exports.PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.correlationId);
|
|
10668
10762
|
authorityOptions = {
|
|
10669
10763
|
protocolMode: this.config.auth.protocolMode,
|
|
10670
10764
|
knownAuthorities: this.config.auth.knownAuthorities,
|
|
@@ -10678,7 +10772,7 @@
|
|
|
10678
10772
|
return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(builtAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions, this.logger)
|
|
10679
10773
|
.then(function (result) {
|
|
10680
10774
|
getAuthorityMeasurement.endMeasurement({
|
|
10681
|
-
success: true
|
|
10775
|
+
success: true,
|
|
10682
10776
|
});
|
|
10683
10777
|
return result;
|
|
10684
10778
|
})
|
|
@@ -10690,7 +10784,7 @@
|
|
|
10690
10784
|
});
|
|
10691
10785
|
throw error;
|
|
10692
10786
|
})];
|
|
10693
|
-
case 1: return [2 /*return*/,
|
|
10787
|
+
case 1: return [2 /*return*/, _b.sent()];
|
|
10694
10788
|
}
|
|
10695
10789
|
});
|
|
10696
10790
|
});
|
|
@@ -12862,7 +12956,9 @@
|
|
|
12862
12956
|
// Default logger options for browser
|
|
12863
12957
|
var DEFAULT_LOGGER_OPTIONS = {
|
|
12864
12958
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
12865
|
-
loggerCallback: function () {
|
|
12959
|
+
loggerCallback: function () {
|
|
12960
|
+
// allow users to not set logger call back
|
|
12961
|
+
},
|
|
12866
12962
|
logLevel: exports.LogLevel.Info,
|
|
12867
12963
|
piiLoggingEnabled: false
|
|
12868
12964
|
};
|
|
@@ -12873,6 +12969,7 @@
|
|
|
12873
12969
|
useMsrCrypto: false,
|
|
12874
12970
|
entropy: undefined
|
|
12875
12971
|
} });
|
|
12972
|
+
var providedSystemOptions = __assign$1(__assign$1({}, userInputSystem), { loggerOptions: (userInputSystem === null || userInputSystem === void 0 ? void 0 : userInputSystem.loggerOptions) || DEFAULT_LOGGER_OPTIONS });
|
|
12876
12973
|
var DEFAULT_TELEMETRY_OPTIONS = {
|
|
12877
12974
|
application: {
|
|
12878
12975
|
appName: Constants.EMPTY_STRING,
|
|
@@ -12882,7 +12979,7 @@
|
|
|
12882
12979
|
var overlayedConfig = {
|
|
12883
12980
|
auth: __assign$1(__assign$1({}, DEFAULT_AUTH_OPTIONS), userInputAuth),
|
|
12884
12981
|
cache: __assign$1(__assign$1({}, DEFAULT_CACHE_OPTIONS), userInputCache),
|
|
12885
|
-
system: __assign$1(__assign$1({}, DEFAULT_BROWSER_SYSTEM_OPTIONS),
|
|
12982
|
+
system: __assign$1(__assign$1({}, DEFAULT_BROWSER_SYSTEM_OPTIONS), providedSystemOptions),
|
|
12886
12983
|
telemetry: __assign$1(__assign$1({}, DEFAULT_TELEMETRY_OPTIONS), userInputTelemetry)
|
|
12887
12984
|
};
|
|
12888
12985
|
return overlayedConfig;
|
|
@@ -13373,27 +13470,6 @@
|
|
|
13373
13470
|
return EventHandler;
|
|
13374
13471
|
}());
|
|
13375
13472
|
|
|
13376
|
-
/*
|
|
13377
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13378
|
-
* Licensed under the MIT License.
|
|
13379
|
-
*/
|
|
13380
|
-
|
|
13381
|
-
var internals = /*#__PURE__*/Object.freeze({
|
|
13382
|
-
__proto__: null,
|
|
13383
|
-
BrowserCacheManager: BrowserCacheManager,
|
|
13384
|
-
StandardInteractionClient: StandardInteractionClient,
|
|
13385
|
-
RedirectClient: RedirectClient,
|
|
13386
|
-
PopupClient: PopupClient,
|
|
13387
|
-
SilentIframeClient: SilentIframeClient,
|
|
13388
|
-
SilentCacheClient: SilentCacheClient,
|
|
13389
|
-
SilentRefreshClient: SilentRefreshClient,
|
|
13390
|
-
RedirectHandler: RedirectHandler,
|
|
13391
|
-
EventHandler: EventHandler,
|
|
13392
|
-
NativeMessageHandler: NativeMessageHandler,
|
|
13393
|
-
BrowserConstants: BrowserConstants,
|
|
13394
|
-
get TemporaryCacheKeys () { return TemporaryCacheKeys; }
|
|
13395
|
-
});
|
|
13396
|
-
|
|
13397
13473
|
/*
|
|
13398
13474
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13399
13475
|
* Licensed under the MIT License.
|
|
@@ -14928,6 +15004,29 @@
|
|
|
14928
15004
|
return CryptoOps;
|
|
14929
15005
|
}());
|
|
14930
15006
|
|
|
15007
|
+
/*
|
|
15008
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
15009
|
+
* Licensed under the MIT License.
|
|
15010
|
+
*/
|
|
15011
|
+
|
|
15012
|
+
var internals = /*#__PURE__*/Object.freeze({
|
|
15013
|
+
__proto__: null,
|
|
15014
|
+
BrowserCacheManager: BrowserCacheManager,
|
|
15015
|
+
StandardInteractionClient: StandardInteractionClient,
|
|
15016
|
+
RedirectClient: RedirectClient,
|
|
15017
|
+
PopupClient: PopupClient,
|
|
15018
|
+
SilentIframeClient: SilentIframeClient,
|
|
15019
|
+
SilentCacheClient: SilentCacheClient,
|
|
15020
|
+
SilentRefreshClient: SilentRefreshClient,
|
|
15021
|
+
RedirectHandler: RedirectHandler,
|
|
15022
|
+
EventHandler: EventHandler,
|
|
15023
|
+
NativeMessageHandler: NativeMessageHandler,
|
|
15024
|
+
BrowserConstants: BrowserConstants,
|
|
15025
|
+
get TemporaryCacheKeys () { return TemporaryCacheKeys; },
|
|
15026
|
+
CryptoOps: CryptoOps,
|
|
15027
|
+
NativeAuthError: NativeAuthError
|
|
15028
|
+
});
|
|
15029
|
+
|
|
14931
15030
|
/*
|
|
14932
15031
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
14933
15032
|
* Licensed under the MIT License.
|
|
@@ -15307,7 +15406,7 @@
|
|
|
15307
15406
|
_this.guidGenerator = new GuidGenerator(_this.browserCrypto);
|
|
15308
15407
|
return _this;
|
|
15309
15408
|
}
|
|
15310
|
-
BrowserPerformanceClient.prototype.
|
|
15409
|
+
BrowserPerformanceClient.prototype.startPerformanceMeasurement = function (measureName, correlationId) {
|
|
15311
15410
|
return new BrowserPerformanceMeasurement(measureName, correlationId);
|
|
15312
15411
|
};
|
|
15313
15412
|
BrowserPerformanceClient.prototype.generateId = function () {
|
|
@@ -16412,7 +16511,8 @@
|
|
|
16412
16511
|
success: true,
|
|
16413
16512
|
fromCache: result.fromCache,
|
|
16414
16513
|
isNativeBroker: result.fromNativeBroker,
|
|
16415
|
-
|
|
16514
|
+
cacheLookupPolicy: request.cacheLookupPolicy,
|
|
16515
|
+
requestId: result.requestId,
|
|
16416
16516
|
});
|
|
16417
16517
|
atsMeasurement.flushMeasurement();
|
|
16418
16518
|
return result;
|
|
@@ -16450,13 +16550,13 @@
|
|
|
16450
16550
|
*/
|
|
16451
16551
|
PublicClientApplication.prototype.acquireTokenSilentAsync = function (request, account) {
|
|
16452
16552
|
return __awaiter$1(this, void 0, void 0, function () {
|
|
16453
|
-
var
|
|
16553
|
+
var atsAsyncMeasurement, result, silentRequest, silentCacheClient, silentRequest_1, requestWithCLP_1;
|
|
16454
16554
|
var _this = this;
|
|
16455
16555
|
return __generator$1(this, function (_a) {
|
|
16456
16556
|
switch (_a.label) {
|
|
16457
16557
|
case 0:
|
|
16458
16558
|
this.eventHandler.emitEvent(exports.EventType.ACQUIRE_TOKEN_START, exports.InteractionType.Silent, request);
|
|
16459
|
-
|
|
16559
|
+
atsAsyncMeasurement = this.performanceClient.startMeasurement(exports.PerformanceEvents.AcquireTokenSilentAsync, request.correlationId);
|
|
16460
16560
|
if (!(NativeMessageHandler.isNativeAvailable(this.config, this.logger, this.nativeExtensionProvider, request.authenticationScheme) && account.nativeAccountId)) return [3 /*break*/, 1];
|
|
16461
16561
|
this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform");
|
|
16462
16562
|
silentRequest = __assign$1(__assign$1({}, request), { account: account });
|
|
@@ -16509,7 +16609,7 @@
|
|
|
16509
16609
|
_a.label = 3;
|
|
16510
16610
|
case 3: return [2 /*return*/, result.then(function (response) {
|
|
16511
16611
|
_this.eventHandler.emitEvent(exports.EventType.ACQUIRE_TOKEN_SUCCESS, exports.InteractionType.Silent, response);
|
|
16512
|
-
|
|
16612
|
+
atsAsyncMeasurement.endMeasurement({
|
|
16513
16613
|
success: true,
|
|
16514
16614
|
fromCache: response.fromCache,
|
|
16515
16615
|
isNativeBroker: response.fromNativeBroker,
|
|
@@ -16518,7 +16618,7 @@
|
|
|
16518
16618
|
return response;
|
|
16519
16619
|
}).catch(function (tokenRenewalError) {
|
|
16520
16620
|
_this.eventHandler.emitEvent(exports.EventType.ACQUIRE_TOKEN_FAILURE, exports.InteractionType.Silent, null, tokenRenewalError);
|
|
16521
|
-
|
|
16621
|
+
atsAsyncMeasurement.endMeasurement({
|
|
16522
16622
|
errorCode: tokenRenewalError.errorCode,
|
|
16523
16623
|
subErrorCode: tokenRenewalError.subError,
|
|
16524
16624
|
success: false
|