@azure/msal-node 6.0.1 → 7.0.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/dist/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/NodeStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/cache/distributed/DistributedCachePlugin.mjs +1 -1
- package/dist/cache/serializer/Deserializer.mjs +1 -1
- package/dist/cache/serializer/Serializer.mjs +1 -1
- package/dist/client/BaseClient.mjs +1 -1
- package/dist/client/ClientApplication.mjs +18 -3
- package/dist/client/ClientApplication.mjs.map +1 -1
- package/dist/client/ClientAssertion.mjs +1 -1
- package/dist/client/ClientCredentialClient.mjs +1 -1
- package/dist/client/ConfidentialClientApplication.mjs +1 -1
- package/dist/client/DeviceCodeClient.mjs +1 -1
- package/dist/client/ManagedIdentityApplication.mjs +1 -1
- package/dist/client/ManagedIdentityClient.mjs +1 -1
- package/dist/client/ManagedIdentitySources/AppService.mjs +1 -1
- package/dist/client/ManagedIdentitySources/AzureArc.mjs +1 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +1 -1
- package/dist/client/ManagedIdentitySources/CloudShell.mjs +1 -1
- package/dist/client/ManagedIdentitySources/Imds.mjs +1 -1
- package/dist/client/ManagedIdentitySources/MachineLearning.mjs +1 -1
- package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +1 -1
- package/dist/client/OnBehalfOfClient.mjs +1 -1
- package/dist/client/PublicClientApplication.mjs +13 -9
- package/dist/client/PublicClientApplication.mjs.map +1 -1
- package/dist/client/SilentRequestCoalescer.mjs +125 -0
- package/dist/client/SilentRequestCoalescer.mjs.map +1 -0
- package/dist/client/UserFederatedIdentityCredentialClient.mjs +1 -1
- package/dist/client/UsernamePasswordClient.mjs +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/config/ManagedIdentityId.mjs +1 -1
- package/dist/config/ManagedIdentityRequestParameters.mjs +1 -1
- package/dist/crypto/CryptoProvider.mjs +1 -1
- package/dist/crypto/GuidGenerator.mjs +1 -1
- package/dist/crypto/HashUtils.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/error/ClientAuthErrorCodes.mjs +1 -1
- package/dist/error/ManagedIdentityError.mjs +1 -1
- package/dist/error/ManagedIdentityErrorCodes.mjs +1 -1
- package/dist/error/NodeAuthError.mjs +11 -1
- package/dist/error/NodeAuthError.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internals.mjs +1 -1
- package/dist/network/HttpClient.mjs +1 -1
- package/dist/network/HttpClientWithRetries.mjs +1 -1
- package/dist/network/LoopbackClient.mjs +9 -14
- package/dist/network/LoopbackClient.mjs.map +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/protocol/Authorize.mjs +1 -1
- package/dist/retry/DefaultManagedIdentityRetryPolicy.mjs +1 -1
- package/dist/retry/ExponentialRetryStrategy.mjs +1 -1
- package/dist/retry/ImdsRetryPolicy.mjs +1 -1
- package/dist/retry/LinearRetryStrategy.mjs +1 -1
- package/dist/utils/Constants.mjs +1 -1
- package/dist/utils/EncodingUtils.mjs +1 -1
- package/dist/utils/TimeUtils.mjs +1 -1
- package/lib/msal-node.cjs +233 -92
- package/lib/msal-node.cjs.map +1 -1
- package/package.json +3 -3
- package/src/client/ClientApplication.ts +40 -1
- package/src/client/PublicClientApplication.ts +26 -9
- package/src/client/SilentRequestCoalescer.ts +197 -0
- package/src/error/NodeAuthError.ts +15 -0
- package/src/network/LoopbackClient.ts +12 -15
- package/src/packageMetadata.ts +1 -1
- package/src/request/InteractiveRequest.ts +4 -1
- package/types/client/ClientApplication.d.ts +2 -0
- package/types/client/ClientApplication.d.ts.map +1 -1
- package/types/client/PublicClientApplication.d.ts.map +1 -1
- package/types/client/SilentRequestCoalescer.d.ts +26 -0
- package/types/client/SilentRequestCoalescer.d.ts.map +1 -0
- package/types/error/NodeAuthError.d.ts +8 -0
- package/types/error/NodeAuthError.d.ts.map +1 -1
- package/types/network/LoopbackClient.d.ts.map +1 -1
- package/types/packageMetadata.d.ts +1 -1
- package/types/request/InteractiveRequest.d.ts +1 -1
- package/types/request/InteractiveRequest.d.ts.map +1 -1
package/lib/msal-node.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node
|
|
1
|
+
/*! @azure/msal-node v7.0.1 2026-10-02 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -151,7 +151,7 @@ class Serializer {
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
/*! @azure/msal-common v16.14.
|
|
154
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
155
155
|
/*
|
|
156
156
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
157
157
|
* Licensed under the MIT License.
|
|
@@ -209,7 +209,7 @@ const USER_ID = "user_id";
|
|
|
209
209
|
const FMI_PATH = "fmi_path";
|
|
210
210
|
const ATTRIBUTE_TOKENS = "attribute_tokens";
|
|
211
211
|
|
|
212
|
-
/*! @azure/msal-common v16.14.
|
|
212
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
213
213
|
/*
|
|
214
214
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
215
215
|
* Licensed under the MIT License.
|
|
@@ -251,7 +251,6 @@ const KNOWN_PUBLIC_CLOUDS = [
|
|
|
251
251
|
];
|
|
252
252
|
const INVALID_INSTANCE = "invalid_instance";
|
|
253
253
|
const HTTP_SUCCESS = 200;
|
|
254
|
-
const HTTP_REDIRECT = 302;
|
|
255
254
|
const HTTP_CLIENT_ERROR_RANGE_START = 400;
|
|
256
255
|
const HTTP_BAD_REQUEST = 400;
|
|
257
256
|
const HTTP_UNAUTHORIZED = 401;
|
|
@@ -468,7 +467,7 @@ const EncodingTypes = {
|
|
|
468
467
|
UTF8: "utf-8",
|
|
469
468
|
};
|
|
470
469
|
|
|
471
|
-
/*! @azure/msal-common v16.14.
|
|
470
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
472
471
|
/*
|
|
473
472
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
474
473
|
* Licensed under the MIT License.
|
|
@@ -497,7 +496,7 @@ function createAuthError(code, correlationId, additionalMessage) {
|
|
|
497
496
|
return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage(code));
|
|
498
497
|
}
|
|
499
498
|
|
|
500
|
-
/*! @azure/msal-common v16.14.
|
|
499
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
501
500
|
|
|
502
501
|
/*
|
|
503
502
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -520,7 +519,7 @@ function createClientAuthError(errorCode, correlationId, additionalMessage) {
|
|
|
520
519
|
return new ClientAuthError(errorCode, correlationId, additionalMessage);
|
|
521
520
|
}
|
|
522
521
|
|
|
523
|
-
/*! @azure/msal-common v16.14.
|
|
522
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
524
523
|
/*
|
|
525
524
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
526
525
|
* Licensed under the MIT License.
|
|
@@ -606,7 +605,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
606
605
|
userCanceled: userCanceled
|
|
607
606
|
});
|
|
608
607
|
|
|
609
|
-
/*! @azure/msal-common v16.14.
|
|
608
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
610
609
|
|
|
611
610
|
/*
|
|
612
611
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -644,7 +643,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
|
|
|
644
643
|
};
|
|
645
644
|
}
|
|
646
645
|
|
|
647
|
-
/*! @azure/msal-common v16.14.
|
|
646
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
648
647
|
|
|
649
648
|
/*
|
|
650
649
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -710,7 +709,7 @@ function getJWSPayload(authToken, correlationId) {
|
|
|
710
709
|
return matches[2];
|
|
711
710
|
}
|
|
712
711
|
|
|
713
|
-
/*! @azure/msal-common v16.14.
|
|
712
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
714
713
|
|
|
715
714
|
/*
|
|
716
715
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -798,7 +797,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
|
|
|
798
797
|
return updatedAccountInfo;
|
|
799
798
|
}
|
|
800
799
|
|
|
801
|
-
/*! @azure/msal-common v16.14.
|
|
800
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
802
801
|
/*
|
|
803
802
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
804
803
|
* Licensed under the MIT License.
|
|
@@ -812,7 +811,7 @@ const AuthorityType = {
|
|
|
812
811
|
Ciam: 3,
|
|
813
812
|
};
|
|
814
813
|
|
|
815
|
-
/*! @azure/msal-common v16.14.
|
|
814
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
816
815
|
/*
|
|
817
816
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
818
817
|
* Licensed under the MIT License.
|
|
@@ -834,7 +833,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
|
|
|
834
833
|
return null;
|
|
835
834
|
}
|
|
836
835
|
|
|
837
|
-
/*! @azure/msal-common v16.14.
|
|
836
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
838
837
|
/*
|
|
839
838
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
840
839
|
* Licensed under the MIT License.
|
|
@@ -858,7 +857,7 @@ const ProtocolMode = {
|
|
|
858
857
|
EAR: "EAR",
|
|
859
858
|
};
|
|
860
859
|
|
|
861
|
-
/*! @azure/msal-common v16.14.
|
|
860
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
862
861
|
/**
|
|
863
862
|
* Returns the AccountInfo interface for this account.
|
|
864
863
|
* @internal
|
|
@@ -1007,7 +1006,7 @@ function isAccountEntity(entity) {
|
|
|
1007
1006
|
entity.hasOwnProperty("authorityType"));
|
|
1008
1007
|
}
|
|
1009
1008
|
|
|
1010
|
-
/*! @azure/msal-common v16.14.
|
|
1009
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
1011
1010
|
/*
|
|
1012
1011
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1013
1012
|
* Licensed under the MIT License.
|
|
@@ -1024,7 +1023,7 @@ var AuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
1024
1023
|
unexpectedError: unexpectedError
|
|
1025
1024
|
});
|
|
1026
1025
|
|
|
1027
|
-
/*! @azure/msal-common v16.14.
|
|
1026
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
1028
1027
|
|
|
1029
1028
|
/*
|
|
1030
1029
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1044,7 +1043,7 @@ function createClientConfigurationError(errorCode, correlationId) {
|
|
|
1044
1043
|
return new ClientConfigurationError(errorCode, correlationId);
|
|
1045
1044
|
}
|
|
1046
1045
|
|
|
1047
|
-
/*! @azure/msal-common v16.14.
|
|
1046
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
1048
1047
|
/*
|
|
1049
1048
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1050
1049
|
* Licensed under the MIT License.
|
|
@@ -1114,7 +1113,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
1114
1113
|
urlParseError: urlParseError
|
|
1115
1114
|
});
|
|
1116
1115
|
|
|
1117
|
-
/*! @azure/msal-common v16.14.
|
|
1116
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
1118
1117
|
/*
|
|
1119
1118
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1120
1119
|
* Licensed under the MIT License.
|
|
@@ -1126,7 +1125,7 @@ function isOpenIdConfigResponse(response) {
|
|
|
1126
1125
|
response.hasOwnProperty("jwks_uri"));
|
|
1127
1126
|
}
|
|
1128
1127
|
|
|
1129
|
-
/*! @azure/msal-common v16.14.
|
|
1128
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
1130
1129
|
/*
|
|
1131
1130
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1132
1131
|
* Licensed under the MIT License.
|
|
@@ -1206,7 +1205,7 @@ class StringUtils {
|
|
|
1206
1205
|
}
|
|
1207
1206
|
}
|
|
1208
1207
|
|
|
1209
|
-
/*! @azure/msal-common v16.14.
|
|
1208
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
1210
1209
|
|
|
1211
1210
|
/*
|
|
1212
1211
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1364,7 +1363,7 @@ class UrlString {
|
|
|
1364
1363
|
}
|
|
1365
1364
|
}
|
|
1366
1365
|
|
|
1367
|
-
/*! @azure/msal-common v16.14.
|
|
1366
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
1368
1367
|
|
|
1369
1368
|
/*
|
|
1370
1369
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1518,7 +1517,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
1518
1517
|
return null;
|
|
1519
1518
|
}
|
|
1520
1519
|
|
|
1521
|
-
/*! @azure/msal-common v16.14.
|
|
1520
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
1522
1521
|
/*
|
|
1523
1522
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1524
1523
|
* Licensed under the MIT License.
|
|
@@ -1536,7 +1535,7 @@ const AzureCloudInstance = {
|
|
|
1536
1535
|
AzureUsGovernment: "https://login.microsoftonline.us",
|
|
1537
1536
|
};
|
|
1538
1537
|
|
|
1539
|
-
/*! @azure/msal-common v16.14.
|
|
1538
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
1540
1539
|
/*
|
|
1541
1540
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1542
1541
|
* Licensed under the MIT License.
|
|
@@ -1546,7 +1545,7 @@ function isCloudInstanceDiscoveryResponse(response) {
|
|
|
1546
1545
|
response.hasOwnProperty("metadata"));
|
|
1547
1546
|
}
|
|
1548
1547
|
|
|
1549
|
-
/*! @azure/msal-common v16.14.
|
|
1548
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
1550
1549
|
/*
|
|
1551
1550
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1552
1551
|
* Licensed under the MIT License.
|
|
@@ -1556,7 +1555,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
|
|
|
1556
1555
|
response.hasOwnProperty("error_description"));
|
|
1557
1556
|
}
|
|
1558
1557
|
|
|
1559
|
-
/*! @azure/msal-common v16.14.
|
|
1558
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
1560
1559
|
/*
|
|
1561
1560
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1562
1561
|
* Licensed under the MIT License.
|
|
@@ -1618,7 +1617,7 @@ const RegionDiscoveryGetCurrentVersion = "regionDiscoveryGetCurrentVersion";
|
|
|
1618
1617
|
*/
|
|
1619
1618
|
const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
|
|
1620
1619
|
|
|
1621
|
-
/*! @azure/msal-common v16.14.
|
|
1620
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
1622
1621
|
/*
|
|
1623
1622
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1624
1623
|
* Licensed under the MIT License.
|
|
@@ -1711,7 +1710,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
|
|
|
1711
1710
|
};
|
|
1712
1711
|
};
|
|
1713
1712
|
|
|
1714
|
-
/*! @azure/msal-common v16.14.
|
|
1713
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
1715
1714
|
|
|
1716
1715
|
/*
|
|
1717
1716
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1822,7 +1821,7 @@ RegionDiscovery.IMDS_OPTIONS = {
|
|
|
1822
1821
|
},
|
|
1823
1822
|
};
|
|
1824
1823
|
|
|
1825
|
-
/*! @azure/msal-common v16.14.
|
|
1824
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
1826
1825
|
/*
|
|
1827
1826
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1828
1827
|
* Licensed under the MIT License.
|
|
@@ -1877,7 +1876,7 @@ function delay(t, value) {
|
|
|
1877
1876
|
return new Promise((resolve) => setTimeout(() => resolve(value), t));
|
|
1878
1877
|
}
|
|
1879
1878
|
|
|
1880
|
-
/*! @azure/msal-common v16.14.
|
|
1879
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
1881
1880
|
|
|
1882
1881
|
/*
|
|
1883
1882
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2164,7 +2163,7 @@ function serializeAttributeTokens(attributeTokens) {
|
|
|
2164
2163
|
return [...attributeTokens].sort().join(" ");
|
|
2165
2164
|
}
|
|
2166
2165
|
|
|
2167
|
-
/*! @azure/msal-common v16.14.
|
|
2166
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
2168
2167
|
|
|
2169
2168
|
/*
|
|
2170
2169
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3132,7 +3131,7 @@ function buildStaticAuthorityOptions(authOptions) {
|
|
|
3132
3131
|
};
|
|
3133
3132
|
}
|
|
3134
3133
|
|
|
3135
|
-
/*! @azure/msal-common v16.14.
|
|
3134
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
3136
3135
|
|
|
3137
3136
|
/*
|
|
3138
3137
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3166,7 +3165,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
|
|
|
3166
3165
|
}
|
|
3167
3166
|
}
|
|
3168
3167
|
|
|
3169
|
-
/*! @azure/msal-common v16.14.
|
|
3168
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
3170
3169
|
|
|
3171
3170
|
/*
|
|
3172
3171
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3362,7 +3361,7 @@ class ScopeSet {
|
|
|
3362
3361
|
}
|
|
3363
3362
|
}
|
|
3364
3363
|
|
|
3365
|
-
/*! @azure/msal-common v16.14.
|
|
3364
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
3366
3365
|
|
|
3367
3366
|
/*
|
|
3368
3367
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3866,7 +3865,7 @@ function addAttributeTokens(parameters, attributeTokens) {
|
|
|
3866
3865
|
}
|
|
3867
3866
|
}
|
|
3868
3867
|
|
|
3869
|
-
/*! @azure/msal-common v16.14.
|
|
3868
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
3870
3869
|
|
|
3871
3870
|
/*
|
|
3872
3871
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3924,7 +3923,7 @@ function mapToQueryString(parameters) {
|
|
|
3924
3923
|
return queryParameterArray.join("&");
|
|
3925
3924
|
}
|
|
3926
3925
|
|
|
3927
|
-
/*! @azure/msal-common v16.14.
|
|
3926
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
3928
3927
|
|
|
3929
3928
|
/*
|
|
3930
3929
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3972,7 +3971,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
3972
3971
|
},
|
|
3973
3972
|
};
|
|
3974
3973
|
|
|
3975
|
-
/*! @azure/msal-common v16.14.
|
|
3974
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
3976
3975
|
|
|
3977
3976
|
/*
|
|
3978
3977
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3995,7 +3994,7 @@ const DEFAULT_TOKEN_BINDING_KEY_MANAGER = {
|
|
|
3995
3994
|
},
|
|
3996
3995
|
};
|
|
3997
3996
|
|
|
3998
|
-
/*! @azure/msal-common v16.14.
|
|
3997
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
3999
3998
|
/*
|
|
4000
3999
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4001
4000
|
* Licensed under the MIT License.
|
|
@@ -4270,12 +4269,12 @@ class Logger {
|
|
|
4270
4269
|
}
|
|
4271
4270
|
}
|
|
4272
4271
|
|
|
4273
|
-
/*! @azure/msal-common v16.14.
|
|
4272
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
4274
4273
|
/* eslint-disable header/header */
|
|
4275
4274
|
const name$1 = "@azure/msal-common";
|
|
4276
|
-
const version$1 = "16.14.
|
|
4275
|
+
const version$1 = "16.14.2";
|
|
4277
4276
|
|
|
4278
|
-
/*! @azure/msal-common v16.14.
|
|
4277
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
4279
4278
|
/*
|
|
4280
4279
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4281
4280
|
* Licensed under the MIT License.
|
|
@@ -4283,7 +4282,7 @@ const version$1 = "16.14.1";
|
|
|
4283
4282
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
4284
4283
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
4285
4284
|
|
|
4286
|
-
/*! @azure/msal-common v16.14.
|
|
4285
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
4287
4286
|
|
|
4288
4287
|
/*
|
|
4289
4288
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4321,7 +4320,7 @@ function createCacheError(e) {
|
|
|
4321
4320
|
}
|
|
4322
4321
|
}
|
|
4323
4322
|
|
|
4324
|
-
/*! @azure/msal-common v16.14.
|
|
4323
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
4325
4324
|
|
|
4326
4325
|
/*
|
|
4327
4326
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5508,7 +5507,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
5508
5507
|
}
|
|
5509
5508
|
}
|
|
5510
5509
|
|
|
5511
|
-
/*! @azure/msal-common v16.14.
|
|
5510
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
5512
5511
|
/*
|
|
5513
5512
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5514
5513
|
* Licensed under the MIT License.
|
|
@@ -5522,7 +5521,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
5522
5521
|
const PerformanceEventStatus = {
|
|
5523
5522
|
InProgress: 1};
|
|
5524
5523
|
|
|
5525
|
-
/*! @azure/msal-common v16.14.
|
|
5524
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
5526
5525
|
|
|
5527
5526
|
/*
|
|
5528
5527
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5580,7 +5579,7 @@ class StubPerformanceClient {
|
|
|
5580
5579
|
}
|
|
5581
5580
|
}
|
|
5582
5581
|
|
|
5583
|
-
/*! @azure/msal-common v16.14.
|
|
5582
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
5584
5583
|
|
|
5585
5584
|
/*
|
|
5586
5585
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5678,7 +5677,7 @@ function isOidcProtocolMode(config) {
|
|
|
5678
5677
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
5679
5678
|
}
|
|
5680
5679
|
|
|
5681
|
-
/*! @azure/msal-common v16.14.
|
|
5680
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
5682
5681
|
/*
|
|
5683
5682
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5684
5683
|
* Licensed under the MIT License.
|
|
@@ -5705,7 +5704,7 @@ function isOidcProtocolMode(config) {
|
|
|
5705
5704
|
}
|
|
5706
5705
|
}
|
|
5707
5706
|
|
|
5708
|
-
/*! @azure/msal-common v16.14.
|
|
5707
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
5709
5708
|
|
|
5710
5709
|
/*
|
|
5711
5710
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5726,7 +5725,7 @@ function createJoseHeaderError(code, correlationId) {
|
|
|
5726
5725
|
return new JoseHeaderError(code, correlationId);
|
|
5727
5726
|
}
|
|
5728
5727
|
|
|
5729
|
-
/*! @azure/msal-common v16.14.
|
|
5728
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
5730
5729
|
/*
|
|
5731
5730
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5732
5731
|
* Licensed under the MIT License.
|
|
@@ -5751,7 +5750,7 @@ function isPlainObject(value) {
|
|
|
5751
5750
|
return Object.getPrototypeOf(value) === proto;
|
|
5752
5751
|
}
|
|
5753
5752
|
|
|
5754
|
-
/*! @azure/msal-common v16.14.
|
|
5753
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
5755
5754
|
/*
|
|
5756
5755
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5757
5756
|
* Licensed under the MIT License.
|
|
@@ -5761,7 +5760,7 @@ const missingAlgError = "missing_alg_error";
|
|
|
5761
5760
|
const missingJwkError = "missing_jwk_error";
|
|
5762
5761
|
const invalidJwkError = "invalid_jwk_error";
|
|
5763
5762
|
|
|
5764
|
-
/*! @azure/msal-common v16.14.
|
|
5763
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
5765
5764
|
|
|
5766
5765
|
/*
|
|
5767
5766
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5827,7 +5826,7 @@ class JoseHeader {
|
|
|
5827
5826
|
}
|
|
5828
5827
|
}
|
|
5829
5828
|
|
|
5830
|
-
/*! @azure/msal-common v16.14.
|
|
5829
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
5831
5830
|
|
|
5832
5831
|
/*
|
|
5833
5832
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5928,7 +5927,7 @@ class PopTokenGenerator {
|
|
|
5928
5927
|
}
|
|
5929
5928
|
}
|
|
5930
5929
|
|
|
5931
|
-
/*! @azure/msal-common v16.14.
|
|
5930
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
5932
5931
|
|
|
5933
5932
|
/*
|
|
5934
5933
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6073,7 +6072,7 @@ class DpopProofGenerator {
|
|
|
6073
6072
|
}
|
|
6074
6073
|
}
|
|
6075
6074
|
|
|
6076
|
-
/*! @azure/msal-common v16.14.
|
|
6075
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
6077
6076
|
/*
|
|
6078
6077
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6079
6078
|
* Licensed under the MIT License.
|
|
@@ -6137,7 +6136,7 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
6137
6136
|
uiNotAllowed: uiNotAllowed
|
|
6138
6137
|
});
|
|
6139
6138
|
|
|
6140
|
-
/*! @azure/msal-common v16.14.
|
|
6139
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
6141
6140
|
|
|
6142
6141
|
/*
|
|
6143
6142
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6204,7 +6203,7 @@ function createInteractionRequiredAuthError(errorCode, correlationId, errorMessa
|
|
|
6204
6203
|
return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
|
|
6205
6204
|
}
|
|
6206
6205
|
|
|
6207
|
-
/*! @azure/msal-common v16.14.
|
|
6206
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
6208
6207
|
|
|
6209
6208
|
/*
|
|
6210
6209
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6223,7 +6222,7 @@ class ServerError extends AuthError {
|
|
|
6223
6222
|
}
|
|
6224
6223
|
}
|
|
6225
6224
|
|
|
6226
|
-
/*! @azure/msal-common v16.14.
|
|
6225
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
6227
6226
|
/**
|
|
6228
6227
|
* Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user.
|
|
6229
6228
|
* @param base64Decode
|
|
@@ -6256,7 +6255,7 @@ function parseRequestState(base64Decode, state, correlationId) {
|
|
|
6256
6255
|
}
|
|
6257
6256
|
}
|
|
6258
6257
|
|
|
6259
|
-
/*! @azure/msal-common v16.14.
|
|
6258
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
6260
6259
|
|
|
6261
6260
|
/*
|
|
6262
6261
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6684,7 +6683,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
|
|
|
6684
6683
|
return baseAccount;
|
|
6685
6684
|
}
|
|
6686
6685
|
|
|
6687
|
-
/*! @azure/msal-common v16.14.
|
|
6686
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
6688
6687
|
/*
|
|
6689
6688
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6690
6689
|
* Licensed under the MIT License.
|
|
@@ -6694,7 +6693,7 @@ const CcsCredentialType = {
|
|
|
6694
6693
|
UPN: "UPN",
|
|
6695
6694
|
};
|
|
6696
6695
|
|
|
6697
|
-
/*! @azure/msal-common v16.14.
|
|
6696
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
6698
6697
|
/*
|
|
6699
6698
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6700
6699
|
* Licensed under the MIT License.
|
|
@@ -6713,7 +6712,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint, fmiP
|
|
|
6713
6712
|
}
|
|
6714
6713
|
}
|
|
6715
6714
|
|
|
6716
|
-
/*! @azure/msal-common v16.14.
|
|
6715
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
6717
6716
|
|
|
6718
6717
|
/*
|
|
6719
6718
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6737,7 +6736,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
|
|
|
6737
6736
|
};
|
|
6738
6737
|
}
|
|
6739
6738
|
|
|
6740
|
-
/*! @azure/msal-common v16.14.
|
|
6739
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
6741
6740
|
|
|
6742
6741
|
/*
|
|
6743
6742
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6823,7 +6822,7 @@ class ThrottlingUtils {
|
|
|
6823
6822
|
}
|
|
6824
6823
|
}
|
|
6825
6824
|
|
|
6826
|
-
/*! @azure/msal-common v16.14.
|
|
6825
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
6827
6826
|
|
|
6828
6827
|
/*
|
|
6829
6828
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6854,7 +6853,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
|
|
|
6854
6853
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
6855
6854
|
}
|
|
6856
6855
|
|
|
6857
|
-
/*! @azure/msal-common v16.14.
|
|
6856
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
6858
6857
|
|
|
6859
6858
|
/*
|
|
6860
6859
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6987,7 +6986,7 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
|
|
|
6987
6986
|
return response;
|
|
6988
6987
|
}
|
|
6989
6988
|
|
|
6990
|
-
/*! @azure/msal-common v16.14.
|
|
6989
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
6991
6990
|
|
|
6992
6991
|
/*
|
|
6993
6992
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7251,7 +7250,7 @@ class AuthorizationCodeClient {
|
|
|
7251
7250
|
}
|
|
7252
7251
|
}
|
|
7253
7252
|
|
|
7254
|
-
/*! @azure/msal-common v16.14.
|
|
7253
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
7255
7254
|
|
|
7256
7255
|
/*
|
|
7257
7256
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7402,7 +7401,7 @@ function extractLoginHint(account) {
|
|
|
7402
7401
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
7403
7402
|
}
|
|
7404
7403
|
|
|
7405
|
-
/*! @azure/msal-common v16.14.
|
|
7404
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
7406
7405
|
|
|
7407
7406
|
/*
|
|
7408
7407
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7561,6 +7560,7 @@ class RefreshTokenClient {
|
|
|
7561
7560
|
addRedirectUri(parameters, request.redirectUri);
|
|
7562
7561
|
}
|
|
7563
7562
|
addScopes(parameters, request.scopes, request.correlationId, true, this.config.authOptions.authority.options.OIDCOptions?.defaultScopes);
|
|
7563
|
+
addResource(parameters, request.resource);
|
|
7564
7564
|
addGrantType(parameters, GrantType.REFRESH_TOKEN_GRANT);
|
|
7565
7565
|
addClientInfo(parameters);
|
|
7566
7566
|
addLibraryInfo(parameters, this.config.libraryInfo);
|
|
@@ -7636,7 +7636,7 @@ class RefreshTokenClient {
|
|
|
7636
7636
|
}
|
|
7637
7637
|
}
|
|
7638
7638
|
|
|
7639
|
-
/*! @azure/msal-common v16.14.
|
|
7639
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
7640
7640
|
|
|
7641
7641
|
/*
|
|
7642
7642
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7902,7 +7902,7 @@ class ServerTelemetryManager {
|
|
|
7902
7902
|
}
|
|
7903
7903
|
}
|
|
7904
7904
|
|
|
7905
|
-
/*! @azure/msal-common v16.14.
|
|
7905
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
7906
7906
|
|
|
7907
7907
|
/*
|
|
7908
7908
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8029,7 +8029,7 @@ class SilentFlowClient {
|
|
|
8029
8029
|
}
|
|
8030
8030
|
}
|
|
8031
8031
|
|
|
8032
|
-
/*! @azure/msal-common v16.14.
|
|
8032
|
+
/*! @azure/msal-common v16.14.2 2026-10-02 */
|
|
8033
8033
|
|
|
8034
8034
|
/*
|
|
8035
8035
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8712,6 +8712,10 @@ const NodeAuthErrorMessage = {
|
|
|
8712
8712
|
code: "loopback_server_timeout",
|
|
8713
8713
|
desc: "Timed out waiting for auth code listener to be registered.",
|
|
8714
8714
|
},
|
|
8715
|
+
loopbackServerQueryResponseNotSupported: {
|
|
8716
|
+
code: "loopback_server_query_response_not_supported",
|
|
8717
|
+
desc: "The loopback server received an OAuth response in the URL. Interactive authentication requires form_post.",
|
|
8718
|
+
},
|
|
8715
8719
|
stateNotFoundError: {
|
|
8716
8720
|
code: "state_not_found",
|
|
8717
8721
|
desc: "State not found. Please verify that the request originated from msal.",
|
|
@@ -8766,6 +8770,12 @@ class NodeAuthError extends AuthError {
|
|
|
8766
8770
|
static createLoopbackServerTimeoutError(correlationId = "") {
|
|
8767
8771
|
return new NodeAuthError(NodeAuthErrorMessage.loopbackServerTimeout.code, correlationId, `${NodeAuthErrorMessage.loopbackServerTimeout.desc}`);
|
|
8768
8772
|
}
|
|
8773
|
+
/**
|
|
8774
|
+
* Creates an error thrown if the loopback server receives an OAuth response in a query string.
|
|
8775
|
+
*/
|
|
8776
|
+
static createLoopbackServerQueryResponseNotSupportedError() {
|
|
8777
|
+
return new NodeAuthError(NodeAuthErrorMessage.loopbackServerQueryResponseNotSupported.code, "", NodeAuthErrorMessage.loopbackServerQueryResponseNotSupported.desc);
|
|
8778
|
+
}
|
|
8769
8779
|
/**
|
|
8770
8780
|
* Creates an error thrown when the state is not present.
|
|
8771
8781
|
*/
|
|
@@ -10059,7 +10069,7 @@ class ClientAssertion {
|
|
|
10059
10069
|
|
|
10060
10070
|
/* eslint-disable header/header */
|
|
10061
10071
|
const name = "@azure/msal-node";
|
|
10062
|
-
const version = "
|
|
10072
|
+
const version = "7.0.1";
|
|
10063
10073
|
|
|
10064
10074
|
/*
|
|
10065
10075
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -10255,6 +10265,125 @@ function getAuthCodeRequestUrl(config, authority, request, logger) {
|
|
|
10255
10265
|
return getAuthorizeUrl(authority, parameters);
|
|
10256
10266
|
}
|
|
10257
10267
|
|
|
10268
|
+
/*
|
|
10269
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
10270
|
+
* Licensed under the MIT License.
|
|
10271
|
+
*/
|
|
10272
|
+
const activeSilentTokenRequests = new WeakMap();
|
|
10273
|
+
/**
|
|
10274
|
+
* Shares an in-flight silent acquisition while preserving each caller's correlation ID.
|
|
10275
|
+
*/
|
|
10276
|
+
function acquireTokenSilentDeduped(owner, logger, silentRequestKey, correlationId, acquireToken) {
|
|
10277
|
+
const existingRequests = activeSilentTokenRequests.get(owner);
|
|
10278
|
+
const activeRequests = existingRequests || new Map();
|
|
10279
|
+
if (!existingRequests) {
|
|
10280
|
+
activeSilentTokenRequests.set(owner, activeRequests);
|
|
10281
|
+
}
|
|
10282
|
+
const inProgressRequest = activeRequests.get(silentRequestKey);
|
|
10283
|
+
if (inProgressRequest) {
|
|
10284
|
+
logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call", correlationId);
|
|
10285
|
+
return applyCallerCorrelationIdToResult(inProgressRequest, correlationId);
|
|
10286
|
+
}
|
|
10287
|
+
logger.verbose("acquireTokenSilent called for the first time, storing active request", correlationId);
|
|
10288
|
+
const activeRequest = Promise.resolve()
|
|
10289
|
+
.then(acquireToken)
|
|
10290
|
+
.finally(() => {
|
|
10291
|
+
activeRequests.delete(silentRequestKey);
|
|
10292
|
+
if (activeRequests.size === 0) {
|
|
10293
|
+
activeSilentTokenRequests.delete(owner);
|
|
10294
|
+
}
|
|
10295
|
+
});
|
|
10296
|
+
activeRequests.set(silentRequestKey, activeRequest);
|
|
10297
|
+
return applyCallerCorrelationIdToResult(activeRequest, correlationId);
|
|
10298
|
+
}
|
|
10299
|
+
/**
|
|
10300
|
+
* Builds the key used to identify equivalent in-progress silent requests.
|
|
10301
|
+
*/
|
|
10302
|
+
function getSilentRequestKey(input) {
|
|
10303
|
+
const { request } = input;
|
|
10304
|
+
const authority = input.requestType === "native" ? request.authority : input.authority;
|
|
10305
|
+
const commonKeyFields = {
|
|
10306
|
+
requestType: input.requestType,
|
|
10307
|
+
clientId: input.requestType === "native"
|
|
10308
|
+
? input.request.clientId
|
|
10309
|
+
: input.clientId,
|
|
10310
|
+
authority,
|
|
10311
|
+
scopes: canonicalizeRequestValues(request.scopes),
|
|
10312
|
+
claims: request.claims,
|
|
10313
|
+
authenticationScheme: request.authenticationScheme,
|
|
10314
|
+
resourceRequestMethod: request.resourceRequestMethod,
|
|
10315
|
+
resourceRequestUri: request.resourceRequestUri,
|
|
10316
|
+
forceRefresh: request.forceRefresh,
|
|
10317
|
+
redirectUri: request.redirectUri || "",
|
|
10318
|
+
resource: request.resource,
|
|
10319
|
+
extraParameters: canonicalizeRequestValues(request.extraParameters),
|
|
10320
|
+
};
|
|
10321
|
+
if (input.requestType === "native") {
|
|
10322
|
+
return JSON.stringify({
|
|
10323
|
+
...commonKeyFields,
|
|
10324
|
+
accountId: input.request.accountId,
|
|
10325
|
+
shrNonce: input.request.shrNonce,
|
|
10326
|
+
extraScopesToConsent: canonicalizeRequestValues(input.request.extraScopesToConsent),
|
|
10327
|
+
loginHint: input.request.loginHint,
|
|
10328
|
+
prompt: input.request.prompt,
|
|
10329
|
+
});
|
|
10330
|
+
}
|
|
10331
|
+
const nonNativeRequest = input.request;
|
|
10332
|
+
const thumbprint = getRequestThumbprint(input.clientId, { ...nonNativeRequest, authority }, nonNativeRequest.account.homeAccountId);
|
|
10333
|
+
return JSON.stringify({
|
|
10334
|
+
...thumbprint,
|
|
10335
|
+
...commonKeyFields,
|
|
10336
|
+
accountTenantId: nonNativeRequest.account.tenantId,
|
|
10337
|
+
accountEnvironment: nonNativeRequest.account.environment,
|
|
10338
|
+
refreshTokenExpirationOffsetSeconds: nonNativeRequest.refreshTokenExpirationOffsetSeconds,
|
|
10339
|
+
extraQueryParameters: canonicalizeRequestValues(nonNativeRequest.extraQueryParameters),
|
|
10340
|
+
skipBrokerClaims: thumbprint.embeddedClientId ||
|
|
10341
|
+
nonNativeRequest.extraParameters?.[BROKER_CLIENT_ID]
|
|
10342
|
+
? nonNativeRequest.skipBrokerClaims
|
|
10343
|
+
: undefined,
|
|
10344
|
+
});
|
|
10345
|
+
}
|
|
10346
|
+
/**
|
|
10347
|
+
* Copies mutable native request values so execution cannot diverge from the stored key.
|
|
10348
|
+
*/
|
|
10349
|
+
function snapshotNativeRequest(request) {
|
|
10350
|
+
return {
|
|
10351
|
+
...request,
|
|
10352
|
+
scopes: [...request.scopes],
|
|
10353
|
+
extraParameters: request.extraParameters
|
|
10354
|
+
? { ...request.extraParameters }
|
|
10355
|
+
: undefined,
|
|
10356
|
+
extraScopesToConsent: request.extraScopesToConsent
|
|
10357
|
+
? [...request.extraScopesToConsent]
|
|
10358
|
+
: undefined,
|
|
10359
|
+
};
|
|
10360
|
+
}
|
|
10361
|
+
/**
|
|
10362
|
+
* Canonicalizes scope sets and request dictionaries without changing the outgoing request.
|
|
10363
|
+
*/
|
|
10364
|
+
function canonicalizeRequestValues(values) {
|
|
10365
|
+
if (Array.isArray(values)) {
|
|
10366
|
+
return Array.from(new Set(values
|
|
10367
|
+
.map((scope) => scope.trim())
|
|
10368
|
+
.filter((scope) => scope.length > 0))).sort();
|
|
10369
|
+
}
|
|
10370
|
+
return values
|
|
10371
|
+
? Object.keys(values)
|
|
10372
|
+
.sort()
|
|
10373
|
+
.map((key) => [key, values[key]])
|
|
10374
|
+
: undefined;
|
|
10375
|
+
}
|
|
10376
|
+
/**
|
|
10377
|
+
* Applies the caller's correlation ID to successful results.
|
|
10378
|
+
* Shared failures retain the original error and underlying operation correlation ID.
|
|
10379
|
+
*/
|
|
10380
|
+
function applyCallerCorrelationIdToResult(activeRequest, correlationId) {
|
|
10381
|
+
return activeRequest.then((result) => ({
|
|
10382
|
+
...result,
|
|
10383
|
+
correlationId,
|
|
10384
|
+
}));
|
|
10385
|
+
}
|
|
10386
|
+
|
|
10258
10387
|
/*
|
|
10259
10388
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
10260
10389
|
* Licensed under the MIT License.
|
|
@@ -10379,6 +10508,7 @@ class ClientApplication {
|
|
|
10379
10508
|
*
|
|
10380
10509
|
* This API expects the user to provide an account object and looks into the cache to retrieve the token if present.
|
|
10381
10510
|
* There is also an optional "forceRefresh" boolean the user can send to bypass the cache for access_token and id_token.
|
|
10511
|
+
* Concurrent requests with the same request thumbprint return the same in-progress result.
|
|
10382
10512
|
* In case the refresh_token is expired or not found, an error is thrown
|
|
10383
10513
|
* and the guidance is for the user to call any interactive token acquisition API (eg: `acquireTokenByCode()`).
|
|
10384
10514
|
*/
|
|
@@ -10388,9 +10518,22 @@ class ClientApplication {
|
|
|
10388
10518
|
...(await this.initializeBaseRequest(request)),
|
|
10389
10519
|
forceRefresh: request.forceRefresh || false,
|
|
10390
10520
|
};
|
|
10521
|
+
if (!validRequest.account) {
|
|
10522
|
+
return this.acquireTokenSilentAsync(validRequest, request.azureCloudOptions);
|
|
10523
|
+
}
|
|
10524
|
+
const authorityForThumbprint = Authority.generateAuthority(validRequest.authority, request.azureCloudOptions || this.config.auth.azureCloudOptions);
|
|
10525
|
+
const silentRequestKey = getSilentRequestKey({
|
|
10526
|
+
requestType: "non-native",
|
|
10527
|
+
request: validRequest,
|
|
10528
|
+
authority: authorityForThumbprint,
|
|
10529
|
+
clientId: this.config.auth.clientId,
|
|
10530
|
+
});
|
|
10531
|
+
return acquireTokenSilentDeduped(this, this.logger, silentRequestKey, validRequest.correlationId, () => this.acquireTokenSilentAsync(validRequest, request.azureCloudOptions));
|
|
10532
|
+
}
|
|
10533
|
+
async acquireTokenSilentAsync(validRequest, azureCloudOptions) {
|
|
10391
10534
|
const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenSilent, validRequest.correlationId, validRequest.forceRefresh);
|
|
10392
10535
|
try {
|
|
10393
|
-
const discoveredAuthority = await this.createAuthority(validRequest.authority, validRequest.correlationId, undefined,
|
|
10536
|
+
const discoveredAuthority = await this.createAuthority(validRequest.authority, validRequest.correlationId, undefined, azureCloudOptions);
|
|
10394
10537
|
const clientConfiguration = await this.buildOauthClientConfiguration(discoveredAuthority, validRequest.correlationId, validRequest.redirectUri || "", serverTelemetryManager);
|
|
10395
10538
|
const silentFlowClient = new SilentFlowClient(clientConfiguration, new StubPerformanceClient());
|
|
10396
10539
|
this.logger.verbose("Silent flow client created", validRequest.correlationId);
|
|
@@ -10672,28 +10815,23 @@ class LoopbackClient {
|
|
|
10672
10815
|
"Auth code was successfully acquired. You can close this window now.");
|
|
10673
10816
|
return;
|
|
10674
10817
|
}
|
|
10675
|
-
|
|
10818
|
+
/*
|
|
10819
|
+
* GET requests may load the success page or browser resources, but OAuth
|
|
10820
|
+
* responses must be delivered via form_post.
|
|
10821
|
+
*/
|
|
10676
10822
|
if (method === "GET") {
|
|
10677
10823
|
const redirectUri = this.getRedirectUri();
|
|
10678
10824
|
const parsedUrl = new URL(url, redirectUri);
|
|
10679
10825
|
const authCodeResponse = getDeserializedResponse(parsedUrl.search) || {};
|
|
10680
10826
|
if (!authCodeResponse.code && !authCodeResponse.error) {
|
|
10681
|
-
// Ignore requests without OAuth params (e.g., /favicon.ico)
|
|
10827
|
+
// Ignore requests without OAuth params (e.g., /favicon.ico).
|
|
10682
10828
|
res.writeHead(200);
|
|
10683
10829
|
res.end();
|
|
10684
10830
|
return;
|
|
10685
10831
|
}
|
|
10686
|
-
|
|
10687
|
-
|
|
10688
|
-
|
|
10689
|
-
}); // Prevent auth code from being saved in the browser history
|
|
10690
|
-
res.end();
|
|
10691
|
-
}
|
|
10692
|
-
if (authCodeResponse.error) {
|
|
10693
|
-
res.end(errorTemplate ||
|
|
10694
|
-
`Error occurred: ${authCodeResponse.error}`);
|
|
10695
|
-
}
|
|
10696
|
-
resolve(authCodeResponse);
|
|
10832
|
+
res.writeHead(400);
|
|
10833
|
+
res.end("OAuth responses must use form_post and cannot be returned in the URL.");
|
|
10834
|
+
reject(NodeAuthError.createLoopbackServerQueryResponseNotSupportedError());
|
|
10697
10835
|
}
|
|
10698
10836
|
else {
|
|
10699
10837
|
// Non-root POST (no OAuth response expected here) — ignore
|
|
@@ -11115,10 +11253,8 @@ class PublicClientApplication extends ClientApplication {
|
|
|
11115
11253
|
}
|
|
11116
11254
|
const { verifier, challenge } = await this.cryptoProvider.generatePkceCodes();
|
|
11117
11255
|
const loopbackClient = new LoopbackClient(preferredPort);
|
|
11118
|
-
|
|
11119
|
-
|
|
11120
|
-
ResponseMode$1.FORM_POST;
|
|
11121
|
-
if (responseMode !== ResponseMode$1.QUERY &&
|
|
11256
|
+
const responseMode = remainingProperties.responseMode;
|
|
11257
|
+
if (responseMode !== undefined &&
|
|
11122
11258
|
responseMode !== ResponseMode$1.FORM_POST) {
|
|
11123
11259
|
throw createClientConfigurationError(invalidResponseMode, correlationId);
|
|
11124
11260
|
}
|
|
@@ -11141,7 +11277,7 @@ class PublicClientApplication extends ClientApplication {
|
|
|
11141
11277
|
correlationId: correlationId,
|
|
11142
11278
|
scopes: request.scopes || OIDC_DEFAULT_SCOPES,
|
|
11143
11279
|
redirectUri: redirectUri,
|
|
11144
|
-
responseMode:
|
|
11280
|
+
responseMode: ResponseMode$1.FORM_POST,
|
|
11145
11281
|
codeChallenge: challenge,
|
|
11146
11282
|
codeChallengeMethod: CodeChallengeMethodValues.S256,
|
|
11147
11283
|
};
|
|
@@ -11180,7 +11316,8 @@ class PublicClientApplication extends ClientApplication {
|
|
|
11180
11316
|
this.logger.trace("acquireTokenSilent called", correlationId);
|
|
11181
11317
|
enforceResourceParameter(this.config.auth.isMcp, request);
|
|
11182
11318
|
if (this.nativeBrokerPlugin) {
|
|
11183
|
-
const
|
|
11319
|
+
const nativeBrokerPlugin = this.nativeBrokerPlugin;
|
|
11320
|
+
const brokerRequest = snapshotNativeRequest({
|
|
11184
11321
|
...request,
|
|
11185
11322
|
clientId: this.config.auth.clientId,
|
|
11186
11323
|
scopes: request.scopes || OIDC_DEFAULT_SCOPES,
|
|
@@ -11194,8 +11331,12 @@ class PublicClientApplication extends ClientApplication {
|
|
|
11194
11331
|
},
|
|
11195
11332
|
accountId: request.account.nativeAccountId,
|
|
11196
11333
|
forceRefresh: request.forceRefresh || false,
|
|
11197
|
-
};
|
|
11198
|
-
|
|
11334
|
+
});
|
|
11335
|
+
const silentRequestKey = getSilentRequestKey({
|
|
11336
|
+
requestType: "native",
|
|
11337
|
+
request: brokerRequest,
|
|
11338
|
+
});
|
|
11339
|
+
return acquireTokenSilentDeduped(this, this.logger, silentRequestKey, correlationId, () => nativeBrokerPlugin.acquireTokenSilent(brokerRequest));
|
|
11199
11340
|
}
|
|
11200
11341
|
if (request.redirectUri) {
|
|
11201
11342
|
// If it's not a broker fallback scenario, we throw an error
|