@azure/msal-browser 2.37.0 → 2.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +213 -213
- 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/IPublicClientApplication.js.map +1 -1
- package/dist/app/PublicClientApplication.js +1 -1
- package/dist/app/PublicClientApplication.js.map +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.js +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.js.map +1 -1
- package/dist/cache/AsyncMemoryStorage.js +1 -1
- package/dist/cache/AsyncMemoryStorage.js.map +1 -1
- package/dist/cache/BrowserCacheManager.js +1 -1
- package/dist/cache/BrowserCacheManager.js.map +1 -1
- package/dist/cache/BrowserStorage.js +1 -1
- package/dist/cache/BrowserStorage.js.map +1 -1
- package/dist/cache/CryptoKeyStore.js +1 -1
- package/dist/cache/CryptoKeyStore.js.map +1 -1
- package/dist/cache/DatabaseStorage.js +1 -1
- package/dist/cache/DatabaseStorage.js.map +1 -1
- package/dist/cache/MemoryStorage.js +1 -1
- package/dist/cache/MemoryStorage.js.map +1 -1
- package/dist/cache/TokenCache.js +1 -1
- package/dist/cache/TokenCache.js.map +1 -1
- package/dist/config/Configuration.js +1 -1
- package/dist/config/Configuration.js.map +1 -1
- package/dist/crypto/BrowserCrypto.js +1 -1
- package/dist/crypto/BrowserCrypto.js.map +1 -1
- package/dist/crypto/CryptoOps.js +1 -1
- package/dist/crypto/CryptoOps.js.map +1 -1
- package/dist/crypto/GuidGenerator.js +1 -1
- package/dist/crypto/GuidGenerator.js.map +1 -1
- package/dist/crypto/ModernBrowserCrypto.js +1 -1
- package/dist/crypto/ModernBrowserCrypto.js.map +1 -1
- package/dist/crypto/MsBrowserCrypto.js +1 -1
- package/dist/crypto/MsBrowserCrypto.js.map +1 -1
- package/dist/crypto/MsrBrowserCrypto.js +1 -1
- package/dist/crypto/MsrBrowserCrypto.js.map +1 -1
- package/dist/crypto/PkceGenerator.js +1 -1
- package/dist/crypto/PkceGenerator.js.map +1 -1
- package/dist/crypto/SignedHttpRequest.js +1 -1
- package/dist/crypto/SignedHttpRequest.js.map +1 -1
- package/dist/encode/Base64Decode.js +1 -1
- package/dist/encode/Base64Decode.js.map +1 -1
- package/dist/encode/Base64Encode.js +1 -1
- package/dist/encode/Base64Encode.js.map +1 -1
- package/dist/error/BrowserAuthError.js +1 -1
- package/dist/error/BrowserAuthError.js.map +1 -1
- package/dist/error/BrowserConfigurationAuthError.js +1 -1
- package/dist/error/BrowserConfigurationAuthError.js.map +1 -1
- package/dist/error/NativeAuthError.js +1 -1
- package/dist/error/NativeAuthError.js.map +1 -1
- package/dist/event/EventHandler.js +1 -1
- package/dist/event/EventHandler.js.map +1 -1
- package/dist/event/EventMessage.d.ts.map +1 -1
- package/dist/event/EventMessage.js +2 -1
- package/dist/event/EventMessage.js.map +1 -1
- package/dist/event/EventType.d.ts +2 -1
- package/dist/event/EventType.d.ts.map +1 -1
- package/dist/event/EventType.js +2 -1
- package/dist/event/EventType.js.map +1 -1
- package/dist/index.cjs.js +193 -112
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/interaction_client/BaseInteractionClient.d.ts +2 -1
- package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/BaseInteractionClient.js +33 -7
- package/dist/interaction_client/BaseInteractionClient.js.map +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.d.ts +1 -1
- package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.js +22 -15
- package/dist/interaction_client/NativeInteractionClient.js.map +1 -1
- package/dist/interaction_client/PopupClient.js +1 -1
- package/dist/interaction_client/PopupClient.js.map +1 -1
- package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
- package/dist/interaction_client/RedirectClient.js +3 -2
- package/dist/interaction_client/RedirectClient.js.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.js +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.js.map +1 -1
- package/dist/interaction_client/SilentCacheClient.js +2 -2
- package/dist/interaction_client/SilentCacheClient.js.map +1 -1
- package/dist/interaction_client/SilentIframeClient.js +1 -1
- package/dist/interaction_client/SilentIframeClient.js.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.js +2 -2
- package/dist/interaction_client/SilentRefreshClient.js.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.js +1 -1
- package/dist/interaction_client/StandardInteractionClient.js.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/RedirectHandler.js.map +1 -1
- package/dist/interaction_handler/SilentHandler.js +1 -1
- package/dist/interaction_handler/SilentHandler.js.map +1 -1
- package/dist/internals.js +1 -1
- package/dist/internals.js.map +1 -1
- package/dist/navigation/NavigationClient.js +1 -1
- package/dist/navigation/NavigationClient.js.map +1 -1
- package/dist/network/FetchClient.js +1 -1
- package/dist/network/FetchClient.js.map +1 -1
- package/dist/network/XhrClient.js +1 -1
- package/dist/network/XhrClient.js.map +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/BrowserPerformanceClient.js.map +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.js +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.js.map +1 -1
- package/dist/utils/BrowserConstants.js +1 -1
- package/dist/utils/BrowserConstants.js.map +1 -1
- package/dist/utils/BrowserProtocolUtils.js +1 -1
- package/dist/utils/BrowserProtocolUtils.js.map +1 -1
- package/dist/utils/BrowserStringUtils.js +1 -1
- package/dist/utils/BrowserStringUtils.js.map +1 -1
- package/dist/utils/BrowserUtils.js +1 -1
- package/dist/utils/BrowserUtils.js.map +1 -1
- package/dist/utils/MathUtils.js +1 -1
- package/dist/utils/MathUtils.js.map +1 -1
- package/lib/msal-browser.js +193 -112
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +35 -35
- package/package.json +95 -95
package/lib/msal-browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v2.37.
|
|
1
|
+
/*! @azure/msal-browser v2.37.1 2023-06-07 */
|
|
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 v13.
|
|
122
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
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 v13.
|
|
209
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
210
210
|
|
|
211
211
|
/*
|
|
212
212
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -578,7 +578,7 @@
|
|
|
578
578
|
JsonTypes["Pop"] = "pop";
|
|
579
579
|
})(JsonTypes || (JsonTypes = {}));
|
|
580
580
|
|
|
581
|
-
/*! @azure/msal-common v13.
|
|
581
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
582
582
|
|
|
583
583
|
/*
|
|
584
584
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -634,7 +634,7 @@
|
|
|
634
634
|
return AuthError;
|
|
635
635
|
}(Error));
|
|
636
636
|
|
|
637
|
-
/*! @azure/msal-common v13.
|
|
637
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
638
638
|
|
|
639
639
|
/*
|
|
640
640
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -709,7 +709,7 @@
|
|
|
709
709
|
}
|
|
710
710
|
};
|
|
711
711
|
|
|
712
|
-
/*! @azure/msal-common v13.
|
|
712
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
713
713
|
|
|
714
714
|
/*
|
|
715
715
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1224,7 +1224,7 @@
|
|
|
1224
1224
|
return ClientAuthError;
|
|
1225
1225
|
}(AuthError));
|
|
1226
1226
|
|
|
1227
|
-
/*! @azure/msal-common v13.
|
|
1227
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
1228
1228
|
|
|
1229
1229
|
/*
|
|
1230
1230
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1349,7 +1349,7 @@
|
|
|
1349
1349
|
return StringUtils;
|
|
1350
1350
|
}());
|
|
1351
1351
|
|
|
1352
|
-
/*! @azure/msal-common v13.
|
|
1352
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
1353
1353
|
|
|
1354
1354
|
/*
|
|
1355
1355
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1539,12 +1539,12 @@
|
|
|
1539
1539
|
return Logger;
|
|
1540
1540
|
}());
|
|
1541
1541
|
|
|
1542
|
-
/*! @azure/msal-common v13.
|
|
1542
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
1543
1543
|
/* eslint-disable header/header */
|
|
1544
1544
|
var name$1 = "@azure/msal-common";
|
|
1545
|
-
var version$1 = "13.
|
|
1545
|
+
var version$1 = "13.1.0";
|
|
1546
1546
|
|
|
1547
|
-
/*! @azure/msal-common v13.
|
|
1547
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
1548
1548
|
/*
|
|
1549
1549
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1550
1550
|
* Licensed under the MIT License.
|
|
@@ -1565,7 +1565,7 @@
|
|
|
1565
1565
|
AzureCloudInstance["AzureUsGovernment"] = "https://login.microsoftonline.us";
|
|
1566
1566
|
})(exports.AzureCloudInstance || (exports.AzureCloudInstance = {}));
|
|
1567
1567
|
|
|
1568
|
-
/*! @azure/msal-common v13.
|
|
1568
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
1569
1569
|
|
|
1570
1570
|
/*
|
|
1571
1571
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1666,6 +1666,10 @@
|
|
|
1666
1666
|
invalidAuthenticationHeader: {
|
|
1667
1667
|
code: "invalid_authentication_header",
|
|
1668
1668
|
desc: "Invalid authentication header provided"
|
|
1669
|
+
},
|
|
1670
|
+
authorityMismatch: {
|
|
1671
|
+
code: "authority_mismatch",
|
|
1672
|
+
desc: "Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority."
|
|
1669
1673
|
}
|
|
1670
1674
|
};
|
|
1671
1675
|
/**
|
|
@@ -1817,10 +1821,16 @@
|
|
|
1817
1821
|
ClientConfigurationError.createInvalidAuthenticationHeaderError = function (invalidHeaderName, details) {
|
|
1818
1822
|
return new ClientConfigurationError(ClientConfigurationErrorMessage.invalidAuthenticationHeader.code, ClientConfigurationErrorMessage.invalidAuthenticationHeader.desc + ". Invalid header: " + invalidHeaderName + ". Details: " + details);
|
|
1819
1823
|
};
|
|
1824
|
+
/**
|
|
1825
|
+
* Create an error when the authority provided in request does not match authority provided in account or MSAL.js configuration.
|
|
1826
|
+
*/
|
|
1827
|
+
ClientConfigurationError.createAuthorityMismatchError = function () {
|
|
1828
|
+
return new ClientConfigurationError(ClientConfigurationErrorMessage.authorityMismatch.code, ClientConfigurationErrorMessage.authorityMismatch.desc);
|
|
1829
|
+
};
|
|
1820
1830
|
return ClientConfigurationError;
|
|
1821
1831
|
}(ClientAuthError));
|
|
1822
1832
|
|
|
1823
|
-
/*! @azure/msal-common v13.
|
|
1833
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
1824
1834
|
|
|
1825
1835
|
/*
|
|
1826
1836
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2019,7 +2029,7 @@
|
|
|
2019
2029
|
return ScopeSet;
|
|
2020
2030
|
}());
|
|
2021
2031
|
|
|
2022
|
-
/*! @azure/msal-common v13.
|
|
2032
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
2023
2033
|
|
|
2024
2034
|
/*
|
|
2025
2035
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2057,7 +2067,7 @@
|
|
|
2057
2067
|
};
|
|
2058
2068
|
}
|
|
2059
2069
|
|
|
2060
|
-
/*! @azure/msal-common v13.
|
|
2070
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
2061
2071
|
/*
|
|
2062
2072
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2063
2073
|
* Licensed under the MIT License.
|
|
@@ -2073,7 +2083,7 @@
|
|
|
2073
2083
|
AuthorityType[AuthorityType["Ciam"] = 3] = "Ciam";
|
|
2074
2084
|
})(AuthorityType || (AuthorityType = {}));
|
|
2075
2085
|
|
|
2076
|
-
/*! @azure/msal-common v13.
|
|
2086
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
2077
2087
|
|
|
2078
2088
|
/*
|
|
2079
2089
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2312,7 +2322,7 @@
|
|
|
2312
2322
|
return AccountEntity;
|
|
2313
2323
|
}());
|
|
2314
2324
|
|
|
2315
|
-
/*! @azure/msal-common v13.
|
|
2325
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
2316
2326
|
|
|
2317
2327
|
/*
|
|
2318
2328
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2364,7 +2374,7 @@
|
|
|
2364
2374
|
return AuthToken;
|
|
2365
2375
|
}());
|
|
2366
2376
|
|
|
2367
|
-
/*! @azure/msal-common v13.
|
|
2377
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
2368
2378
|
|
|
2369
2379
|
/*
|
|
2370
2380
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3412,7 +3422,7 @@
|
|
|
3412
3422
|
return DefaultStorageClass;
|
|
3413
3423
|
}(CacheManager));
|
|
3414
3424
|
|
|
3415
|
-
/*! @azure/msal-common v13.
|
|
3425
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
3416
3426
|
|
|
3417
3427
|
/*
|
|
3418
3428
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3505,7 +3515,7 @@
|
|
|
3505
3515
|
return __assign({ clientCapabilities: [], azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS, skipAuthorityMetadataCache: false }, authOptions);
|
|
3506
3516
|
}
|
|
3507
3517
|
|
|
3508
|
-
/*! @azure/msal-common v13.
|
|
3518
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
3509
3519
|
|
|
3510
3520
|
/*
|
|
3511
3521
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3525,7 +3535,7 @@
|
|
|
3525
3535
|
return ServerError;
|
|
3526
3536
|
}(AuthError));
|
|
3527
3537
|
|
|
3528
|
-
/*! @azure/msal-common v13.
|
|
3538
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
3529
3539
|
|
|
3530
3540
|
/*
|
|
3531
3541
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3621,7 +3631,7 @@
|
|
|
3621
3631
|
return ThrottlingUtils;
|
|
3622
3632
|
}());
|
|
3623
3633
|
|
|
3624
|
-
/*! @azure/msal-common v13.
|
|
3634
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
3625
3635
|
|
|
3626
3636
|
/*
|
|
3627
3637
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3670,7 +3680,7 @@
|
|
|
3670
3680
|
return NetworkManager;
|
|
3671
3681
|
}());
|
|
3672
3682
|
|
|
3673
|
-
/*! @azure/msal-common v13.
|
|
3683
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
3674
3684
|
/*
|
|
3675
3685
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3676
3686
|
* Licensed under the MIT License.
|
|
@@ -3681,7 +3691,7 @@
|
|
|
3681
3691
|
CcsCredentialType["UPN"] = "UPN";
|
|
3682
3692
|
})(CcsCredentialType || (CcsCredentialType = {}));
|
|
3683
3693
|
|
|
3684
|
-
/*! @azure/msal-common v13.
|
|
3694
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
3685
3695
|
|
|
3686
3696
|
/*
|
|
3687
3697
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3772,7 +3782,7 @@
|
|
|
3772
3782
|
return RequestValidator;
|
|
3773
3783
|
}());
|
|
3774
3784
|
|
|
3775
|
-
/*! @azure/msal-common v13.
|
|
3785
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
3776
3786
|
|
|
3777
3787
|
/*
|
|
3778
3788
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4150,7 +4160,7 @@
|
|
|
4150
4160
|
return RequestParameterBuilder;
|
|
4151
4161
|
}());
|
|
4152
4162
|
|
|
4153
|
-
/*! @azure/msal-common v13.
|
|
4163
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
4154
4164
|
|
|
4155
4165
|
/*
|
|
4156
4166
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4252,7 +4262,7 @@
|
|
|
4252
4262
|
return BaseClient;
|
|
4253
4263
|
}());
|
|
4254
4264
|
|
|
4255
|
-
/*! @azure/msal-common v13.
|
|
4265
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
4256
4266
|
|
|
4257
4267
|
/*
|
|
4258
4268
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4390,7 +4400,7 @@
|
|
|
4390
4400
|
return CredentialEntity;
|
|
4391
4401
|
}());
|
|
4392
4402
|
|
|
4393
|
-
/*! @azure/msal-common v13.
|
|
4403
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
4394
4404
|
|
|
4395
4405
|
/*
|
|
4396
4406
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4454,7 +4464,7 @@
|
|
|
4454
4464
|
return IdTokenEntity;
|
|
4455
4465
|
}(CredentialEntity));
|
|
4456
4466
|
|
|
4457
|
-
/*! @azure/msal-common v13.
|
|
4467
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
4458
4468
|
/*
|
|
4459
4469
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4460
4470
|
* Licensed under the MIT License.
|
|
@@ -4504,7 +4514,7 @@
|
|
|
4504
4514
|
return TimeUtils;
|
|
4505
4515
|
}());
|
|
4506
4516
|
|
|
4507
|
-
/*! @azure/msal-common v13.
|
|
4517
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
4508
4518
|
|
|
4509
4519
|
/*
|
|
4510
4520
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4618,7 +4628,7 @@
|
|
|
4618
4628
|
return AccessTokenEntity;
|
|
4619
4629
|
}(CredentialEntity));
|
|
4620
4630
|
|
|
4621
|
-
/*! @azure/msal-common v13.
|
|
4631
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
4622
4632
|
|
|
4623
4633
|
/*
|
|
4624
4634
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4685,7 +4695,7 @@
|
|
|
4685
4695
|
return RefreshTokenEntity;
|
|
4686
4696
|
}(CredentialEntity));
|
|
4687
4697
|
|
|
4688
|
-
/*! @azure/msal-common v13.
|
|
4698
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
4689
4699
|
|
|
4690
4700
|
/*
|
|
4691
4701
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4764,7 +4774,7 @@
|
|
|
4764
4774
|
return InteractionRequiredAuthError;
|
|
4765
4775
|
}(AuthError));
|
|
4766
4776
|
|
|
4767
|
-
/*! @azure/msal-common v13.
|
|
4777
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
4768
4778
|
/*
|
|
4769
4779
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4770
4780
|
* Licensed under the MIT License.
|
|
@@ -4780,7 +4790,7 @@
|
|
|
4780
4790
|
return CacheRecord;
|
|
4781
4791
|
}());
|
|
4782
4792
|
|
|
4783
|
-
/*! @azure/msal-common v13.
|
|
4793
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
4784
4794
|
|
|
4785
4795
|
/*
|
|
4786
4796
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4851,7 +4861,7 @@
|
|
|
4851
4861
|
return ProtocolUtils;
|
|
4852
4862
|
}());
|
|
4853
4863
|
|
|
4854
|
-
/*! @azure/msal-common v13.
|
|
4864
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
4855
4865
|
|
|
4856
4866
|
/*
|
|
4857
4867
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5085,7 +5095,7 @@
|
|
|
5085
5095
|
return UrlString;
|
|
5086
5096
|
}());
|
|
5087
5097
|
|
|
5088
|
-
/*! @azure/msal-common v13.
|
|
5098
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
5089
5099
|
/*
|
|
5090
5100
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5091
5101
|
* Licensed under the MIT License.
|
|
@@ -5314,7 +5324,7 @@
|
|
|
5314
5324
|
"status",
|
|
5315
5325
|
]);
|
|
5316
5326
|
|
|
5317
|
-
/*! @azure/msal-common v13.
|
|
5327
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
5318
5328
|
|
|
5319
5329
|
/*
|
|
5320
5330
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5423,7 +5433,7 @@
|
|
|
5423
5433
|
return PopTokenGenerator;
|
|
5424
5434
|
}());
|
|
5425
5435
|
|
|
5426
|
-
/*! @azure/msal-common v13.
|
|
5436
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
5427
5437
|
|
|
5428
5438
|
/*
|
|
5429
5439
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5493,7 +5503,7 @@
|
|
|
5493
5503
|
return AppMetadataEntity;
|
|
5494
5504
|
}());
|
|
5495
5505
|
|
|
5496
|
-
/*! @azure/msal-common v13.
|
|
5506
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
5497
5507
|
/*
|
|
5498
5508
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5499
5509
|
* Licensed under the MIT License.
|
|
@@ -5529,7 +5539,7 @@
|
|
|
5529
5539
|
return TokenCacheContext;
|
|
5530
5540
|
}());
|
|
5531
5541
|
|
|
5532
|
-
/*! @azure/msal-common v13.
|
|
5542
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
5533
5543
|
|
|
5534
5544
|
/*
|
|
5535
5545
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5816,7 +5826,7 @@
|
|
|
5816
5826
|
return ResponseHandler;
|
|
5817
5827
|
}());
|
|
5818
5828
|
|
|
5819
|
-
/*! @azure/msal-common v13.
|
|
5829
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
5820
5830
|
|
|
5821
5831
|
/*
|
|
5822
5832
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6246,7 +6256,7 @@
|
|
|
6246
6256
|
return [4 /*yield*/, popTokenGenerator.generateCnf(request)];
|
|
6247
6257
|
case 1:
|
|
6248
6258
|
reqCnfData = _b.sent();
|
|
6249
|
-
parameterBuilder.addPopToken(reqCnfData.
|
|
6259
|
+
parameterBuilder.addPopToken(reqCnfData.reqCnfString);
|
|
6250
6260
|
_b.label = 2;
|
|
6251
6261
|
case 2: return [2 /*return*/, parameterBuilder.createQueryString()];
|
|
6252
6262
|
}
|
|
@@ -6294,7 +6304,7 @@
|
|
|
6294
6304
|
return AuthorizationCodeClient;
|
|
6295
6305
|
}(BaseClient));
|
|
6296
6306
|
|
|
6297
|
-
/*! @azure/msal-common v13.
|
|
6307
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
6298
6308
|
|
|
6299
6309
|
/*
|
|
6300
6310
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6568,7 +6578,7 @@
|
|
|
6568
6578
|
return RefreshTokenClient;
|
|
6569
6579
|
}(BaseClient));
|
|
6570
6580
|
|
|
6571
|
-
/*! @azure/msal-common v13.
|
|
6581
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
6572
6582
|
|
|
6573
6583
|
/*
|
|
6574
6584
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6692,7 +6702,7 @@
|
|
|
6692
6702
|
return SilentFlowClient;
|
|
6693
6703
|
}(BaseClient));
|
|
6694
6704
|
|
|
6695
|
-
/*! @azure/msal-common v13.
|
|
6705
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
6696
6706
|
/*
|
|
6697
6707
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6698
6708
|
* Licensed under the MIT License.
|
|
@@ -6704,7 +6714,7 @@
|
|
|
6704
6714
|
response.hasOwnProperty("jwks_uri"));
|
|
6705
6715
|
}
|
|
6706
6716
|
|
|
6707
|
-
/*! @azure/msal-common v13.
|
|
6717
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
6708
6718
|
/*
|
|
6709
6719
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6710
6720
|
* Licensed under the MIT License.
|
|
@@ -6713,7 +6723,7 @@
|
|
|
6713
6723
|
var EndpointMetadata = rawMetdataJSON.endpointMetadata;
|
|
6714
6724
|
var InstanceDiscoveryMetadata = rawMetdataJSON.instanceDiscoveryMetadata;
|
|
6715
6725
|
|
|
6716
|
-
/*! @azure/msal-common v13.
|
|
6726
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
6717
6727
|
/*
|
|
6718
6728
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6719
6729
|
* Licensed under the MIT License.
|
|
@@ -6727,7 +6737,7 @@
|
|
|
6727
6737
|
ProtocolMode["OIDC"] = "OIDC";
|
|
6728
6738
|
})(exports.ProtocolMode || (exports.ProtocolMode = {}));
|
|
6729
6739
|
|
|
6730
|
-
/*! @azure/msal-common v13.
|
|
6740
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
6731
6741
|
|
|
6732
6742
|
/*
|
|
6733
6743
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6804,7 +6814,7 @@
|
|
|
6804
6814
|
return AuthorityMetadataEntity;
|
|
6805
6815
|
}());
|
|
6806
6816
|
|
|
6807
|
-
/*! @azure/msal-common v13.
|
|
6817
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
6808
6818
|
/*
|
|
6809
6819
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6810
6820
|
* Licensed under the MIT License.
|
|
@@ -6814,7 +6824,7 @@
|
|
|
6814
6824
|
response.hasOwnProperty("metadata"));
|
|
6815
6825
|
}
|
|
6816
6826
|
|
|
6817
|
-
/*! @azure/msal-common v13.
|
|
6827
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
6818
6828
|
/*
|
|
6819
6829
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6820
6830
|
* Licensed under the MIT License.
|
|
@@ -6824,7 +6834,7 @@
|
|
|
6824
6834
|
response.hasOwnProperty("error_description"));
|
|
6825
6835
|
}
|
|
6826
6836
|
|
|
6827
|
-
/*! @azure/msal-common v13.
|
|
6837
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
6828
6838
|
|
|
6829
6839
|
/*
|
|
6830
6840
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6956,7 +6966,7 @@
|
|
|
6956
6966
|
return RegionDiscovery;
|
|
6957
6967
|
}());
|
|
6958
6968
|
|
|
6959
|
-
/*! @azure/msal-common v13.
|
|
6969
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
6960
6970
|
|
|
6961
6971
|
/*
|
|
6962
6972
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6979,23 +6989,31 @@
|
|
|
6979
6989
|
this.correlationId = correlationId;
|
|
6980
6990
|
this.regionDiscovery = new RegionDiscovery(networkInterface, this.performanceClient, this.correlationId);
|
|
6981
6991
|
}
|
|
6992
|
+
/**
|
|
6993
|
+
* Get {@link AuthorityType}
|
|
6994
|
+
* @param authorityUri {@link IUri}
|
|
6995
|
+
* @private
|
|
6996
|
+
*/
|
|
6997
|
+
Authority.prototype.getAuthorityType = function (authorityUri) {
|
|
6998
|
+
// CIAM auth url pattern is being standardized as: <tenant>.ciamlogin.com
|
|
6999
|
+
if (authorityUri.HostNameAndPort.endsWith(Constants.CIAM_AUTH_URL)) {
|
|
7000
|
+
return AuthorityType.Ciam;
|
|
7001
|
+
}
|
|
7002
|
+
var pathSegments = authorityUri.PathSegments;
|
|
7003
|
+
if (pathSegments.length) {
|
|
7004
|
+
switch (pathSegments[0].toLowerCase()) {
|
|
7005
|
+
case Constants.ADFS:
|
|
7006
|
+
return AuthorityType.Adfs;
|
|
7007
|
+
case Constants.DSTS:
|
|
7008
|
+
return AuthorityType.Dsts;
|
|
7009
|
+
}
|
|
7010
|
+
}
|
|
7011
|
+
return AuthorityType.Default;
|
|
7012
|
+
};
|
|
6982
7013
|
Object.defineProperty(Authority.prototype, "authorityType", {
|
|
6983
7014
|
// See above for AuthorityType
|
|
6984
7015
|
get: function () {
|
|
6985
|
-
|
|
6986
|
-
if (this.canonicalAuthorityUrlComponents.HostNameAndPort.endsWith(Constants.CIAM_AUTH_URL)) {
|
|
6987
|
-
return AuthorityType.Ciam;
|
|
6988
|
-
}
|
|
6989
|
-
var pathSegments = this.canonicalAuthorityUrlComponents.PathSegments;
|
|
6990
|
-
if (pathSegments.length) {
|
|
6991
|
-
switch (pathSegments[0].toLowerCase()) {
|
|
6992
|
-
case Constants.ADFS:
|
|
6993
|
-
return AuthorityType.Adfs;
|
|
6994
|
-
case Constants.DSTS:
|
|
6995
|
-
return AuthorityType.Dsts;
|
|
6996
|
-
}
|
|
6997
|
-
}
|
|
6998
|
-
return AuthorityType.Default;
|
|
7016
|
+
return this.getAuthorityType(this.canonicalAuthorityUrlComponents);
|
|
6999
7017
|
},
|
|
7000
7018
|
enumerable: false,
|
|
7001
7019
|
configurable: true
|
|
@@ -7077,8 +7095,7 @@
|
|
|
7077
7095
|
*/
|
|
7078
7096
|
get: function () {
|
|
7079
7097
|
if (this.discoveryComplete()) {
|
|
7080
|
-
|
|
7081
|
-
return this.replaceTenant(endpoint);
|
|
7098
|
+
return this.replacePath(this.metadata.authorization_endpoint);
|
|
7082
7099
|
}
|
|
7083
7100
|
else {
|
|
7084
7101
|
throw ClientAuthError.createEndpointDiscoveryIncompleteError("Discovery incomplete.");
|
|
@@ -7093,8 +7110,7 @@
|
|
|
7093
7110
|
*/
|
|
7094
7111
|
get: function () {
|
|
7095
7112
|
if (this.discoveryComplete()) {
|
|
7096
|
-
|
|
7097
|
-
return this.replaceTenant(endpoint);
|
|
7113
|
+
return this.replacePath(this.metadata.token_endpoint);
|
|
7098
7114
|
}
|
|
7099
7115
|
else {
|
|
7100
7116
|
throw ClientAuthError.createEndpointDiscoveryIncompleteError("Discovery incomplete.");
|
|
@@ -7106,8 +7122,7 @@
|
|
|
7106
7122
|
Object.defineProperty(Authority.prototype, "deviceCodeEndpoint", {
|
|
7107
7123
|
get: function () {
|
|
7108
7124
|
if (this.discoveryComplete()) {
|
|
7109
|
-
|
|
7110
|
-
return this.replaceTenant(endpoint);
|
|
7125
|
+
return this.replacePath(this.metadata.token_endpoint.replace("/token", "/devicecode"));
|
|
7111
7126
|
}
|
|
7112
7127
|
else {
|
|
7113
7128
|
throw ClientAuthError.createEndpointDiscoveryIncompleteError("Discovery incomplete.");
|
|
@@ -7126,8 +7141,7 @@
|
|
|
7126
7141
|
if (!this.metadata.end_session_endpoint) {
|
|
7127
7142
|
throw ClientAuthError.createLogoutNotSupportedError();
|
|
7128
7143
|
}
|
|
7129
|
-
|
|
7130
|
-
return this.replaceTenant(endpoint);
|
|
7144
|
+
return this.replacePath(this.metadata.end_session_endpoint);
|
|
7131
7145
|
}
|
|
7132
7146
|
else {
|
|
7133
7147
|
throw ClientAuthError.createEndpointDiscoveryIncompleteError("Discovery incomplete.");
|
|
@@ -7142,8 +7156,7 @@
|
|
|
7142
7156
|
*/
|
|
7143
7157
|
get: function () {
|
|
7144
7158
|
if (this.discoveryComplete()) {
|
|
7145
|
-
|
|
7146
|
-
return this.replaceTenant(endpoint);
|
|
7159
|
+
return this.replacePath(this.metadata.issuer);
|
|
7147
7160
|
}
|
|
7148
7161
|
else {
|
|
7149
7162
|
throw ClientAuthError.createEndpointDiscoveryIncompleteError("Discovery incomplete.");
|
|
@@ -7158,8 +7171,7 @@
|
|
|
7158
7171
|
*/
|
|
7159
7172
|
get: function () {
|
|
7160
7173
|
if (this.discoveryComplete()) {
|
|
7161
|
-
|
|
7162
|
-
return this.replaceTenant(endpoint);
|
|
7174
|
+
return this.replacePath(this.metadata.jwks_uri);
|
|
7163
7175
|
}
|
|
7164
7176
|
else {
|
|
7165
7177
|
throw ClientAuthError.createEndpointDiscoveryIncompleteError("Discovery incomplete.");
|
|
@@ -7168,6 +7180,17 @@
|
|
|
7168
7180
|
enumerable: false,
|
|
7169
7181
|
configurable: true
|
|
7170
7182
|
});
|
|
7183
|
+
/**
|
|
7184
|
+
* Returns a flag indicating that tenant name can be replaced in authority {@link IUri}
|
|
7185
|
+
* @param authorityUri {@link IUri}
|
|
7186
|
+
* @private
|
|
7187
|
+
*/
|
|
7188
|
+
Authority.prototype.canReplaceTenant = function (authorityUri) {
|
|
7189
|
+
return authorityUri.PathSegments.length === 1
|
|
7190
|
+
&& !Authority.reservedTenantDomains.has(authorityUri.PathSegments[0])
|
|
7191
|
+
&& this.getAuthorityType(authorityUri) === AuthorityType.Default
|
|
7192
|
+
&& this.protocolMode === exports.ProtocolMode.AAD;
|
|
7193
|
+
};
|
|
7171
7194
|
/**
|
|
7172
7195
|
* Replaces tenant in url path with current tenant. Defaults to common.
|
|
7173
7196
|
* @param urlString
|
|
@@ -7180,17 +7203,31 @@
|
|
|
7180
7203
|
* @param urlString
|
|
7181
7204
|
*/
|
|
7182
7205
|
Authority.prototype.replacePath = function (urlString) {
|
|
7206
|
+
var _this = this;
|
|
7183
7207
|
var endpoint = urlString;
|
|
7184
7208
|
var cachedAuthorityUrl = new UrlString(this.metadata.canonical_authority);
|
|
7185
|
-
var
|
|
7209
|
+
var cachedAuthorityUrlComponents = cachedAuthorityUrl.getUrlComponents();
|
|
7210
|
+
var cachedAuthorityParts = cachedAuthorityUrlComponents.PathSegments;
|
|
7186
7211
|
var currentAuthorityParts = this.canonicalAuthorityUrlComponents.PathSegments;
|
|
7187
7212
|
currentAuthorityParts.forEach(function (currentPart, index) {
|
|
7188
7213
|
var cachedPart = cachedAuthorityParts[index];
|
|
7214
|
+
if (index === 0 && _this.canReplaceTenant(cachedAuthorityUrlComponents)) {
|
|
7215
|
+
var tenantId = (new UrlString(_this.metadata.authorization_endpoint)).getUrlComponents().PathSegments[0];
|
|
7216
|
+
/**
|
|
7217
|
+
* Check if AAD canonical authority contains tenant domain name, for example "testdomain.onmicrosoft.com",
|
|
7218
|
+
* by comparing its first path segment to the corresponding authorization endpoint path segment, which is
|
|
7219
|
+
* always resolved with tenant id by OIDC.
|
|
7220
|
+
*/
|
|
7221
|
+
if (cachedPart !== tenantId) {
|
|
7222
|
+
_this.logger.verbose("Replacing tenant domain name " + cachedPart + " with id " + tenantId);
|
|
7223
|
+
cachedPart = tenantId;
|
|
7224
|
+
}
|
|
7225
|
+
}
|
|
7189
7226
|
if (currentPart !== cachedPart) {
|
|
7190
7227
|
endpoint = endpoint.replace("/" + cachedPart + "/", "/" + currentPart + "/");
|
|
7191
7228
|
}
|
|
7192
7229
|
});
|
|
7193
|
-
return endpoint;
|
|
7230
|
+
return this.replaceTenant(endpoint);
|
|
7194
7231
|
};
|
|
7195
7232
|
Object.defineProperty(Authority.prototype, "defaultOpenIdConfigurationEndpoint", {
|
|
7196
7233
|
/**
|
|
@@ -7718,10 +7755,18 @@
|
|
|
7718
7755
|
}
|
|
7719
7756
|
return ciamAuthority;
|
|
7720
7757
|
};
|
|
7758
|
+
// Reserved tenant domain names that will not be replaced with tenant id
|
|
7759
|
+
Authority.reservedTenantDomains = (new Set([
|
|
7760
|
+
"{tenant}",
|
|
7761
|
+
"{tenantid}",
|
|
7762
|
+
AADAuthorityConstants.COMMON,
|
|
7763
|
+
AADAuthorityConstants.CONSUMERS,
|
|
7764
|
+
AADAuthorityConstants.ORGANIZATIONS
|
|
7765
|
+
]));
|
|
7721
7766
|
return Authority;
|
|
7722
7767
|
}());
|
|
7723
7768
|
|
|
7724
|
-
/*! @azure/msal-common v13.
|
|
7769
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
7725
7770
|
|
|
7726
7771
|
/*
|
|
7727
7772
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7785,7 +7830,7 @@
|
|
|
7785
7830
|
return AuthorityFactory;
|
|
7786
7831
|
}());
|
|
7787
7832
|
|
|
7788
|
-
/*! @azure/msal-common v13.
|
|
7833
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
7789
7834
|
|
|
7790
7835
|
/*
|
|
7791
7836
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7816,7 +7861,7 @@
|
|
|
7816
7861
|
return ServerTelemetryEntity;
|
|
7817
7862
|
}());
|
|
7818
7863
|
|
|
7819
|
-
/*! @azure/msal-common v13.
|
|
7864
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
7820
7865
|
|
|
7821
7866
|
/*
|
|
7822
7867
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7844,7 +7889,7 @@
|
|
|
7844
7889
|
return ThrottlingEntity;
|
|
7845
7890
|
}());
|
|
7846
7891
|
|
|
7847
|
-
/*! @azure/msal-common v13.
|
|
7892
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
7848
7893
|
|
|
7849
7894
|
/*
|
|
7850
7895
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7861,7 +7906,7 @@
|
|
|
7861
7906
|
}
|
|
7862
7907
|
};
|
|
7863
7908
|
|
|
7864
|
-
/*! @azure/msal-common v13.
|
|
7909
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
7865
7910
|
|
|
7866
7911
|
/*
|
|
7867
7912
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7906,7 +7951,7 @@
|
|
|
7906
7951
|
return JoseHeaderError;
|
|
7907
7952
|
}(AuthError));
|
|
7908
7953
|
|
|
7909
|
-
/*! @azure/msal-common v13.
|
|
7954
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
7910
7955
|
|
|
7911
7956
|
/*
|
|
7912
7957
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7946,7 +7991,7 @@
|
|
|
7946
7991
|
return JoseHeader;
|
|
7947
7992
|
}());
|
|
7948
7993
|
|
|
7949
|
-
/*! @azure/msal-common v13.
|
|
7994
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
7950
7995
|
|
|
7951
7996
|
/*
|
|
7952
7997
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8005,7 +8050,7 @@
|
|
|
8005
8050
|
return AuthenticationHeaderParser;
|
|
8006
8051
|
}());
|
|
8007
8052
|
|
|
8008
|
-
/*! @azure/msal-common v13.
|
|
8053
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
8009
8054
|
|
|
8010
8055
|
/*
|
|
8011
8056
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8167,7 +8212,7 @@
|
|
|
8167
8212
|
return ServerTelemetryManager;
|
|
8168
8213
|
}());
|
|
8169
8214
|
|
|
8170
|
-
/*! @azure/msal-common v13.
|
|
8215
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
8171
8216
|
|
|
8172
8217
|
/*
|
|
8173
8218
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8570,7 +8615,7 @@
|
|
|
8570
8615
|
return PerformanceClient;
|
|
8571
8616
|
}());
|
|
8572
8617
|
|
|
8573
|
-
/*! @azure/msal-common v13.
|
|
8618
|
+
/*! @azure/msal-common v13.1.0 2023-06-07 */
|
|
8574
8619
|
|
|
8575
8620
|
/*
|
|
8576
8621
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -10795,7 +10840,7 @@
|
|
|
10795
10840
|
|
|
10796
10841
|
/* eslint-disable header/header */
|
|
10797
10842
|
var name = "@azure/msal-browser";
|
|
10798
|
-
var version = "2.37.
|
|
10843
|
+
var version = "2.37.1";
|
|
10799
10844
|
|
|
10800
10845
|
/*
|
|
10801
10846
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -11260,7 +11305,7 @@
|
|
|
11260
11305
|
* Initializer function for all request APIs
|
|
11261
11306
|
* @param request
|
|
11262
11307
|
*/
|
|
11263
|
-
BaseInteractionClient.prototype.initializeBaseRequest = function (request) {
|
|
11308
|
+
BaseInteractionClient.prototype.initializeBaseRequest = function (request, account) {
|
|
11264
11309
|
return __awaiter$1(this, void 0, void 0, function () {
|
|
11265
11310
|
var authority, scopes, validatedRequest, _a;
|
|
11266
11311
|
return __generator$1(this, function (_b) {
|
|
@@ -11269,6 +11314,12 @@
|
|
|
11269
11314
|
this.performanceClient.addQueueMeasurement(exports.PerformanceEvents.InitializeBaseRequest, request.correlationId);
|
|
11270
11315
|
this.logger.verbose("Initializing BaseAuthRequest");
|
|
11271
11316
|
authority = request.authority || this.config.auth.authority;
|
|
11317
|
+
if (!account) return [3 /*break*/, 2];
|
|
11318
|
+
return [4 /*yield*/, this.validateRequestAuthority(authority, account)];
|
|
11319
|
+
case 1:
|
|
11320
|
+
_b.sent();
|
|
11321
|
+
_b.label = 2;
|
|
11322
|
+
case 2:
|
|
11272
11323
|
scopes = __spread(((request && request.scopes) || []));
|
|
11273
11324
|
validatedRequest = __assign$1(__assign$1({}, request), { correlationId: this.correlationId, authority: authority,
|
|
11274
11325
|
scopes: scopes });
|
|
@@ -11288,13 +11339,13 @@
|
|
|
11288
11339
|
}
|
|
11289
11340
|
this.logger.verbose("Authentication Scheme set to \"" + validatedRequest.authenticationScheme + "\" as configured in Auth request");
|
|
11290
11341
|
}
|
|
11291
|
-
if (!(request.claims && !StringUtils.isEmpty(request.claims))) return [3 /*break*/,
|
|
11342
|
+
if (!(request.claims && !StringUtils.isEmpty(request.claims))) return [3 /*break*/, 4];
|
|
11292
11343
|
_a = validatedRequest;
|
|
11293
11344
|
return [4 /*yield*/, this.browserCrypto.hashString(request.claims)];
|
|
11294
|
-
case
|
|
11345
|
+
case 3:
|
|
11295
11346
|
_a.requestedClaimsHash = _b.sent();
|
|
11296
|
-
_b.label =
|
|
11297
|
-
case
|
|
11347
|
+
_b.label = 4;
|
|
11348
|
+
case 4: return [2 /*return*/, validatedRequest];
|
|
11298
11349
|
}
|
|
11299
11350
|
});
|
|
11300
11351
|
});
|
|
@@ -11311,6 +11362,26 @@
|
|
|
11311
11362
|
var redirectUri = requestRedirectUri || this.config.auth.redirectUri || BrowserUtils.getCurrentUri();
|
|
11312
11363
|
return UrlString.getAbsoluteUrl(redirectUri, BrowserUtils.getCurrentUri());
|
|
11313
11364
|
};
|
|
11365
|
+
/*
|
|
11366
|
+
* If authority provided in the request does not match environment/authority specified
|
|
11367
|
+
* in the account or MSAL config, we throw an error.
|
|
11368
|
+
*/
|
|
11369
|
+
BaseInteractionClient.prototype.validateRequestAuthority = function (authority, account) {
|
|
11370
|
+
return __awaiter$1(this, void 0, void 0, function () {
|
|
11371
|
+
var discoveredAuthority;
|
|
11372
|
+
return __generator$1(this, function (_a) {
|
|
11373
|
+
switch (_a.label) {
|
|
11374
|
+
case 0: return [4 /*yield*/, this.getDiscoveredAuthority(authority)];
|
|
11375
|
+
case 1:
|
|
11376
|
+
discoveredAuthority = _a.sent();
|
|
11377
|
+
if (!discoveredAuthority.isAlias(account.environment)) {
|
|
11378
|
+
throw ClientConfigurationError.createAuthorityMismatchError();
|
|
11379
|
+
}
|
|
11380
|
+
return [2 /*return*/];
|
|
11381
|
+
}
|
|
11382
|
+
});
|
|
11383
|
+
});
|
|
11384
|
+
};
|
|
11314
11385
|
/**
|
|
11315
11386
|
*
|
|
11316
11387
|
* @param apiId
|
|
@@ -11975,6 +12046,7 @@
|
|
|
11975
12046
|
EventType["LOGOUT_SUCCESS"] = "msal:logoutSuccess";
|
|
11976
12047
|
EventType["LOGOUT_FAILURE"] = "msal:logoutFailure";
|
|
11977
12048
|
EventType["LOGOUT_END"] = "msal:logoutEnd";
|
|
12049
|
+
EventType["RESTORE_FROM_BFCACHE"] = "msal:restoreFromBFCache";
|
|
11978
12050
|
})(exports.EventType || (exports.EventType = {}));
|
|
11979
12051
|
|
|
11980
12052
|
/*
|
|
@@ -12155,7 +12227,7 @@
|
|
|
12155
12227
|
this.performanceClient.addQueueMeasurement(exports.PerformanceEvents.InitializeSilentRequest, this.correlationId);
|
|
12156
12228
|
this.performanceClient.setPreQueueTime(exports.PerformanceEvents.InitializeBaseRequest, this.correlationId);
|
|
12157
12229
|
_a = [__assign$1({}, request)];
|
|
12158
|
-
return [4 /*yield*/, this.initializeBaseRequest(request)];
|
|
12230
|
+
return [4 /*yield*/, this.initializeBaseRequest(request, account)];
|
|
12159
12231
|
case 1: return [2 /*return*/, __assign$1.apply(void 0, [__assign$1.apply(void 0, _a.concat([_b.sent()])), { account: account, forceRefresh: request.forceRefresh || false }])];
|
|
12160
12232
|
}
|
|
12161
12233
|
});
|
|
@@ -12429,7 +12501,7 @@
|
|
|
12429
12501
|
result = _a.sent();
|
|
12430
12502
|
// cache accounts and tokens in the appropriate storage
|
|
12431
12503
|
this.cacheAccount(accountEntity);
|
|
12432
|
-
this.cacheNativeTokens(response, request, homeAccountIdentifier, idTokenObj, result.accessToken, result.tenantId, reqTimestamp);
|
|
12504
|
+
this.cacheNativeTokens(response, request, homeAccountIdentifier, accountEntity, idTokenObj, result.accessToken, result.tenantId, reqTimestamp);
|
|
12433
12505
|
return [2 /*return*/, result];
|
|
12434
12506
|
}
|
|
12435
12507
|
});
|
|
@@ -12585,10 +12657,8 @@
|
|
|
12585
12657
|
* @param tenantId
|
|
12586
12658
|
* @param reqTimestamp
|
|
12587
12659
|
*/
|
|
12588
|
-
NativeInteractionClient.prototype.cacheNativeTokens = function (response, request, homeAccountIdentifier, idTokenObj, responseAccessToken, tenantId, reqTimestamp) {
|
|
12589
|
-
|
|
12590
|
-
var idTokenEntity = IdTokenEntity.createIdTokenEntity(homeAccountIdentifier, request.authority, response.id_token || Constants.EMPTY_STRING, request.clientId, idTokenObj.claims.tid || Constants.EMPTY_STRING);
|
|
12591
|
-
this.nativeStorageManager.setIdTokenCredential(idTokenEntity);
|
|
12660
|
+
NativeInteractionClient.prototype.cacheNativeTokens = function (response, request, homeAccountIdentifier, accountEntity, idTokenObj, responseAccessToken, tenantId, reqTimestamp) {
|
|
12661
|
+
var cachedIdToken = IdTokenEntity.createIdTokenEntity(homeAccountIdentifier, request.authority, response.id_token || Constants.EMPTY_STRING, request.clientId, idTokenObj.claims.tid || Constants.EMPTY_STRING);
|
|
12592
12662
|
// cache accessToken in inmemory storage
|
|
12593
12663
|
var expiresIn = (request.tokenType === exports.AuthenticationScheme.POP)
|
|
12594
12664
|
? Constants.SHR_NONCE_VALIDITY
|
|
@@ -12597,8 +12667,11 @@
|
|
|
12597
12667
|
: response.expires_in) || 0;
|
|
12598
12668
|
var tokenExpirationSeconds = reqTimestamp + expiresIn;
|
|
12599
12669
|
var responseScopes = this.generateScopes(response, request);
|
|
12600
|
-
var
|
|
12601
|
-
|
|
12670
|
+
var cachedAccessToken = AccessTokenEntity.createAccessTokenEntity(homeAccountIdentifier, request.authority, responseAccessToken, request.clientId, idTokenObj
|
|
12671
|
+
? idTokenObj.claims.tid || Constants.EMPTY_STRING
|
|
12672
|
+
: tenantId, responseScopes.printScopes(), tokenExpirationSeconds, 0, this.browserCrypto);
|
|
12673
|
+
var nativeCacheRecord = new CacheRecord(accountEntity, cachedIdToken, cachedAccessToken);
|
|
12674
|
+
this.nativeStorageManager.saveCacheRecord(nativeCacheRecord);
|
|
12602
12675
|
};
|
|
12603
12676
|
NativeInteractionClient.prototype.addTelemetryFromNativeResponse = function (response) {
|
|
12604
12677
|
var mats = this.getMATSFromResponse(response);
|
|
@@ -12682,6 +12755,12 @@
|
|
|
12682
12755
|
case 0:
|
|
12683
12756
|
this.logger.trace("NativeInteractionClient - initializeNativeRequest called");
|
|
12684
12757
|
authority = request.authority || this.config.auth.authority;
|
|
12758
|
+
if (!request.account) return [3 /*break*/, 2];
|
|
12759
|
+
return [4 /*yield*/, this.validateRequestAuthority(authority, request.account)];
|
|
12760
|
+
case 1:
|
|
12761
|
+
_a.sent();
|
|
12762
|
+
_a.label = 2;
|
|
12763
|
+
case 2:
|
|
12685
12764
|
canonicalAuthority = new UrlString(authority);
|
|
12686
12765
|
canonicalAuthority.validateAsUri();
|
|
12687
12766
|
scopes = request.scopes, remainingProperties = __rest(request, ["scopes"]);
|
|
@@ -12714,7 +12793,7 @@
|
|
|
12714
12793
|
};
|
|
12715
12794
|
validatedRequest = __assign$1(__assign$1({}, remainingProperties), { accountId: this.accountId, clientId: this.config.auth.clientId, authority: canonicalAuthority.urlString, scope: scopeSet.printScopes(), redirectUri: this.getRedirectUri(request.redirectUri), prompt: getPrompt(), correlationId: this.correlationId, tokenType: request.authenticationScheme, windowTitleSubstring: document.title, extraParameters: __assign$1(__assign$1(__assign$1({}, request.extraQueryParameters), request.tokenQueryParameters), { telemetry: NativeConstants.MATS_TELEMETRY }), extendedExpiryToken: false // Make this configurable?
|
|
12716
12795
|
});
|
|
12717
|
-
if (!(request.authenticationScheme === exports.AuthenticationScheme.POP)) return [3 /*break*/,
|
|
12796
|
+
if (!(request.authenticationScheme === exports.AuthenticationScheme.POP)) return [3 /*break*/, 4];
|
|
12718
12797
|
shrParameters = {
|
|
12719
12798
|
resourceRequestUri: request.resourceRequestUri,
|
|
12720
12799
|
resourceRequestMethod: request.resourceRequestMethod,
|
|
@@ -12723,13 +12802,13 @@
|
|
|
12723
12802
|
};
|
|
12724
12803
|
popTokenGenerator = new PopTokenGenerator(this.browserCrypto);
|
|
12725
12804
|
return [4 /*yield*/, popTokenGenerator.generateCnf(shrParameters)];
|
|
12726
|
-
case
|
|
12805
|
+
case 3:
|
|
12727
12806
|
reqCnfData = _a.sent();
|
|
12728
|
-
// to reduce the URL length, it is recommended to send the
|
|
12729
|
-
validatedRequest.reqCnf = reqCnfData.
|
|
12807
|
+
// to reduce the URL length, it is recommended to send the short form of the req_cnf
|
|
12808
|
+
validatedRequest.reqCnf = reqCnfData.reqCnfString;
|
|
12730
12809
|
validatedRequest.keyId = reqCnfData.kid;
|
|
12731
|
-
_a.label =
|
|
12732
|
-
case
|
|
12810
|
+
_a.label = 4;
|
|
12811
|
+
case 4: return [2 /*return*/, validatedRequest];
|
|
12733
12812
|
}
|
|
12734
12813
|
});
|
|
12735
12814
|
});
|
|
@@ -13031,6 +13110,7 @@
|
|
|
13031
13110
|
if (event.persisted) {
|
|
13032
13111
|
_this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache.");
|
|
13033
13112
|
_this.browserStorage.cleanRequestByState(validRequest.state);
|
|
13113
|
+
_this.eventHandler.emitEvent(exports.EventType.RESTORE_FROM_BFCACHE, exports.InteractionType.Redirect);
|
|
13034
13114
|
}
|
|
13035
13115
|
};
|
|
13036
13116
|
_a.label = 2;
|
|
@@ -13222,7 +13302,7 @@
|
|
|
13222
13302
|
if (!this.nativeMessageHandler) {
|
|
13223
13303
|
throw BrowserAuthError.createNativeConnectionNotEstablishedError();
|
|
13224
13304
|
}
|
|
13225
|
-
nativeInteractionClient = new NativeInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, exports.ApiId.acquireTokenPopup, this.performanceClient, this.nativeMessageHandler, serverParams.accountId, this.
|
|
13305
|
+
nativeInteractionClient = new NativeInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, exports.ApiId.acquireTokenPopup, this.performanceClient, this.nativeMessageHandler, serverParams.accountId, this.nativeStorage, cachedRequest.correlationId);
|
|
13226
13306
|
userRequestState = ProtocolUtils.parseRequestState(this.browserCrypto, state).userRequestState;
|
|
13227
13307
|
return [2 /*return*/, nativeInteractionClient.acquireToken(__assign$1(__assign$1({}, cachedRequest), { state: userRequestState, prompt: undefined // Server should handle the prompt, ideally native broker can do this part silently
|
|
13228
13308
|
})).finally(function () {
|
|
@@ -14276,7 +14356,7 @@
|
|
|
14276
14356
|
this.performanceClient.addQueueMeasurement(exports.PerformanceEvents.SilentRefreshClientAcquireToken, request.correlationId);
|
|
14277
14357
|
this.performanceClient.setPreQueueTime(exports.PerformanceEvents.InitializeBaseRequest, request.correlationId);
|
|
14278
14358
|
_a = [__assign$1({}, request)];
|
|
14279
|
-
return [4 /*yield*/, this.initializeBaseRequest(request)];
|
|
14359
|
+
return [4 /*yield*/, this.initializeBaseRequest(request, request.account)];
|
|
14280
14360
|
case 1:
|
|
14281
14361
|
silentRequest = __assign$1.apply(void 0, _a.concat([_b.sent()]));
|
|
14282
14362
|
acquireTokenMeasurement = this.performanceClient.startMeasurement(exports.PerformanceEvents.SilentRefreshClientAcquireToken, silentRequest.correlationId);
|
|
@@ -17976,6 +18056,7 @@
|
|
|
17976
18056
|
case exports.EventType.LOGIN_FAILURE:
|
|
17977
18057
|
case exports.EventType.ACQUIRE_TOKEN_SUCCESS:
|
|
17978
18058
|
case exports.EventType.ACQUIRE_TOKEN_FAILURE:
|
|
18059
|
+
case exports.EventType.RESTORE_FROM_BFCACHE:
|
|
17979
18060
|
if (message.interactionType === exports.InteractionType.Redirect || message.interactionType === exports.InteractionType.Popup) {
|
|
17980
18061
|
if (currentStatus && currentStatus !== exports.InteractionStatus.Login && currentStatus !== exports.InteractionStatus.AcquireToken) {
|
|
17981
18062
|
// Prevent this event from clearing any status other than login or acquireToken
|