@azure/msal-node 5.6.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/NodeStorage.mjs +3 -3
- package/dist/cache/NodeStorage.mjs.map +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 +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 +5 -8
- package/dist/client/PublicClientApplication.mjs.map +1 -1
- 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 +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +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 +1 -1
- 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 +346 -117
- package/lib/msal-node.cjs.map +1 -1
- package/package.json +4 -8
- package/src/cache/NodeStorage.ts +3 -1
- package/src/client/PublicClientApplication.ts +4 -14
- package/src/index.ts +0 -1
- package/src/network/LoopbackClient.ts +1 -2
- package/src/packageMetadata.ts +1 -1
- package/src/request/InteractiveRequest.ts +1 -7
- package/types/cache/NodeStorage.d.ts.map +1 -1
- package/types/client/PublicClientApplication.d.ts +1 -1
- package/types/client/PublicClientApplication.d.ts.map +1 -1
- package/types/index.d.ts +0 -1
- package/types/index.d.ts.map +1 -1
- package/types/network/LoopbackClient.d.ts +1 -2
- package/types/network/LoopbackClient.d.ts.map +1 -1
- package/types/packageMetadata.d.ts +1 -1
- package/types/request/InteractiveRequest.d.ts +1 -7
- package/types/request/InteractiveRequest.d.ts.map +1 -1
- package/src/network/ILoopbackClient.ts +0 -19
- package/types/network/ILoopbackClient.d.ts +0 -11
- package/types/network/ILoopbackClient.d.ts.map +0 -1
package/lib/msal-node.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node
|
|
1
|
+
/*! @azure/msal-node v6.0.0 2026-08-28 */
|
|
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.
|
|
154
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
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.
|
|
212
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
213
213
|
/*
|
|
214
214
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
215
215
|
* Licensed under the MIT License.
|
|
@@ -221,7 +221,6 @@ const DEFAULT_AUTHORITY_HOST = "login.microsoftonline.com";
|
|
|
221
221
|
const DEFAULT_COMMON_TENANT = "common";
|
|
222
222
|
// ADFS String
|
|
223
223
|
const ADFS = "adfs";
|
|
224
|
-
const DSTS = "dstsv2";
|
|
225
224
|
// Default AAD Instance Discovery Endpoint
|
|
226
225
|
const AAD_INSTANCE_DISCOVERY_ENDPT = `${DEFAULT_AUTHORITY}discovery/instance?api-version=1.1&authorization_endpoint=`;
|
|
227
226
|
// CIAM URL
|
|
@@ -278,6 +277,7 @@ const OIDC_SCOPES = [...OIDC_DEFAULT_SCOPES, EMAIL_SCOPE];
|
|
|
278
277
|
const HeaderNames = {
|
|
279
278
|
CONTENT_TYPE: "Content-Type",
|
|
280
279
|
CONTENT_LENGTH: "Content-Length",
|
|
280
|
+
DPOP: "DPoP",
|
|
281
281
|
RETRY_AFTER: "Retry-After",
|
|
282
282
|
CCS_HEADER: "X-AnchorMailbox",
|
|
283
283
|
WWWAuthenticate: "WWW-Authenticate",
|
|
@@ -302,6 +302,7 @@ const ClaimsRequestKeys = {
|
|
|
302
302
|
ID_TOKEN: "id_token",
|
|
303
303
|
SIGNIN_STATE: "signin_state",
|
|
304
304
|
LOGIN_HINT: "login_hint",
|
|
305
|
+
TENANT_REGION_SUB_SCOPE: "tenant_region_sub_scope",
|
|
305
306
|
};
|
|
306
307
|
/**
|
|
307
308
|
* we considered making this "enum" in the request instead of string, however it looks like the allowed list of
|
|
@@ -398,6 +399,7 @@ const SERVER_TELEM_UNKNOWN_ERROR = "unknown_error";
|
|
|
398
399
|
const AuthenticationScheme = {
|
|
399
400
|
BEARER: "Bearer",
|
|
400
401
|
POP: "pop",
|
|
402
|
+
DPOP: "DPoP",
|
|
401
403
|
SSH: "ssh-cert",
|
|
402
404
|
};
|
|
403
405
|
/**
|
|
@@ -466,7 +468,7 @@ const EncodingTypes = {
|
|
|
466
468
|
UTF8: "utf-8",
|
|
467
469
|
};
|
|
468
470
|
|
|
469
|
-
/*! @azure/msal-common v16.
|
|
471
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
470
472
|
/*
|
|
471
473
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
472
474
|
* Licensed under the MIT License.
|
|
@@ -495,7 +497,7 @@ function createAuthError(code, correlationId, additionalMessage) {
|
|
|
495
497
|
return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage(code));
|
|
496
498
|
}
|
|
497
499
|
|
|
498
|
-
/*! @azure/msal-common v16.
|
|
500
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
499
501
|
|
|
500
502
|
/*
|
|
501
503
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -518,7 +520,7 @@ function createClientAuthError(errorCode, correlationId, additionalMessage) {
|
|
|
518
520
|
return new ClientAuthError(errorCode, correlationId, additionalMessage);
|
|
519
521
|
}
|
|
520
522
|
|
|
521
|
-
/*! @azure/msal-common v16.
|
|
523
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
522
524
|
/*
|
|
523
525
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
524
526
|
* Licensed under the MIT License.
|
|
@@ -547,6 +549,7 @@ const invalidCacheEnvironment = "invalid_cache_environment";
|
|
|
547
549
|
const noAccountFound = "no_account_found";
|
|
548
550
|
const noCryptoObject = "no_crypto_object";
|
|
549
551
|
const unexpectedCredentialType = "unexpected_credential_type";
|
|
552
|
+
const dpopTokenTypeMismatch = "dpop_token_type_mismatch";
|
|
550
553
|
const tokenRefreshRequired = "token_refresh_required";
|
|
551
554
|
const tokenClaimsCnfRequiredForSignedJwt = "token_claims_cnf_required_for_signedjwt";
|
|
552
555
|
const authorizationCodeMissingFromServerResponse = "authorization_code_missing_from_server_response";
|
|
@@ -569,6 +572,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
569
572
|
cannotRemoveEmptyScope: cannotRemoveEmptyScope,
|
|
570
573
|
clientInfoDecodingError: clientInfoDecodingError,
|
|
571
574
|
clientInfoEmptyError: clientInfoEmptyError,
|
|
575
|
+
dpopTokenTypeMismatch: dpopTokenTypeMismatch,
|
|
572
576
|
emptyInputScopeSet: emptyInputScopeSet,
|
|
573
577
|
endSessionEndpointNotSupported: endSessionEndpointNotSupported,
|
|
574
578
|
endpointResolutionError: endpointResolutionError,
|
|
@@ -602,7 +606,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
602
606
|
userCanceled: userCanceled
|
|
603
607
|
});
|
|
604
608
|
|
|
605
|
-
/*! @azure/msal-common v16.
|
|
609
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
606
610
|
|
|
607
611
|
/*
|
|
608
612
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -640,7 +644,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
|
|
|
640
644
|
};
|
|
641
645
|
}
|
|
642
646
|
|
|
643
|
-
/*! @azure/msal-common v16.
|
|
647
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
644
648
|
|
|
645
649
|
/*
|
|
646
650
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -706,7 +710,7 @@ function getJWSPayload(authToken, correlationId) {
|
|
|
706
710
|
return matches[2];
|
|
707
711
|
}
|
|
708
712
|
|
|
709
|
-
/*! @azure/msal-common v16.
|
|
713
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
710
714
|
|
|
711
715
|
/*
|
|
712
716
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -794,7 +798,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
|
|
|
794
798
|
return updatedAccountInfo;
|
|
795
799
|
}
|
|
796
800
|
|
|
797
|
-
/*! @azure/msal-common v16.
|
|
801
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
798
802
|
/*
|
|
799
803
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
800
804
|
* Licensed under the MIT License.
|
|
@@ -805,11 +809,10 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
|
|
|
805
809
|
const AuthorityType = {
|
|
806
810
|
Default: 0,
|
|
807
811
|
Adfs: 1,
|
|
808
|
-
Dsts: 2,
|
|
809
812
|
Ciam: 3,
|
|
810
813
|
};
|
|
811
814
|
|
|
812
|
-
/*! @azure/msal-common v16.
|
|
815
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
813
816
|
/*
|
|
814
817
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
815
818
|
* Licensed under the MIT License.
|
|
@@ -831,7 +834,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
|
|
|
831
834
|
return null;
|
|
832
835
|
}
|
|
833
836
|
|
|
834
|
-
/*! @azure/msal-common v16.
|
|
837
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
835
838
|
/*
|
|
836
839
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
837
840
|
* Licensed under the MIT License.
|
|
@@ -855,7 +858,7 @@ const ProtocolMode = {
|
|
|
855
858
|
EAR: "EAR",
|
|
856
859
|
};
|
|
857
860
|
|
|
858
|
-
/*! @azure/msal-common v16.
|
|
861
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
859
862
|
/**
|
|
860
863
|
* Returns the AccountInfo interface for this account.
|
|
861
864
|
* @internal
|
|
@@ -970,8 +973,8 @@ function createAccountEntity(accountDetails, authority, correlationId, base64Dec
|
|
|
970
973
|
* @param authType
|
|
971
974
|
*/
|
|
972
975
|
function generateHomeAccountId(serverClientInfo, authType, logger, cryptoObj, correlationId, idTokenClaims) {
|
|
973
|
-
//
|
|
974
|
-
if (
|
|
976
|
+
// ADFS does not have tid and does not set client_info
|
|
977
|
+
if (authType !== AuthorityType.Adfs) {
|
|
975
978
|
// for cases where there is clientInfo
|
|
976
979
|
if (serverClientInfo) {
|
|
977
980
|
try {
|
|
@@ -1004,7 +1007,7 @@ function isAccountEntity(entity) {
|
|
|
1004
1007
|
entity.hasOwnProperty("authorityType"));
|
|
1005
1008
|
}
|
|
1006
1009
|
|
|
1007
|
-
/*! @azure/msal-common v16.
|
|
1010
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
1008
1011
|
/*
|
|
1009
1012
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1010
1013
|
* Licensed under the MIT License.
|
|
@@ -1021,7 +1024,7 @@ var AuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
1021
1024
|
unexpectedError: unexpectedError
|
|
1022
1025
|
});
|
|
1023
1026
|
|
|
1024
|
-
/*! @azure/msal-common v16.
|
|
1027
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
1025
1028
|
|
|
1026
1029
|
/*
|
|
1027
1030
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1041,7 +1044,7 @@ function createClientConfigurationError(errorCode, correlationId) {
|
|
|
1041
1044
|
return new ClientConfigurationError(errorCode, correlationId);
|
|
1042
1045
|
}
|
|
1043
1046
|
|
|
1044
|
-
/*! @azure/msal-common v16.
|
|
1047
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
1045
1048
|
/*
|
|
1046
1049
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1047
1050
|
* Licensed under the MIT License.
|
|
@@ -1073,7 +1076,9 @@ const invalidPlatformBrokerConfiguration = "invalid_platform_broker_configuratio
|
|
|
1073
1076
|
const issuerValidationFailed = "issuer_validation_failed";
|
|
1074
1077
|
const invalidResponseMode = "invalid_response_mode";
|
|
1075
1078
|
const invalidDpopHtm = "invalid_dpop_htm";
|
|
1076
|
-
const invalidDpopHtu = "invalid_dpop_htu";
|
|
1079
|
+
const invalidDpopHtu = "invalid_dpop_htu";
|
|
1080
|
+
const invalidDpopNonce = "invalid_dpop_nonce";
|
|
1081
|
+
const dpopMissingResourceContext = "dpop_missing_resource_context";
|
|
1077
1082
|
|
|
1078
1083
|
var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
|
|
1079
1084
|
__proto__: null,
|
|
@@ -1082,6 +1087,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
1082
1087
|
cannotAllowPlatformBroker: cannotAllowPlatformBroker,
|
|
1083
1088
|
cannotSetOIDCOptions: cannotSetOIDCOptions,
|
|
1084
1089
|
claimsRequestParsingError: claimsRequestParsingError,
|
|
1090
|
+
dpopMissingResourceContext: dpopMissingResourceContext,
|
|
1085
1091
|
emptyInputScopesError: emptyInputScopesError,
|
|
1086
1092
|
invalidAuthenticationHeader: invalidAuthenticationHeader,
|
|
1087
1093
|
invalidAuthorityMetadata: invalidAuthorityMetadata,
|
|
@@ -1090,6 +1096,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
1090
1096
|
invalidCodeChallengeMethod: invalidCodeChallengeMethod,
|
|
1091
1097
|
invalidDpopHtm: invalidDpopHtm,
|
|
1092
1098
|
invalidDpopHtu: invalidDpopHtu,
|
|
1099
|
+
invalidDpopNonce: invalidDpopNonce,
|
|
1093
1100
|
invalidPlatformBrokerConfiguration: invalidPlatformBrokerConfiguration,
|
|
1094
1101
|
invalidRequestMethodForEAR: invalidRequestMethodForEAR,
|
|
1095
1102
|
invalidResponseMode: invalidResponseMode,
|
|
@@ -1107,7 +1114,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
1107
1114
|
urlParseError: urlParseError
|
|
1108
1115
|
});
|
|
1109
1116
|
|
|
1110
|
-
/*! @azure/msal-common v16.
|
|
1117
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
1111
1118
|
/*
|
|
1112
1119
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1113
1120
|
* Licensed under the MIT License.
|
|
@@ -1119,7 +1126,7 @@ function isOpenIdConfigResponse(response) {
|
|
|
1119
1126
|
response.hasOwnProperty("jwks_uri"));
|
|
1120
1127
|
}
|
|
1121
1128
|
|
|
1122
|
-
/*! @azure/msal-common v16.
|
|
1129
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
1123
1130
|
/*
|
|
1124
1131
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1125
1132
|
* Licensed under the MIT License.
|
|
@@ -1199,7 +1206,7 @@ class StringUtils {
|
|
|
1199
1206
|
}
|
|
1200
1207
|
}
|
|
1201
1208
|
|
|
1202
|
-
/*! @azure/msal-common v16.
|
|
1209
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
1203
1210
|
|
|
1204
1211
|
/*
|
|
1205
1212
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1357,7 +1364,7 @@ class UrlString {
|
|
|
1357
1364
|
}
|
|
1358
1365
|
}
|
|
1359
1366
|
|
|
1360
|
-
/*! @azure/msal-common v16.
|
|
1367
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
1361
1368
|
|
|
1362
1369
|
/*
|
|
1363
1370
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1440,15 +1447,6 @@ const rawMetdataJSON = {
|
|
|
1440
1447
|
preferred_cache: "login.sovcloud-identity.sg",
|
|
1441
1448
|
aliases: ["login.sovcloud-identity.sg"],
|
|
1442
1449
|
},
|
|
1443
|
-
{
|
|
1444
|
-
preferred_network: "login.windows-ppe.net",
|
|
1445
|
-
preferred_cache: "login.windows-ppe.net",
|
|
1446
|
-
aliases: [
|
|
1447
|
-
"login.windows-ppe.net",
|
|
1448
|
-
"sts.windows-ppe.net",
|
|
1449
|
-
"login.microsoft-ppe.com",
|
|
1450
|
-
],
|
|
1451
|
-
},
|
|
1452
1450
|
],
|
|
1453
1451
|
},
|
|
1454
1452
|
};
|
|
@@ -1520,7 +1518,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
1520
1518
|
return null;
|
|
1521
1519
|
}
|
|
1522
1520
|
|
|
1523
|
-
/*! @azure/msal-common v16.
|
|
1521
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
1524
1522
|
/*
|
|
1525
1523
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1526
1524
|
* Licensed under the MIT License.
|
|
@@ -1530,8 +1528,6 @@ const AzureCloudInstance = {
|
|
|
1530
1528
|
None: "none",
|
|
1531
1529
|
// Microsoft Azure public cloud
|
|
1532
1530
|
AzurePublic: "https://login.microsoftonline.com",
|
|
1533
|
-
// Microsoft PPE
|
|
1534
|
-
AzurePpe: "https://login.windows-ppe.net",
|
|
1535
1531
|
// Microsoft Chinese national/regional cloud
|
|
1536
1532
|
AzureChina: "https://login.chinacloudapi.cn",
|
|
1537
1533
|
// Microsoft German national/regional cloud ("Black Forest")
|
|
@@ -1540,7 +1536,7 @@ const AzureCloudInstance = {
|
|
|
1540
1536
|
AzureUsGovernment: "https://login.microsoftonline.us",
|
|
1541
1537
|
};
|
|
1542
1538
|
|
|
1543
|
-
/*! @azure/msal-common v16.
|
|
1539
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
1544
1540
|
/*
|
|
1545
1541
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1546
1542
|
* Licensed under the MIT License.
|
|
@@ -1550,7 +1546,7 @@ function isCloudInstanceDiscoveryResponse(response) {
|
|
|
1550
1546
|
response.hasOwnProperty("metadata"));
|
|
1551
1547
|
}
|
|
1552
1548
|
|
|
1553
|
-
/*! @azure/msal-common v16.
|
|
1549
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
1554
1550
|
/*
|
|
1555
1551
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1556
1552
|
* Licensed under the MIT License.
|
|
@@ -1560,7 +1556,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
|
|
|
1560
1556
|
response.hasOwnProperty("error_description"));
|
|
1561
1557
|
}
|
|
1562
1558
|
|
|
1563
|
-
/*! @azure/msal-common v16.
|
|
1559
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
1564
1560
|
/*
|
|
1565
1561
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1566
1562
|
* Licensed under the MIT License.
|
|
@@ -1622,7 +1618,7 @@ const RegionDiscoveryGetCurrentVersion = "regionDiscoveryGetCurrentVersion";
|
|
|
1622
1618
|
*/
|
|
1623
1619
|
const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
|
|
1624
1620
|
|
|
1625
|
-
/*! @azure/msal-common v16.
|
|
1621
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
1626
1622
|
/*
|
|
1627
1623
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1628
1624
|
* Licensed under the MIT License.
|
|
@@ -1715,7 +1711,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
|
|
|
1715
1711
|
};
|
|
1716
1712
|
};
|
|
1717
1713
|
|
|
1718
|
-
/*! @azure/msal-common v16.
|
|
1714
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
1719
1715
|
|
|
1720
1716
|
/*
|
|
1721
1717
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1826,7 +1822,7 @@ RegionDiscovery.IMDS_OPTIONS = {
|
|
|
1826
1822
|
},
|
|
1827
1823
|
};
|
|
1828
1824
|
|
|
1829
|
-
/*! @azure/msal-common v16.
|
|
1825
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
1830
1826
|
/*
|
|
1831
1827
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1832
1828
|
* Licensed under the MIT License.
|
|
@@ -1881,7 +1877,7 @@ function delay(t, value) {
|
|
|
1881
1877
|
return new Promise((resolve) => setTimeout(() => resolve(value), t));
|
|
1882
1878
|
}
|
|
1883
1879
|
|
|
1884
|
-
/*! @azure/msal-common v16.
|
|
1880
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
1885
1881
|
|
|
1886
1882
|
/*
|
|
1887
1883
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2168,7 +2164,7 @@ function serializeAttributeTokens(attributeTokens) {
|
|
|
2168
2164
|
return [...attributeTokens].sort().join(" ");
|
|
2169
2165
|
}
|
|
2170
2166
|
|
|
2171
|
-
/*! @azure/msal-common v16.
|
|
2167
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
2172
2168
|
|
|
2173
2169
|
/*
|
|
2174
2170
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2212,8 +2208,6 @@ class Authority {
|
|
|
2212
2208
|
switch (pathSegments[0].toLowerCase()) {
|
|
2213
2209
|
case ADFS:
|
|
2214
2210
|
return AuthorityType.Adfs;
|
|
2215
|
-
case DSTS:
|
|
2216
|
-
return AuthorityType.Dsts;
|
|
2217
2211
|
}
|
|
2218
2212
|
}
|
|
2219
2213
|
return AuthorityType.Default;
|
|
@@ -3138,7 +3132,7 @@ function buildStaticAuthorityOptions(authOptions) {
|
|
|
3138
3132
|
};
|
|
3139
3133
|
}
|
|
3140
3134
|
|
|
3141
|
-
/*! @azure/msal-common v16.
|
|
3135
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
3142
3136
|
|
|
3143
3137
|
/*
|
|
3144
3138
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3172,7 +3166,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
|
|
|
3172
3166
|
}
|
|
3173
3167
|
}
|
|
3174
3168
|
|
|
3175
|
-
/*! @azure/msal-common v16.
|
|
3169
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
3176
3170
|
|
|
3177
3171
|
/*
|
|
3178
3172
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3368,7 +3362,7 @@ class ScopeSet {
|
|
|
3368
3362
|
}
|
|
3369
3363
|
}
|
|
3370
3364
|
|
|
3371
|
-
/*! @azure/msal-common v16.
|
|
3365
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
3372
3366
|
|
|
3373
3367
|
/*
|
|
3374
3368
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3677,11 +3671,15 @@ function addExtraParameters(parameters, extraParams) {
|
|
|
3677
3671
|
}
|
|
3678
3672
|
/**
|
|
3679
3673
|
* Default optional idToken claims requested on all auth requests.
|
|
3680
|
-
* signin_state enables KMSI detection; login_hint enables login hint propagation
|
|
3674
|
+
* signin_state enables KMSI detection; login_hint enables login hint propagation;
|
|
3675
|
+
* tenant_region_sub_scope identifies the sovereign enclave a tenant belongs to.
|
|
3681
3676
|
*/
|
|
3682
3677
|
const DEFAULT_ID_TOKEN_CLAIMS = {
|
|
3683
3678
|
[ClaimsRequestKeys.SIGNIN_STATE]: { essential: false },
|
|
3684
3679
|
[ClaimsRequestKeys.LOGIN_HINT]: { essential: false },
|
|
3680
|
+
[ClaimsRequestKeys.TENANT_REGION_SUB_SCOPE]: {
|
|
3681
|
+
essential: false,
|
|
3682
|
+
},
|
|
3685
3683
|
};
|
|
3686
3684
|
/**
|
|
3687
3685
|
* Parses a claims JSON string into an object, throwing a ClientConfigurationError
|
|
@@ -3740,8 +3738,8 @@ function deepMergeClaims(baseClaims, claimsToMerge) {
|
|
|
3740
3738
|
/**
|
|
3741
3739
|
* Parses claims JSON, optionally deep-merges a second client-originated claims string
|
|
3742
3740
|
* (`claimsToMerge`, e.g. `claimsFromClient`) with precedence on conflicting keys, merges
|
|
3743
|
-
* default optional idToken claims (signin_state, login_hint), and appends client
|
|
3744
|
-
* capabilities (xms_cc) to the access_token section
|
|
3741
|
+
* default optional idToken claims (signin_state, login_hint, tenant_region_sub_scope), and appends client
|
|
3742
|
+
* capabilities (xms_cc) to the access_token section
|
|
3745
3743
|
* Does not overwrite idToken claims already specified by the caller.
|
|
3746
3744
|
* @param claims - Existing claims JSON string from the request (may be undefined)
|
|
3747
3745
|
* @param clientCapabilities - Client capabilities array from configuration
|
|
@@ -3868,7 +3866,7 @@ function addAttributeTokens(parameters, attributeTokens) {
|
|
|
3868
3866
|
}
|
|
3869
3867
|
}
|
|
3870
3868
|
|
|
3871
|
-
/*! @azure/msal-common v16.
|
|
3869
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
3872
3870
|
|
|
3873
3871
|
/*
|
|
3874
3872
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3926,7 +3924,7 @@ function mapToQueryString(parameters) {
|
|
|
3926
3924
|
return queryParameterArray.join("&");
|
|
3927
3925
|
}
|
|
3928
3926
|
|
|
3929
|
-
/*! @azure/msal-common v16.
|
|
3927
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
3930
3928
|
|
|
3931
3929
|
/*
|
|
3932
3930
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3937,6 +3935,7 @@ function mapToQueryString(parameters) {
|
|
|
3937
3935
|
* @internal
|
|
3938
3936
|
*/
|
|
3939
3937
|
const JsonWebTokenAlgorithms = {
|
|
3938
|
+
ES256: "ES256",
|
|
3940
3939
|
RS256: "RS256",
|
|
3941
3940
|
};
|
|
3942
3941
|
/**
|
|
@@ -3973,7 +3972,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
3973
3972
|
},
|
|
3974
3973
|
};
|
|
3975
3974
|
|
|
3976
|
-
/*! @azure/msal-common v16.
|
|
3975
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
3977
3976
|
|
|
3978
3977
|
/*
|
|
3979
3978
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3996,7 +3995,7 @@ const DEFAULT_TOKEN_BINDING_KEY_MANAGER = {
|
|
|
3996
3995
|
},
|
|
3997
3996
|
};
|
|
3998
3997
|
|
|
3999
|
-
/*! @azure/msal-common v16.
|
|
3998
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
4000
3999
|
/*
|
|
4001
4000
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4002
4001
|
* Licensed under the MIT License.
|
|
@@ -4271,12 +4270,12 @@ class Logger {
|
|
|
4271
4270
|
}
|
|
4272
4271
|
}
|
|
4273
4272
|
|
|
4274
|
-
/*! @azure/msal-common v16.
|
|
4273
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
4275
4274
|
/* eslint-disable header/header */
|
|
4276
4275
|
const name$1 = "@azure/msal-common";
|
|
4277
|
-
const version$1 = "16.
|
|
4276
|
+
const version$1 = "16.14.0";
|
|
4278
4277
|
|
|
4279
|
-
/*! @azure/msal-common v16.
|
|
4278
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
4280
4279
|
/*
|
|
4281
4280
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4282
4281
|
* Licensed under the MIT License.
|
|
@@ -4284,7 +4283,7 @@ const version$1 = "16.13.0";
|
|
|
4284
4283
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
4285
4284
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
4286
4285
|
|
|
4287
|
-
/*! @azure/msal-common v16.
|
|
4286
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
4288
4287
|
|
|
4289
4288
|
/*
|
|
4290
4289
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4322,7 +4321,7 @@ function createCacheError(e) {
|
|
|
4322
4321
|
}
|
|
4323
4322
|
}
|
|
4324
4323
|
|
|
4325
|
-
/*! @azure/msal-common v16.
|
|
4324
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
4326
4325
|
|
|
4327
4326
|
/*
|
|
4328
4327
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4333,9 +4332,10 @@ function createCacheError(e) {
|
|
|
4333
4332
|
* @internal
|
|
4334
4333
|
*/
|
|
4335
4334
|
class CacheManager {
|
|
4336
|
-
constructor(clientId, cryptoImpl, logger, performanceClient, staticAuthorityOptions) {
|
|
4335
|
+
constructor(clientId, cryptoImpl, logger, performanceClient, staticAuthorityOptions, tokenBindingKeyManager) {
|
|
4337
4336
|
this.clientId = clientId;
|
|
4338
4337
|
this.cryptoImpl = cryptoImpl;
|
|
4338
|
+
this.tokenBindingKeyManager = tokenBindingKeyManager;
|
|
4339
4339
|
this.commonLogger = logger.clone(name$1, version$1);
|
|
4340
4340
|
this.staticAuthorityOptions = staticAuthorityOptions;
|
|
4341
4341
|
this.performanceClient = performanceClient;
|
|
@@ -4824,19 +4824,24 @@ class CacheManager {
|
|
|
4824
4824
|
}
|
|
4825
4825
|
this.removeItem(key, correlationId);
|
|
4826
4826
|
this.performanceClient.incrementFields({ accessTokensRemoved: 1 }, correlationId);
|
|
4827
|
-
// Remove Token Binding Key from key store for
|
|
4827
|
+
// Remove Token Binding Key from key store for token-bound access token credentials
|
|
4828
4828
|
if (credential.credentialType.toLowerCase() ===
|
|
4829
4829
|
CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()) {
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
this.
|
|
4838
|
-
|
|
4839
|
-
|
|
4830
|
+
const tokenType = credential.tokenType?.toLowerCase();
|
|
4831
|
+
switch (tokenType) {
|
|
4832
|
+
case AuthenticationScheme.POP:
|
|
4833
|
+
case AuthenticationScheme.DPOP.toLowerCase(): {
|
|
4834
|
+
const accessTokenWithAuthSchemeEntity = credential;
|
|
4835
|
+
const kid = accessTokenWithAuthSchemeEntity.keyId;
|
|
4836
|
+
if (kid) {
|
|
4837
|
+
void this.tokenBindingKeyManager
|
|
4838
|
+
.removeTokenBindingKey(kid, correlationId)
|
|
4839
|
+
.catch(() => {
|
|
4840
|
+
this.commonLogger.error("Failed to remove token binding key", correlationId);
|
|
4841
|
+
this.performanceClient?.incrementFields({ removeTokenBindingKeyFailure: 1 }, correlationId);
|
|
4842
|
+
});
|
|
4843
|
+
}
|
|
4844
|
+
break;
|
|
4840
4845
|
}
|
|
4841
4846
|
}
|
|
4842
4847
|
}
|
|
@@ -5376,16 +5381,15 @@ class CacheManager {
|
|
|
5376
5381
|
}
|
|
5377
5382
|
switch (normalizedFilterTokenType) {
|
|
5378
5383
|
case "dpop":
|
|
5379
|
-
return this.matchKeyBoundAccessToken(entity, filter, true);
|
|
5380
5384
|
case AuthenticationScheme.SSH:
|
|
5381
|
-
return this.matchKeyBoundAccessToken(entity, filter
|
|
5385
|
+
return this.matchKeyBoundAccessToken(entity, filter);
|
|
5382
5386
|
default:
|
|
5383
5387
|
return true;
|
|
5384
5388
|
}
|
|
5385
5389
|
}
|
|
5386
|
-
matchKeyBoundAccessToken(entity, filter
|
|
5390
|
+
matchKeyBoundAccessToken(entity, filter) {
|
|
5387
5391
|
if (!filter.keyId) {
|
|
5388
|
-
return
|
|
5392
|
+
return true;
|
|
5389
5393
|
}
|
|
5390
5394
|
return this.matchKeyId(entity, filter.keyId);
|
|
5391
5395
|
}
|
|
@@ -5504,7 +5508,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
5504
5508
|
}
|
|
5505
5509
|
}
|
|
5506
5510
|
|
|
5507
|
-
/*! @azure/msal-common v16.
|
|
5511
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
5508
5512
|
/*
|
|
5509
5513
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5510
5514
|
* Licensed under the MIT License.
|
|
@@ -5518,7 +5522,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
5518
5522
|
const PerformanceEventStatus = {
|
|
5519
5523
|
InProgress: 1};
|
|
5520
5524
|
|
|
5521
|
-
/*! @azure/msal-common v16.
|
|
5525
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
5522
5526
|
|
|
5523
5527
|
/*
|
|
5524
5528
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5576,7 +5580,7 @@ class StubPerformanceClient {
|
|
|
5576
5580
|
}
|
|
5577
5581
|
}
|
|
5578
5582
|
|
|
5579
|
-
/*! @azure/msal-common v16.
|
|
5583
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
5580
5584
|
|
|
5581
5585
|
/*
|
|
5582
5586
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5635,15 +5639,16 @@ function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions:
|
|
|
5635
5639
|
...DEFAULT_LOGGER_IMPLEMENTATION,
|
|
5636
5640
|
...userLoggerOption,
|
|
5637
5641
|
};
|
|
5642
|
+
const resolvedTokenBindingKeyManager = tokenBindingKeyManager || DEFAULT_TOKEN_BINDING_KEY_MANAGER;
|
|
5638
5643
|
return {
|
|
5639
5644
|
authOptions: buildAuthOptions(userAuthOptions),
|
|
5640
5645
|
systemOptions: { ...DEFAULT_SYSTEM_OPTIONS$1, ...userSystemOptions },
|
|
5641
5646
|
loggerOptions: loggerOptions,
|
|
5642
5647
|
storageInterface: storageImplementation ||
|
|
5643
|
-
new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION, new Logger(loggerOptions, name$1, version$1), new StubPerformanceClient()),
|
|
5648
|
+
new DefaultStorageClass(userAuthOptions.clientId, DEFAULT_CRYPTO_IMPLEMENTATION, new Logger(loggerOptions, name$1, version$1), new StubPerformanceClient(), undefined, resolvedTokenBindingKeyManager),
|
|
5644
5649
|
networkInterface: networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION,
|
|
5645
5650
|
cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION,
|
|
5646
|
-
tokenBindingKeyManager:
|
|
5651
|
+
tokenBindingKeyManager: resolvedTokenBindingKeyManager,
|
|
5647
5652
|
clientCredentials: clientCredentials || DEFAULT_CLIENT_CREDENTIALS,
|
|
5648
5653
|
libraryInfo: { ...DEFAULT_LIBRARY_INFO, ...libraryInfo },
|
|
5649
5654
|
telemetry: { ...DEFAULT_TELEMETRY_OPTIONS$1, ...telemetry },
|
|
@@ -5673,7 +5678,7 @@ function isOidcProtocolMode(config) {
|
|
|
5673
5678
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
5674
5679
|
}
|
|
5675
5680
|
|
|
5676
|
-
/*! @azure/msal-common v16.
|
|
5681
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
5677
5682
|
/*
|
|
5678
5683
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5679
5684
|
* Licensed under the MIT License.
|
|
@@ -5700,7 +5705,7 @@ function isOidcProtocolMode(config) {
|
|
|
5700
5705
|
}
|
|
5701
5706
|
}
|
|
5702
5707
|
|
|
5703
|
-
/*! @azure/msal-common v16.
|
|
5708
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
5704
5709
|
|
|
5705
5710
|
/*
|
|
5706
5711
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5721,7 +5726,7 @@ function createJoseHeaderError(code, correlationId) {
|
|
|
5721
5726
|
return new JoseHeaderError(code, correlationId);
|
|
5722
5727
|
}
|
|
5723
5728
|
|
|
5724
|
-
/*! @azure/msal-common v16.
|
|
5729
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
5725
5730
|
/*
|
|
5726
5731
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5727
5732
|
* Licensed under the MIT License.
|
|
@@ -5746,7 +5751,7 @@ function isPlainObject(value) {
|
|
|
5746
5751
|
return Object.getPrototypeOf(value) === proto;
|
|
5747
5752
|
}
|
|
5748
5753
|
|
|
5749
|
-
/*! @azure/msal-common v16.
|
|
5754
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
5750
5755
|
/*
|
|
5751
5756
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5752
5757
|
* Licensed under the MIT License.
|
|
@@ -5756,7 +5761,7 @@ const missingAlgError = "missing_alg_error";
|
|
|
5756
5761
|
const missingJwkError = "missing_jwk_error";
|
|
5757
5762
|
const invalidJwkError = "invalid_jwk_error";
|
|
5758
5763
|
|
|
5759
|
-
/*! @azure/msal-common v16.
|
|
5764
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
5760
5765
|
|
|
5761
5766
|
/*
|
|
5762
5767
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5822,7 +5827,7 @@ class JoseHeader {
|
|
|
5822
5827
|
}
|
|
5823
5828
|
}
|
|
5824
5829
|
|
|
5825
|
-
/*! @azure/msal-common v16.
|
|
5830
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
5826
5831
|
|
|
5827
5832
|
/*
|
|
5828
5833
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5923,7 +5928,152 @@ class PopTokenGenerator {
|
|
|
5923
5928
|
}
|
|
5924
5929
|
}
|
|
5925
5930
|
|
|
5926
|
-
/*! @azure/msal-common v16.
|
|
5931
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
5932
|
+
|
|
5933
|
+
/*
|
|
5934
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5935
|
+
* Licensed under the MIT License.
|
|
5936
|
+
*/
|
|
5937
|
+
const DPOP_HTM_REGEX = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
5938
|
+
const DPOP_TOKEN_BINDING_KEY_TYPE = "dpop";
|
|
5939
|
+
const DPOP_JWT_HEADER_ALGORITHM = JsonWebTokenAlgorithms.ES256;
|
|
5940
|
+
function buildProofHeader(publicJwk, correlationId) {
|
|
5941
|
+
return JoseHeader.getDpopHeader({
|
|
5942
|
+
alg: DPOP_JWT_HEADER_ALGORITHM,
|
|
5943
|
+
jwk: publicJwk,
|
|
5944
|
+
}, correlationId);
|
|
5945
|
+
}
|
|
5946
|
+
function normalizeHtm(htm, correlationId) {
|
|
5947
|
+
if (typeof htm !== "string" || !DPOP_HTM_REGEX.test(htm)) {
|
|
5948
|
+
throw createClientConfigurationError(invalidDpopHtm, correlationId);
|
|
5949
|
+
}
|
|
5950
|
+
return htm.toUpperCase();
|
|
5951
|
+
}
|
|
5952
|
+
/**
|
|
5953
|
+
* Normalizes a URL for use as the DPoP htu claim.
|
|
5954
|
+
* Per RFC 9449 §4.2, htu is the target URI without query and fragment components.
|
|
5955
|
+
* WHATWG URL serialization handles RFC 3986 syntax- and scheme-based normalization
|
|
5956
|
+
* such as lowercasing scheme/host and eliding default ports.
|
|
5957
|
+
*/
|
|
5958
|
+
function normalizeHtu(url, correlationId) {
|
|
5959
|
+
let parsedUrl;
|
|
5960
|
+
try {
|
|
5961
|
+
parsedUrl = new URL(url);
|
|
5962
|
+
}
|
|
5963
|
+
catch {
|
|
5964
|
+
throw createClientConfigurationError(urlParseError, correlationId);
|
|
5965
|
+
}
|
|
5966
|
+
if (!/^https:\/\//i.test(url) ||
|
|
5967
|
+
parsedUrl.protocol !== "https:" ||
|
|
5968
|
+
parsedUrl.username ||
|
|
5969
|
+
parsedUrl.password) {
|
|
5970
|
+
throw createClientConfigurationError(invalidDpopHtu, correlationId);
|
|
5971
|
+
}
|
|
5972
|
+
parsedUrl.search = "";
|
|
5973
|
+
parsedUrl.hash = "";
|
|
5974
|
+
return parsedUrl.href;
|
|
5975
|
+
}
|
|
5976
|
+
function validateDpopNonce(nonce, correlationId) {
|
|
5977
|
+
if (nonce !== undefined && nonce.trim().length === 0) {
|
|
5978
|
+
throw createClientConfigurationError(invalidDpopNonce, correlationId);
|
|
5979
|
+
}
|
|
5980
|
+
}
|
|
5981
|
+
/**
|
|
5982
|
+
* Builds RFC 9449 DPoP proof JWT payloads for token-endpoint and
|
|
5983
|
+
* resource-endpoint proof bindings.
|
|
5984
|
+
*
|
|
5985
|
+
* Not exported from any public package entry point.
|
|
5986
|
+
* This helper is internal-only until DPoP is wired into acquisition flows
|
|
5987
|
+
* in a subsequent work item.
|
|
5988
|
+
*
|
|
5989
|
+
* DPoP proofs do not contain SHR fields (at, ts, m, u, p, q).
|
|
5990
|
+
* @internal
|
|
5991
|
+
*/
|
|
5992
|
+
class DpopProofGenerator {
|
|
5993
|
+
constructor(cryptoUtils, tokenBindingKeyManager) {
|
|
5994
|
+
this.cryptoUtils = cryptoUtils;
|
|
5995
|
+
this.tokenBindingKeyManager = tokenBindingKeyManager;
|
|
5996
|
+
}
|
|
5997
|
+
/**
|
|
5998
|
+
* Provisions a fresh DPoP key and returns the RFC 7638 JWK thumbprint used
|
|
5999
|
+
* as `dpop_jkt`.
|
|
6000
|
+
*/
|
|
6001
|
+
async generateJkt(correlationId = "") {
|
|
6002
|
+
return this.tokenBindingKeyManager.provisionTokenBindingKey({
|
|
6003
|
+
tokenBindingKeyType: DPOP_TOKEN_BINDING_KEY_TYPE,
|
|
6004
|
+
tokenBindingKeyAlgorithm: DPOP_JWT_HEADER_ALGORITHM,
|
|
6005
|
+
correlationId,
|
|
6006
|
+
});
|
|
6007
|
+
}
|
|
6008
|
+
/**
|
|
6009
|
+
* Builds RFC 9449 claims for a token-endpoint DPoP proof.
|
|
6010
|
+
* - htm is always "POST" because token endpoint requests use HTTP POST (RFC 9449 §5).
|
|
6011
|
+
* - htu is the normalized token endpoint URI (query and fragment stripped).
|
|
6012
|
+
* - jti is a fresh CSPRNG-backed unique identifier for every proof.
|
|
6013
|
+
*/
|
|
6014
|
+
buildTokenProofClaims(params, correlationId = "") {
|
|
6015
|
+
validateDpopNonce(params.nonce, correlationId);
|
|
6016
|
+
const claims = {
|
|
6017
|
+
jti: this.cryptoUtils.createNewGuid(),
|
|
6018
|
+
htm: "POST",
|
|
6019
|
+
htu: normalizeHtu(params.tokenEndpoint, correlationId),
|
|
6020
|
+
iat: nowSeconds(),
|
|
6021
|
+
};
|
|
6022
|
+
if (params.nonce !== undefined) {
|
|
6023
|
+
claims.nonce = params.nonce;
|
|
6024
|
+
}
|
|
6025
|
+
return claims;
|
|
6026
|
+
}
|
|
6027
|
+
/**
|
|
6028
|
+
* Builds and signs a compact DPoP proof JWT for a token-endpoint request.
|
|
6029
|
+
*/
|
|
6030
|
+
async generateTokenProof(params, keyId, correlationId = "") {
|
|
6031
|
+
return this.generateProof(this.buildTokenProofClaims(params, correlationId), keyId, correlationId);
|
|
6032
|
+
}
|
|
6033
|
+
/**
|
|
6034
|
+
* Builds RFC 9449 claims for a resource-endpoint DPoP proof.
|
|
6035
|
+
* - htm is uppercased per RFC 9449 §4.2.
|
|
6036
|
+
* - htu is the normalized resource URI (query and fragment stripped).
|
|
6037
|
+
* - ath is the base64url-encoded SHA-256 hash of the ASCII access token.
|
|
6038
|
+
* - jti is a fresh CSPRNG-backed unique identifier for every proof.
|
|
6039
|
+
*/
|
|
6040
|
+
buildResourceProofClaims(params, correlationId = "") {
|
|
6041
|
+
validateDpopNonce(params.nonce, correlationId);
|
|
6042
|
+
const claims = {
|
|
6043
|
+
jti: this.cryptoUtils.createNewGuid(),
|
|
6044
|
+
htm: normalizeHtm(params.htm, correlationId),
|
|
6045
|
+
htu: normalizeHtu(params.htu, correlationId),
|
|
6046
|
+
ath: params.ath,
|
|
6047
|
+
iat: nowSeconds(),
|
|
6048
|
+
};
|
|
6049
|
+
if (params.nonce !== undefined) {
|
|
6050
|
+
claims.nonce = params.nonce;
|
|
6051
|
+
}
|
|
6052
|
+
return claims;
|
|
6053
|
+
}
|
|
6054
|
+
/**
|
|
6055
|
+
* Builds and signs a compact DPoP proof JWT for a resource request.
|
|
6056
|
+
*/
|
|
6057
|
+
async generateResourceProof(params, keyId, correlationId = "") {
|
|
6058
|
+
const { htu, htm, nonce } = params;
|
|
6059
|
+
if (!htu || !htm) {
|
|
6060
|
+
throw createClientConfigurationError(dpopMissingResourceContext, correlationId);
|
|
6061
|
+
}
|
|
6062
|
+
const ath = await this.cryptoUtils.hashString(params.accessToken);
|
|
6063
|
+
return this.generateProof(this.buildResourceProofClaims({
|
|
6064
|
+
htu,
|
|
6065
|
+
htm,
|
|
6066
|
+
ath,
|
|
6067
|
+
nonce,
|
|
6068
|
+
}, correlationId), keyId, correlationId);
|
|
6069
|
+
}
|
|
6070
|
+
async generateProof(claims, keyId, correlationId) {
|
|
6071
|
+
const publicJwk = await this.tokenBindingKeyManager.getTokenBindingPublicKeyJwk(keyId, correlationId);
|
|
6072
|
+
return this.cryptoUtils.signTokenBindingJwt(buildProofHeader(publicJwk, correlationId), claims, keyId, correlationId);
|
|
6073
|
+
}
|
|
6074
|
+
}
|
|
6075
|
+
|
|
6076
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
5927
6077
|
/*
|
|
5928
6078
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5929
6079
|
* Licensed under the MIT License.
|
|
@@ -5987,7 +6137,7 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
5987
6137
|
uiNotAllowed: uiNotAllowed
|
|
5988
6138
|
});
|
|
5989
6139
|
|
|
5990
|
-
/*! @azure/msal-common v16.
|
|
6140
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
5991
6141
|
|
|
5992
6142
|
/*
|
|
5993
6143
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6054,7 +6204,7 @@ function createInteractionRequiredAuthError(errorCode, correlationId, errorMessa
|
|
|
6054
6204
|
return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
|
|
6055
6205
|
}
|
|
6056
6206
|
|
|
6057
|
-
/*! @azure/msal-common v16.
|
|
6207
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
6058
6208
|
|
|
6059
6209
|
/*
|
|
6060
6210
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6073,7 +6223,7 @@ class ServerError extends AuthError {
|
|
|
6073
6223
|
}
|
|
6074
6224
|
}
|
|
6075
6225
|
|
|
6076
|
-
/*! @azure/msal-common v16.
|
|
6226
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
6077
6227
|
/**
|
|
6078
6228
|
* Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user.
|
|
6079
6229
|
* @param base64Decode
|
|
@@ -6106,7 +6256,7 @@ function parseRequestState(base64Decode, state, correlationId) {
|
|
|
6106
6256
|
}
|
|
6107
6257
|
}
|
|
6108
6258
|
|
|
6109
|
-
/*! @azure/msal-common v16.
|
|
6259
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
6110
6260
|
|
|
6111
6261
|
/*
|
|
6112
6262
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6195,7 +6345,21 @@ class ResponseHandler {
|
|
|
6195
6345
|
}
|
|
6196
6346
|
// Add keyId from request to serverTokenResponse if defined
|
|
6197
6347
|
serverTokenResponse.key_id =
|
|
6198
|
-
serverTokenResponse.key_id ||
|
|
6348
|
+
serverTokenResponse.key_id ||
|
|
6349
|
+
request.dpopJkt ||
|
|
6350
|
+
request.sshKid ||
|
|
6351
|
+
undefined;
|
|
6352
|
+
if (request.authenticationScheme === AuthenticationScheme.DPOP) {
|
|
6353
|
+
if (serverTokenResponse.token_type?.toLowerCase() !==
|
|
6354
|
+
AuthenticationScheme.DPOP.toLowerCase()) {
|
|
6355
|
+
this.performanceClient?.addFields({
|
|
6356
|
+
dpopTokenTypeMismatch: serverTokenResponse.token_type,
|
|
6357
|
+
}, request.correlationId);
|
|
6358
|
+
throw createClientAuthError(dpopTokenTypeMismatch, request.correlationId);
|
|
6359
|
+
}
|
|
6360
|
+
serverTokenResponse.token_type =
|
|
6361
|
+
AuthenticationScheme.DPOP;
|
|
6362
|
+
}
|
|
6199
6363
|
// Compute components once for entity storage (fallback if hash not provided by client)
|
|
6200
6364
|
const attributeTokenPartition = serializeAttributeTokens(request.attributeTokens);
|
|
6201
6365
|
const cacheKeyComponents = additionalCacheKeyComponents ??
|
|
@@ -6358,7 +6522,9 @@ class ResponseHandler {
|
|
|
6358
6522
|
let extExpiresOn;
|
|
6359
6523
|
let refreshOn;
|
|
6360
6524
|
let familyId = "";
|
|
6525
|
+
let dpopProof;
|
|
6361
6526
|
if (cacheRecord.accessToken) {
|
|
6527
|
+
const accessTokenType = cacheRecord.accessToken.tokenType?.toLowerCase();
|
|
6362
6528
|
/*
|
|
6363
6529
|
* if the request object has `popKid` property, `signPopToken` will be set to false and
|
|
6364
6530
|
* the token will be returned unsigned
|
|
@@ -6376,6 +6542,18 @@ class ResponseHandler {
|
|
|
6376
6542
|
else {
|
|
6377
6543
|
accessToken = cacheRecord.accessToken.secret;
|
|
6378
6544
|
}
|
|
6545
|
+
if (accessTokenType ===
|
|
6546
|
+
AuthenticationScheme.DPOP.toLowerCase()) {
|
|
6547
|
+
if (!cacheRecord.accessToken.keyId) {
|
|
6548
|
+
throw createClientAuthError(keyIdMissing, request.correlationId);
|
|
6549
|
+
}
|
|
6550
|
+
const dpopProofGenerator = new DpopProofGenerator(cryptoObj, tokenBindingKeyManager);
|
|
6551
|
+
dpopProof = await dpopProofGenerator.generateResourceProof({
|
|
6552
|
+
htu: request.resourceRequestUri,
|
|
6553
|
+
htm: request.resourceRequestMethod,
|
|
6554
|
+
accessToken: cacheRecord.accessToken.secret,
|
|
6555
|
+
}, cacheRecord.accessToken.keyId, request.correlationId);
|
|
6556
|
+
}
|
|
6379
6557
|
responseScopes = ScopeSet.fromString(cacheRecord.accessToken.target, request.correlationId).asArray();
|
|
6380
6558
|
// Access token expiresOn cached in seconds, converting to Date for AuthenticationResult
|
|
6381
6559
|
expiresOn = toDateFromSeconds(cacheRecord.accessToken.expiresOn);
|
|
@@ -6392,6 +6570,15 @@ class ResponseHandler {
|
|
|
6392
6570
|
}
|
|
6393
6571
|
const uid = idTokenClaims?.oid || idTokenClaims?.sub || "";
|
|
6394
6572
|
const tid = idTokenClaims?.tid || "";
|
|
6573
|
+
/*
|
|
6574
|
+
* Surface the sovereign enclave for telemetry. This runs for both freshly acquired
|
|
6575
|
+
* and cache-served tokens because SilentFlowClient shares this method, so the field
|
|
6576
|
+
* is present on silent requests that never hit the network.
|
|
6577
|
+
*/
|
|
6578
|
+
const regionSubScope = idTokenClaims?.tenant_region_sub_scope;
|
|
6579
|
+
if (typeof regionSubScope === "string") {
|
|
6580
|
+
performanceClient?.addFields({ regionSubScope }, request.correlationId);
|
|
6581
|
+
}
|
|
6395
6582
|
// for hybrid + native bridge enablement, send back the native account Id
|
|
6396
6583
|
if (serverTokenResponse?.spa_accountid && !!cacheRecord.account) {
|
|
6397
6584
|
// Set on deprecated top-level for downgrade compat
|
|
@@ -6420,6 +6607,7 @@ class ResponseHandler {
|
|
|
6420
6607
|
idToken: cacheRecord?.idToken?.secret || "",
|
|
6421
6608
|
idTokenClaims: idTokenClaims || {},
|
|
6422
6609
|
accessToken: accessToken,
|
|
6610
|
+
dpopProof,
|
|
6423
6611
|
fromCache: fromTokenCache,
|
|
6424
6612
|
expiresOn: expiresOn,
|
|
6425
6613
|
extExpiresOn: extExpiresOn,
|
|
@@ -6427,7 +6615,10 @@ class ResponseHandler {
|
|
|
6427
6615
|
correlationId: request.correlationId,
|
|
6428
6616
|
requestId: requestId || "",
|
|
6429
6617
|
familyId: familyId,
|
|
6430
|
-
tokenType: cacheRecord.accessToken?.tokenType
|
|
6618
|
+
tokenType: cacheRecord.accessToken?.tokenType?.toLowerCase() ===
|
|
6619
|
+
AuthenticationScheme.DPOP.toLowerCase()
|
|
6620
|
+
? AuthenticationScheme.DPOP
|
|
6621
|
+
: cacheRecord.accessToken?.tokenType || "",
|
|
6431
6622
|
state: requestState ? requestState.userRequestState : "",
|
|
6432
6623
|
cloudGraphHostName: cacheRecord.account?.cloudGraphHostName || "",
|
|
6433
6624
|
msGraphHost: cacheRecord.account?.msGraphHost || "",
|
|
@@ -6478,7 +6669,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
|
|
|
6478
6669
|
return baseAccount;
|
|
6479
6670
|
}
|
|
6480
6671
|
|
|
6481
|
-
/*! @azure/msal-common v16.
|
|
6672
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
6482
6673
|
/*
|
|
6483
6674
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6484
6675
|
* Licensed under the MIT License.
|
|
@@ -6488,7 +6679,7 @@ const CcsCredentialType = {
|
|
|
6488
6679
|
UPN: "UPN",
|
|
6489
6680
|
};
|
|
6490
6681
|
|
|
6491
|
-
/*! @azure/msal-common v16.
|
|
6682
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
6492
6683
|
/*
|
|
6493
6684
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6494
6685
|
* Licensed under the MIT License.
|
|
@@ -6507,7 +6698,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint, fmiP
|
|
|
6507
6698
|
}
|
|
6508
6699
|
}
|
|
6509
6700
|
|
|
6510
|
-
/*! @azure/msal-common v16.
|
|
6701
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
6511
6702
|
|
|
6512
6703
|
/*
|
|
6513
6704
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6531,7 +6722,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
|
|
|
6531
6722
|
};
|
|
6532
6723
|
}
|
|
6533
6724
|
|
|
6534
|
-
/*! @azure/msal-common v16.
|
|
6725
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
6535
6726
|
|
|
6536
6727
|
/*
|
|
6537
6728
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6617,7 +6808,7 @@ class ThrottlingUtils {
|
|
|
6617
6808
|
}
|
|
6618
6809
|
}
|
|
6619
6810
|
|
|
6620
|
-
/*! @azure/msal-common v16.
|
|
6811
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
6621
6812
|
|
|
6622
6813
|
/*
|
|
6623
6814
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6648,7 +6839,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
|
|
|
6648
6839
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
6649
6840
|
}
|
|
6650
6841
|
|
|
6651
|
-
/*! @azure/msal-common v16.
|
|
6842
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
6652
6843
|
|
|
6653
6844
|
/*
|
|
6654
6845
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6678,6 +6869,23 @@ function createTokenRequestHeaders(logger, preventCorsPreflight, ccsCred) {
|
|
|
6678
6869
|
}
|
|
6679
6870
|
return headers;
|
|
6680
6871
|
}
|
|
6872
|
+
/**
|
|
6873
|
+
* Adds the DPoP proof header for token endpoint requests when DPoP is requested.
|
|
6874
|
+
* @internal
|
|
6875
|
+
*/
|
|
6876
|
+
async function addDpopTokenProofHeader(headers, request, tokenEndpoint, cryptoUtils, tokenBindingKeyManager) {
|
|
6877
|
+
if (request.authenticationScheme !== AuthenticationScheme.DPOP) {
|
|
6878
|
+
return;
|
|
6879
|
+
}
|
|
6880
|
+
const dpopProofGenerator = new DpopProofGenerator(cryptoUtils, tokenBindingKeyManager);
|
|
6881
|
+
const keyId = request.dpopJkt;
|
|
6882
|
+
if (!keyId?.trim()) {
|
|
6883
|
+
throw createClientAuthError(keyIdMissing, request.correlationId);
|
|
6884
|
+
}
|
|
6885
|
+
headers[HeaderNames.DPOP] = await dpopProofGenerator.generateTokenProof({
|
|
6886
|
+
tokenEndpoint,
|
|
6887
|
+
}, keyId, request.correlationId);
|
|
6888
|
+
}
|
|
6681
6889
|
/**
|
|
6682
6890
|
* Creates query string for the /token request
|
|
6683
6891
|
* @param request
|
|
@@ -6764,7 +6972,7 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
|
|
|
6764
6972
|
return response;
|
|
6765
6973
|
}
|
|
6766
6974
|
|
|
6767
|
-
/*! @azure/msal-common v16.
|
|
6975
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
6768
6976
|
|
|
6769
6977
|
/*
|
|
6770
6978
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6856,6 +7064,7 @@ class AuthorizationCodeClient {
|
|
|
6856
7064
|
}
|
|
6857
7065
|
}
|
|
6858
7066
|
const headers = createTokenRequestHeaders(this.logger, this.config.systemOptions.preventCorsPreflight, ccsCredential || request.ccsCredential);
|
|
7067
|
+
await addDpopTokenProofHeader(headers, request, endpoint, this.cryptoUtils, this.config.tokenBindingKeyManager);
|
|
6859
7068
|
const thumbprint = getRequestThumbprint(this.config.authOptions.clientId, request);
|
|
6860
7069
|
return invokeAsync(executePostToTokenEndpoint, AuthorizationCodeClientExecutePostToTokenEndpoint, this.logger, this.performanceClient, request.correlationId)(endpoint, requestBody, headers, thumbprint, request.correlationId, this.cacheManager, this.networkClient, this.logger, this.performanceClient, serverTelemetryManager);
|
|
6861
7070
|
}
|
|
@@ -7027,7 +7236,7 @@ class AuthorizationCodeClient {
|
|
|
7027
7236
|
}
|
|
7028
7237
|
}
|
|
7029
7238
|
|
|
7030
|
-
/*! @azure/msal-common v16.
|
|
7239
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
7031
7240
|
|
|
7032
7241
|
/*
|
|
7033
7242
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7178,7 +7387,7 @@ function extractLoginHint(account) {
|
|
|
7178
7387
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
7179
7388
|
}
|
|
7180
7389
|
|
|
7181
|
-
/*! @azure/msal-common v16.
|
|
7390
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
7182
7391
|
|
|
7183
7392
|
/*
|
|
7184
7393
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7289,6 +7498,12 @@ class RefreshTokenClient {
|
|
|
7289
7498
|
type: CcsCredentialType.HOME_ACCOUNT_ID,
|
|
7290
7499
|
},
|
|
7291
7500
|
};
|
|
7501
|
+
if (refreshTokenRequest.authenticationScheme ===
|
|
7502
|
+
AuthenticationScheme.DPOP &&
|
|
7503
|
+
!refreshTokenRequest.dpopJkt) {
|
|
7504
|
+
const dpopProofGenerator = new DpopProofGenerator(this.cryptoUtils, this.config.tokenBindingKeyManager);
|
|
7505
|
+
refreshTokenRequest.dpopJkt = await dpopProofGenerator.generateJkt(request.correlationId);
|
|
7506
|
+
}
|
|
7292
7507
|
try {
|
|
7293
7508
|
return await invokeAsync(this.acquireToken.bind(this), RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest, apiId);
|
|
7294
7509
|
}
|
|
@@ -7314,6 +7529,7 @@ class RefreshTokenClient {
|
|
|
7314
7529
|
const endpoint = UrlString.appendQueryString(authority.tokenEndpoint, queryParametersString);
|
|
7315
7530
|
const requestBody = await invokeAsync(this.createTokenRequestBody.bind(this), RefreshTokenClientCreateTokenRequestBody, this.logger, this.performanceClient, request.correlationId)(request);
|
|
7316
7531
|
const headers = createTokenRequestHeaders(this.logger, this.config.systemOptions.preventCorsPreflight, request.ccsCredential);
|
|
7532
|
+
await addDpopTokenProofHeader(headers, request, endpoint, this.cryptoUtils, this.config.tokenBindingKeyManager);
|
|
7317
7533
|
const thumbprint = getRequestThumbprint(this.config.authOptions.clientId, request);
|
|
7318
7534
|
return invokeAsync(executePostToTokenEndpoint, RefreshTokenClientExecutePostToTokenEndpoint, this.logger, this.performanceClient, request.correlationId)(endpoint, requestBody, headers, thumbprint, request.correlationId, this.cacheManager, this.networkClient, this.logger, this.performanceClient, this.serverTelemetryManager);
|
|
7319
7535
|
}
|
|
@@ -7405,7 +7621,7 @@ class RefreshTokenClient {
|
|
|
7405
7621
|
}
|
|
7406
7622
|
}
|
|
7407
7623
|
|
|
7408
|
-
/*! @azure/msal-common v16.
|
|
7624
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
7409
7625
|
|
|
7410
7626
|
/*
|
|
7411
7627
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7671,7 +7887,7 @@ class ServerTelemetryManager {
|
|
|
7671
7887
|
}
|
|
7672
7888
|
}
|
|
7673
7889
|
|
|
7674
|
-
/*! @azure/msal-common v16.
|
|
7890
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
7675
7891
|
|
|
7676
7892
|
/*
|
|
7677
7893
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7740,6 +7956,22 @@ class SilentFlowClient {
|
|
|
7740
7956
|
lastCacheOutcome = CacheOutcome.PROACTIVELY_REFRESHED;
|
|
7741
7957
|
// don't throw ClientAuthError.createRefreshRequiredError(), return cached token instead
|
|
7742
7958
|
}
|
|
7959
|
+
const cachedAccessTokenType = cachedAccessToken.tokenType?.toLowerCase();
|
|
7960
|
+
if (cachedAccessTokenType === AuthenticationScheme.DPOP.toLowerCase()) {
|
|
7961
|
+
if (!cachedAccessToken.keyId) {
|
|
7962
|
+
this.logger.info("SilentFlowClient:acquireCachedToken - Cached DPoP access token is missing keyId; refresh required", request.correlationId);
|
|
7963
|
+
this.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN, request.correlationId);
|
|
7964
|
+
throw createClientAuthError(tokenRefreshRequired, request.correlationId);
|
|
7965
|
+
}
|
|
7966
|
+
try {
|
|
7967
|
+
await this.config.tokenBindingKeyManager.getTokenBindingPublicKeyJwk(cachedAccessToken.keyId, request.correlationId);
|
|
7968
|
+
}
|
|
7969
|
+
catch {
|
|
7970
|
+
this.logger.info("SilentFlowClient:acquireCachedToken - Local DPoP key was not found for cached access token; refresh required", request.correlationId);
|
|
7971
|
+
this.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN, request.correlationId);
|
|
7972
|
+
throw createClientAuthError(tokenRefreshRequired, request.correlationId);
|
|
7973
|
+
}
|
|
7974
|
+
}
|
|
7743
7975
|
const environment = request.authority || this.authority.getPreferredCache();
|
|
7744
7976
|
const cacheRecord = {
|
|
7745
7977
|
account: this.cacheManager.getAccount(this.cacheManager.generateAccountKey(request.account), request.correlationId),
|
|
@@ -7782,7 +8014,7 @@ class SilentFlowClient {
|
|
|
7782
8014
|
}
|
|
7783
8015
|
}
|
|
7784
8016
|
|
|
7785
|
-
/*! @azure/msal-common v16.
|
|
8017
|
+
/*! @azure/msal-common v16.14.0 2026-08-28 */
|
|
7786
8018
|
|
|
7787
8019
|
/*
|
|
7788
8020
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8947,7 +9179,7 @@ function generateAccountKey(account) {
|
|
|
8947
9179
|
*/
|
|
8948
9180
|
class NodeStorage extends CacheManager {
|
|
8949
9181
|
constructor(logger, clientId, cryptoImpl, staticAuthorityOptions) {
|
|
8950
|
-
super(clientId, cryptoImpl, logger, new StubPerformanceClient(), staticAuthorityOptions);
|
|
9182
|
+
super(clientId, cryptoImpl, logger, new StubPerformanceClient(), staticAuthorityOptions, DEFAULT_TOKEN_BINDING_KEY_MANAGER);
|
|
8951
9183
|
this.cache = {};
|
|
8952
9184
|
this.changeEmitters = [];
|
|
8953
9185
|
this.logger = logger;
|
|
@@ -9812,7 +10044,7 @@ class ClientAssertion {
|
|
|
9812
10044
|
|
|
9813
10045
|
/* eslint-disable header/header */
|
|
9814
10046
|
const name = "@azure/msal-node";
|
|
9815
|
-
const version = "
|
|
10047
|
+
const version = "6.0.0";
|
|
9816
10048
|
|
|
9817
10049
|
/*
|
|
9818
10050
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -10839,10 +11071,7 @@ class PublicClientApplication extends ClientApplication {
|
|
|
10839
11071
|
const correlationId = request.correlationId || this.cryptoProvider.createNewGuid();
|
|
10840
11072
|
this.logger.trace("acquireTokenInteractive called", correlationId);
|
|
10841
11073
|
enforceResourceParameter(this.config.auth.isMcp, request);
|
|
10842
|
-
const { openBrowser, successTemplate, errorTemplate, windowHandle,
|
|
10843
|
-
if (customLoopbackClient) {
|
|
10844
|
-
this.logger.warning("The loopbackClient option is deprecated and will be removed in a future major version. Omit it to use the built-in loopback server, and set preferredPort when a fixed port is required.", correlationId);
|
|
10845
|
-
}
|
|
11074
|
+
const { openBrowser, successTemplate, errorTemplate, windowHandle, preferredPort, ...remainingProperties } = request;
|
|
10846
11075
|
if (this.nativeBrokerPlugin) {
|
|
10847
11076
|
const brokerRequest = {
|
|
10848
11077
|
...remainingProperties,
|
|
@@ -10869,10 +11098,10 @@ class PublicClientApplication extends ClientApplication {
|
|
|
10869
11098
|
request.redirectUri = "";
|
|
10870
11099
|
}
|
|
10871
11100
|
const { verifier, challenge } = await this.cryptoProvider.generatePkceCodes();
|
|
10872
|
-
const loopbackClient =
|
|
11101
|
+
const loopbackClient = new LoopbackClient(preferredPort);
|
|
10873
11102
|
// Validate and resolve responseMode
|
|
10874
11103
|
const responseMode = remainingProperties.responseMode ??
|
|
10875
|
-
ResponseMode$1.
|
|
11104
|
+
ResponseMode$1.FORM_POST;
|
|
10876
11105
|
if (responseMode !== ResponseMode$1.QUERY &&
|
|
10877
11106
|
responseMode !== ResponseMode$1.FORM_POST) {
|
|
10878
11107
|
throw createClientConfigurationError(invalidResponseMode, correlationId);
|
|
@@ -11007,7 +11236,7 @@ class PublicClientApplication extends ClientApplication {
|
|
|
11007
11236
|
}
|
|
11008
11237
|
/**
|
|
11009
11238
|
* Attempts to retrieve the redirectUri from the loopback server. If the loopback server does not start listening for requests within the timeout this will throw.
|
|
11010
|
-
* @param loopbackClient -
|
|
11239
|
+
* @param loopbackClient - built-in loopback server implementation
|
|
11011
11240
|
* @param correlationId - correlation id of the request
|
|
11012
11241
|
* @returns
|
|
11013
11242
|
*/
|