@azure/msal-node 5.0.6 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- 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.d.ts.map +1 -1
- package/dist/cache/serializer/Deserializer.mjs +2 -1
- package/dist/cache/serializer/Deserializer.mjs.map +1 -1
- package/dist/cache/serializer/Serializer.d.ts.map +1 -1
- package/dist/cache/serializer/Serializer.mjs +2 -1
- package/dist/cache/serializer/Serializer.mjs.map +1 -1
- package/dist/cache/serializer/SerializerTypes.d.ts +1 -0
- package/dist/cache/serializer/SerializerTypes.d.ts.map +1 -1
- package/dist/client/BaseClient.mjs +1 -1
- package/dist/client/ClientApplication.d.ts.map +1 -1
- package/dist/client/ClientApplication.mjs +2 -1
- 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.d.ts +13 -1
- package/dist/client/PublicClientApplication.d.ts.map +1 -1
- package/dist/client/PublicClientApplication.mjs +21 -2
- package/dist/client/PublicClientApplication.mjs.map +1 -1
- package/dist/client/UsernamePasswordClient.mjs +1 -1
- package/dist/config/Configuration.d.ts +4 -0
- package/dist/config/Configuration.d.ts.map +1 -1
- package/dist/config/Configuration.mjs +2 -1
- package/dist/config/Configuration.mjs.map +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/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/packageMetadata.d.ts +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 +145 -64
- package/lib/msal-node.cjs.map +1 -1
- package/lib/types/cache/serializer/Deserializer.d.ts.map +1 -1
- package/lib/types/cache/serializer/Serializer.d.ts.map +1 -1
- package/lib/types/cache/serializer/SerializerTypes.d.ts +1 -0
- package/lib/types/cache/serializer/SerializerTypes.d.ts.map +1 -1
- package/lib/types/client/ClientApplication.d.ts.map +1 -1
- package/lib/types/client/PublicClientApplication.d.ts +13 -1
- package/lib/types/client/PublicClientApplication.d.ts.map +1 -1
- package/lib/types/config/Configuration.d.ts +4 -0
- package/lib/types/config/Configuration.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/package.json +2 -2
- package/src/cache/serializer/Deserializer.ts +1 -0
- package/src/cache/serializer/Serializer.ts +1 -0
- package/src/cache/serializer/SerializerTypes.ts +1 -0
- package/src/client/ClientApplication.ts +1 -0
- package/src/client/PublicClientApplication.ts +29 -0
- package/src/config/Configuration.ts +5 -0
- package/src/packageMetadata.ts +1 -1
package/lib/msal-node.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node v5.0
|
|
1
|
+
/*! @azure/msal-node v5.1.0 2026-03-13 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -93,6 +93,7 @@ class Serializer {
|
|
|
93
93
|
key_id: atEntity.keyId,
|
|
94
94
|
token_type: atEntity.tokenType,
|
|
95
95
|
userAssertionHash: atEntity.userAssertionHash,
|
|
96
|
+
resource: atEntity.resource,
|
|
96
97
|
};
|
|
97
98
|
});
|
|
98
99
|
return accessTokens;
|
|
@@ -149,7 +150,7 @@ class Serializer {
|
|
|
149
150
|
}
|
|
150
151
|
}
|
|
151
152
|
|
|
152
|
-
/*! @azure/msal-common v16.
|
|
153
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
153
154
|
/*
|
|
154
155
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
155
156
|
* Licensed under the MIT License.
|
|
@@ -397,7 +398,7 @@ const EncodingTypes = {
|
|
|
397
398
|
UTF8: "utf-8",
|
|
398
399
|
};
|
|
399
400
|
|
|
400
|
-
/*! @azure/msal-common v16.
|
|
401
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
401
402
|
/*
|
|
402
403
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
403
404
|
* Licensed under the MIT License.
|
|
@@ -446,9 +447,10 @@ const DOMAIN_HINT = "domain_hint";
|
|
|
446
447
|
const X_CLIENT_EXTRA_SKU = "x-client-xtra-sku";
|
|
447
448
|
const BROKER_CLIENT_ID = "brk_client_id";
|
|
448
449
|
const BROKER_REDIRECT_URI = "brk_redirect_uri";
|
|
449
|
-
const INSTANCE_AWARE = "instance_aware";
|
|
450
|
+
const INSTANCE_AWARE = "instance_aware";
|
|
451
|
+
const RESOURCE = "resource";
|
|
450
452
|
|
|
451
|
-
/*! @azure/msal-common v16.
|
|
453
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
452
454
|
/*
|
|
453
455
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
454
456
|
* Licensed under the MIT License.
|
|
@@ -479,7 +481,7 @@ function createAuthError(code, additionalMessage) {
|
|
|
479
481
|
return new AuthError(code, additionalMessage || getDefaultErrorMessage(code));
|
|
480
482
|
}
|
|
481
483
|
|
|
482
|
-
/*! @azure/msal-common v16.
|
|
484
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
483
485
|
|
|
484
486
|
/*
|
|
485
487
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -499,7 +501,7 @@ function createClientConfigurationError(errorCode) {
|
|
|
499
501
|
return new ClientConfigurationError(errorCode);
|
|
500
502
|
}
|
|
501
503
|
|
|
502
|
-
/*! @azure/msal-common v16.
|
|
504
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
503
505
|
/*
|
|
504
506
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
505
507
|
* Licensed under the MIT License.
|
|
@@ -579,7 +581,7 @@ class StringUtils {
|
|
|
579
581
|
}
|
|
580
582
|
}
|
|
581
583
|
|
|
582
|
-
/*! @azure/msal-common v16.
|
|
584
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
583
585
|
|
|
584
586
|
/*
|
|
585
587
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -602,7 +604,7 @@ function createClientAuthError(errorCode, additionalMessage) {
|
|
|
602
604
|
return new ClientAuthError(errorCode, additionalMessage);
|
|
603
605
|
}
|
|
604
606
|
|
|
605
|
-
/*! @azure/msal-common v16.
|
|
607
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
606
608
|
/*
|
|
607
609
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
608
610
|
* Licensed under the MIT License.
|
|
@@ -656,7 +658,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
656
658
|
urlParseError: urlParseError
|
|
657
659
|
});
|
|
658
660
|
|
|
659
|
-
/*! @azure/msal-common v16.
|
|
661
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
660
662
|
/*
|
|
661
663
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
662
664
|
* Licensed under the MIT License.
|
|
@@ -697,7 +699,9 @@ const noNetworkConnectivity = "no_network_connectivity";
|
|
|
697
699
|
const userCanceled = "user_canceled";
|
|
698
700
|
const methodNotImplemented = "method_not_implemented";
|
|
699
701
|
const nestedAppAuthBridgeDisabled = "nested_app_auth_bridge_disabled";
|
|
700
|
-
const platformBrokerError = "platform_broker_error";
|
|
702
|
+
const platformBrokerError = "platform_broker_error";
|
|
703
|
+
const resourceParameterRequired = "resource_parameter_required";
|
|
704
|
+
const misplacedResourceParam = "misplaced_resource_parameter";
|
|
701
705
|
|
|
702
706
|
var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
703
707
|
__proto__: null,
|
|
@@ -718,6 +722,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
718
722
|
keyIdMissing: keyIdMissing,
|
|
719
723
|
maxAgeTranspired: maxAgeTranspired,
|
|
720
724
|
methodNotImplemented: methodNotImplemented,
|
|
725
|
+
misplacedResourceParam: misplacedResourceParam,
|
|
721
726
|
multipleMatchingAppMetadata: multipleMatchingAppMetadata,
|
|
722
727
|
multipleMatchingTokens: multipleMatchingTokens,
|
|
723
728
|
nestedAppAuthBridgeDisabled: nestedAppAuthBridgeDisabled,
|
|
@@ -731,6 +736,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
731
736
|
openIdConfigError: openIdConfigError,
|
|
732
737
|
platformBrokerError: platformBrokerError,
|
|
733
738
|
requestCannotBeMade: requestCannotBeMade,
|
|
739
|
+
resourceParameterRequired: resourceParameterRequired,
|
|
734
740
|
stateMismatch: stateMismatch,
|
|
735
741
|
stateNotFound: stateNotFound,
|
|
736
742
|
tokenClaimsCnfRequiredForSignedJwt: tokenClaimsCnfRequiredForSignedJwt,
|
|
@@ -740,7 +746,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
740
746
|
userCanceled: userCanceled
|
|
741
747
|
});
|
|
742
748
|
|
|
743
|
-
/*! @azure/msal-common v16.
|
|
749
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
744
750
|
|
|
745
751
|
/*
|
|
746
752
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -935,7 +941,7 @@ class ScopeSet {
|
|
|
935
941
|
}
|
|
936
942
|
}
|
|
937
943
|
|
|
938
|
-
/*! @azure/msal-common v16.
|
|
944
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
939
945
|
|
|
940
946
|
/*
|
|
941
947
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1318,9 +1324,14 @@ function addBrokerParameters(parameters, brokerClientId, brokerRedirectUri) {
|
|
|
1318
1324
|
if (!parameters.has(BROKER_REDIRECT_URI)) {
|
|
1319
1325
|
parameters.set(BROKER_REDIRECT_URI, brokerRedirectUri);
|
|
1320
1326
|
}
|
|
1327
|
+
}
|
|
1328
|
+
function addResource(parameters, resource) {
|
|
1329
|
+
if (resource) {
|
|
1330
|
+
parameters.set(RESOURCE, resource);
|
|
1331
|
+
}
|
|
1321
1332
|
}
|
|
1322
1333
|
|
|
1323
|
-
/*! @azure/msal-common v16.
|
|
1334
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
1324
1335
|
/**
|
|
1325
1336
|
* Parses hash string from given string. Returns empty string if no hash symbol is found.
|
|
1326
1337
|
* @param hashString
|
|
@@ -1373,7 +1384,7 @@ function mapToQueryString(parameters) {
|
|
|
1373
1384
|
return queryParameterArray.join("&");
|
|
1374
1385
|
}
|
|
1375
1386
|
|
|
1376
|
-
/*! @azure/msal-common v16.
|
|
1387
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
1377
1388
|
|
|
1378
1389
|
/*
|
|
1379
1390
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1412,7 +1423,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
1412
1423
|
},
|
|
1413
1424
|
};
|
|
1414
1425
|
|
|
1415
|
-
/*! @azure/msal-common v16.
|
|
1426
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
1416
1427
|
/*
|
|
1417
1428
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1418
1429
|
* Licensed under the MIT License.
|
|
@@ -1673,12 +1684,12 @@ class Logger {
|
|
|
1673
1684
|
}
|
|
1674
1685
|
}
|
|
1675
1686
|
|
|
1676
|
-
/*! @azure/msal-common v16.
|
|
1687
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
1677
1688
|
/* eslint-disable header/header */
|
|
1678
1689
|
const name$1 = "@azure/msal-common";
|
|
1679
|
-
const version$1 = "16.
|
|
1690
|
+
const version$1 = "16.3.0";
|
|
1680
1691
|
|
|
1681
|
-
/*! @azure/msal-common v16.
|
|
1692
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
1682
1693
|
/*
|
|
1683
1694
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1684
1695
|
* Licensed under the MIT License.
|
|
@@ -1698,7 +1709,7 @@ const AzureCloudInstance = {
|
|
|
1698
1709
|
AzureUsGovernment: "https://login.microsoftonline.us",
|
|
1699
1710
|
};
|
|
1700
1711
|
|
|
1701
|
-
/*! @azure/msal-common v16.
|
|
1712
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
1702
1713
|
/*
|
|
1703
1714
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1704
1715
|
* Licensed under the MIT License.
|
|
@@ -1780,7 +1791,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
|
|
|
1780
1791
|
return updatedAccountInfo;
|
|
1781
1792
|
}
|
|
1782
1793
|
|
|
1783
|
-
/*! @azure/msal-common v16.
|
|
1794
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
1784
1795
|
|
|
1785
1796
|
/*
|
|
1786
1797
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1860,7 +1871,7 @@ function checkMaxAge(authTime, maxAge) {
|
|
|
1860
1871
|
}
|
|
1861
1872
|
}
|
|
1862
1873
|
|
|
1863
|
-
/*! @azure/msal-common v16.
|
|
1874
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
1864
1875
|
|
|
1865
1876
|
/*
|
|
1866
1877
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2017,7 +2028,7 @@ class UrlString {
|
|
|
2017
2028
|
}
|
|
2018
2029
|
}
|
|
2019
2030
|
|
|
2020
|
-
/*! @azure/msal-common v16.
|
|
2031
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
2021
2032
|
|
|
2022
2033
|
/*
|
|
2023
2034
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2174,7 +2185,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
2174
2185
|
return null;
|
|
2175
2186
|
}
|
|
2176
2187
|
|
|
2177
|
-
/*! @azure/msal-common v16.
|
|
2188
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
2178
2189
|
/*
|
|
2179
2190
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2180
2191
|
* Licensed under the MIT License.
|
|
@@ -2182,7 +2193,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
2182
2193
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
2183
2194
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
2184
2195
|
|
|
2185
|
-
/*! @azure/msal-common v16.
|
|
2196
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
2186
2197
|
|
|
2187
2198
|
/*
|
|
2188
2199
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2220,7 +2231,7 @@ function createCacheError(e) {
|
|
|
2220
2231
|
}
|
|
2221
2232
|
}
|
|
2222
2233
|
|
|
2223
|
-
/*! @azure/msal-common v16.
|
|
2234
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
2224
2235
|
|
|
2225
2236
|
/*
|
|
2226
2237
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2258,7 +2269,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
|
|
|
2258
2269
|
};
|
|
2259
2270
|
}
|
|
2260
2271
|
|
|
2261
|
-
/*! @azure/msal-common v16.
|
|
2272
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
2262
2273
|
/*
|
|
2263
2274
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2264
2275
|
* Licensed under the MIT License.
|
|
@@ -2273,7 +2284,7 @@ const AuthorityType = {
|
|
|
2273
2284
|
Ciam: 3,
|
|
2274
2285
|
};
|
|
2275
2286
|
|
|
2276
|
-
/*! @azure/msal-common v16.
|
|
2287
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
2277
2288
|
/*
|
|
2278
2289
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2279
2290
|
* Licensed under the MIT License.
|
|
@@ -2295,7 +2306,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
|
|
|
2295
2306
|
return null;
|
|
2296
2307
|
}
|
|
2297
2308
|
|
|
2298
|
-
/*! @azure/msal-common v16.
|
|
2309
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
2299
2310
|
/*
|
|
2300
2311
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2301
2312
|
* Licensed under the MIT License.
|
|
@@ -2319,7 +2330,7 @@ const ProtocolMode = {
|
|
|
2319
2330
|
EAR: "EAR",
|
|
2320
2331
|
};
|
|
2321
2332
|
|
|
2322
|
-
/*! @azure/msal-common v16.
|
|
2333
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
2323
2334
|
/**
|
|
2324
2335
|
* Returns the AccountInfo interface for this account.
|
|
2325
2336
|
*/
|
|
@@ -2462,7 +2473,7 @@ function isAccountEntity(entity) {
|
|
|
2462
2473
|
entity.hasOwnProperty("authorityType"));
|
|
2463
2474
|
}
|
|
2464
2475
|
|
|
2465
|
-
/*! @azure/msal-common v16.
|
|
2476
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
2466
2477
|
|
|
2467
2478
|
/*
|
|
2468
2479
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3558,7 +3569,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
3558
3569
|
}
|
|
3559
3570
|
}
|
|
3560
3571
|
|
|
3561
|
-
/*! @azure/msal-common v16.
|
|
3572
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
3562
3573
|
/*
|
|
3563
3574
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3564
3575
|
* Licensed under the MIT License.
|
|
@@ -3572,7 +3583,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
3572
3583
|
const PerformanceEventStatus = {
|
|
3573
3584
|
InProgress: 1};
|
|
3574
3585
|
|
|
3575
|
-
/*! @azure/msal-common v16.
|
|
3586
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
3576
3587
|
|
|
3577
3588
|
/*
|
|
3578
3589
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3627,7 +3638,7 @@ class StubPerformanceClient {
|
|
|
3627
3638
|
}
|
|
3628
3639
|
}
|
|
3629
3640
|
|
|
3630
|
-
/*! @azure/msal-common v16.
|
|
3641
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
3631
3642
|
|
|
3632
3643
|
/*
|
|
3633
3644
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3710,6 +3721,7 @@ function buildAuthOptions(authOptions) {
|
|
|
3710
3721
|
clientCapabilities: [],
|
|
3711
3722
|
azureCloudOptions: DEFAULT_AZURE_CLOUD_OPTIONS,
|
|
3712
3723
|
instanceAware: false,
|
|
3724
|
+
isMcp: false,
|
|
3713
3725
|
...authOptions,
|
|
3714
3726
|
};
|
|
3715
3727
|
}
|
|
@@ -3721,7 +3733,7 @@ function isOidcProtocolMode(config) {
|
|
|
3721
3733
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
3722
3734
|
}
|
|
3723
3735
|
|
|
3724
|
-
/*! @azure/msal-common v16.
|
|
3736
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
3725
3737
|
|
|
3726
3738
|
/*
|
|
3727
3739
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3740,7 +3752,7 @@ class ServerError extends AuthError {
|
|
|
3740
3752
|
}
|
|
3741
3753
|
}
|
|
3742
3754
|
|
|
3743
|
-
/*! @azure/msal-common v16.
|
|
3755
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
3744
3756
|
/*
|
|
3745
3757
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3746
3758
|
* Licensed under the MIT License.
|
|
@@ -3804,7 +3816,7 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
3804
3816
|
uxNotAllowed: uxNotAllowed
|
|
3805
3817
|
});
|
|
3806
3818
|
|
|
3807
|
-
/*! @azure/msal-common v16.
|
|
3819
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
3808
3820
|
|
|
3809
3821
|
/*
|
|
3810
3822
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3872,7 +3884,7 @@ function createInteractionRequiredAuthError(errorCode, errorMessage) {
|
|
|
3872
3884
|
return new InteractionRequiredAuthError(errorCode, errorMessage);
|
|
3873
3885
|
}
|
|
3874
3886
|
|
|
3875
|
-
/*! @azure/msal-common v16.
|
|
3887
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
3876
3888
|
/**
|
|
3877
3889
|
* Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user.
|
|
3878
3890
|
* @param base64Decode
|
|
@@ -3904,7 +3916,7 @@ function parseRequestState(base64Decode, state) {
|
|
|
3904
3916
|
}
|
|
3905
3917
|
}
|
|
3906
3918
|
|
|
3907
|
-
/*! @azure/msal-common v16.
|
|
3919
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
3908
3920
|
/*
|
|
3909
3921
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3910
3922
|
* Licensed under the MIT License.
|
|
@@ -3959,7 +3971,7 @@ function delay(t, value) {
|
|
|
3959
3971
|
return new Promise((resolve) => setTimeout(() => resolve(value), t));
|
|
3960
3972
|
}
|
|
3961
3973
|
|
|
3962
|
-
/*! @azure/msal-common v16.
|
|
3974
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
3963
3975
|
/*
|
|
3964
3976
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3965
3977
|
* Licensed under the MIT License.
|
|
@@ -4021,7 +4033,7 @@ const RegionDiscoveryGetCurrentVersion = "regionDiscoveryGetCurrentVersion";
|
|
|
4021
4033
|
*/
|
|
4022
4034
|
const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
|
|
4023
4035
|
|
|
4024
|
-
/*! @azure/msal-common v16.
|
|
4036
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
4025
4037
|
/*
|
|
4026
4038
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4027
4039
|
* Licensed under the MIT License.
|
|
@@ -4114,7 +4126,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
|
|
|
4114
4126
|
};
|
|
4115
4127
|
};
|
|
4116
4128
|
|
|
4117
|
-
/*! @azure/msal-common v16.
|
|
4129
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
4118
4130
|
|
|
4119
4131
|
/*
|
|
4120
4132
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4194,7 +4206,7 @@ class PopTokenGenerator {
|
|
|
4194
4206
|
}
|
|
4195
4207
|
}
|
|
4196
4208
|
|
|
4197
|
-
/*! @azure/msal-common v16.
|
|
4209
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
4198
4210
|
/*
|
|
4199
4211
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4200
4212
|
* Licensed under the MIT License.
|
|
@@ -4221,7 +4233,7 @@ class PopTokenGenerator {
|
|
|
4221
4233
|
}
|
|
4222
4234
|
}
|
|
4223
4235
|
|
|
4224
|
-
/*! @azure/msal-common v16.
|
|
4236
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
4225
4237
|
|
|
4226
4238
|
/*
|
|
4227
4239
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4480,7 +4492,7 @@ function isAuthorityMetadataExpired(metadata) {
|
|
|
4480
4492
|
return metadata.expiresAt <= nowSeconds();
|
|
4481
4493
|
}
|
|
4482
4494
|
|
|
4483
|
-
/*! @azure/msal-common v16.
|
|
4495
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
4484
4496
|
|
|
4485
4497
|
/*
|
|
4486
4498
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4665,6 +4677,11 @@ class ResponseHandler {
|
|
|
4665
4677
|
: undefined;
|
|
4666
4678
|
// non AAD scenarios can have empty realm
|
|
4667
4679
|
cachedAccessToken = createAccessTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.access_token, this.clientId, claimsTenantId || authority.tenant || "", responseScopes.printScopes(), tokenExpirationSeconds, extendedTokenExpirationSeconds, this.cryptoObj.base64Decode, refreshOnSeconds, serverTokenResponse.token_type, userAssertionHash, serverTokenResponse.key_id);
|
|
4680
|
+
// Set resource (to be used for MCP scenarios)
|
|
4681
|
+
const resource = request.resource || null;
|
|
4682
|
+
if (resource) {
|
|
4683
|
+
cachedAccessToken.resource = resource;
|
|
4684
|
+
}
|
|
4668
4685
|
}
|
|
4669
4686
|
// refreshToken
|
|
4670
4687
|
let cachedRefreshToken = null;
|
|
@@ -4816,7 +4833,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
|
|
|
4816
4833
|
return baseAccount;
|
|
4817
4834
|
}
|
|
4818
4835
|
|
|
4819
|
-
/*! @azure/msal-common v16.
|
|
4836
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
4820
4837
|
/*
|
|
4821
4838
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4822
4839
|
* Licensed under the MIT License.
|
|
@@ -4826,7 +4843,7 @@ const CcsCredentialType = {
|
|
|
4826
4843
|
UPN: "UPN",
|
|
4827
4844
|
};
|
|
4828
4845
|
|
|
4829
|
-
/*! @azure/msal-common v16.
|
|
4846
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
4830
4847
|
/*
|
|
4831
4848
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4832
4849
|
* Licensed under the MIT License.
|
|
@@ -4844,7 +4861,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint) {
|
|
|
4844
4861
|
}
|
|
4845
4862
|
}
|
|
4846
4863
|
|
|
4847
|
-
/*! @azure/msal-common v16.
|
|
4864
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
4848
4865
|
/*
|
|
4849
4866
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4850
4867
|
* Licensed under the MIT License.
|
|
@@ -4865,7 +4882,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
|
|
|
4865
4882
|
};
|
|
4866
4883
|
}
|
|
4867
4884
|
|
|
4868
|
-
/*! @azure/msal-common v16.
|
|
4885
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
4869
4886
|
|
|
4870
4887
|
/*
|
|
4871
4888
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4951,7 +4968,7 @@ class ThrottlingUtils {
|
|
|
4951
4968
|
}
|
|
4952
4969
|
}
|
|
4953
4970
|
|
|
4954
|
-
/*! @azure/msal-common v16.
|
|
4971
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
4955
4972
|
|
|
4956
4973
|
/*
|
|
4957
4974
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4982,7 +4999,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
|
|
|
4982
4999
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
4983
5000
|
}
|
|
4984
5001
|
|
|
4985
|
-
/*! @azure/msal-common v16.
|
|
5002
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
4986
5003
|
|
|
4987
5004
|
/*
|
|
4988
5005
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5096,7 +5113,7 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
|
|
|
5096
5113
|
return response;
|
|
5097
5114
|
}
|
|
5098
5115
|
|
|
5099
|
-
/*! @azure/msal-common v16.
|
|
5116
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
5100
5117
|
/*
|
|
5101
5118
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5102
5119
|
* Licensed under the MIT License.
|
|
@@ -5108,7 +5125,7 @@ function isOpenIdConfigResponse(response) {
|
|
|
5108
5125
|
response.hasOwnProperty("jwks_uri"));
|
|
5109
5126
|
}
|
|
5110
5127
|
|
|
5111
|
-
/*! @azure/msal-common v16.
|
|
5128
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
5112
5129
|
/*
|
|
5113
5130
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5114
5131
|
* Licensed under the MIT License.
|
|
@@ -5118,7 +5135,7 @@ function isCloudInstanceDiscoveryResponse(response) {
|
|
|
5118
5135
|
response.hasOwnProperty("metadata"));
|
|
5119
5136
|
}
|
|
5120
5137
|
|
|
5121
|
-
/*! @azure/msal-common v16.
|
|
5138
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
5122
5139
|
/*
|
|
5123
5140
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5124
5141
|
* Licensed under the MIT License.
|
|
@@ -5128,7 +5145,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
|
|
|
5128
5145
|
response.hasOwnProperty("error_description"));
|
|
5129
5146
|
}
|
|
5130
5147
|
|
|
5131
|
-
/*! @azure/msal-common v16.
|
|
5148
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
5132
5149
|
|
|
5133
5150
|
/*
|
|
5134
5151
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5233,7 +5250,7 @@ RegionDiscovery.IMDS_OPTIONS = {
|
|
|
5233
5250
|
},
|
|
5234
5251
|
};
|
|
5235
5252
|
|
|
5236
|
-
/*! @azure/msal-common v16.
|
|
5253
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
5237
5254
|
|
|
5238
5255
|
/*
|
|
5239
5256
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6056,7 +6073,7 @@ function buildStaticAuthorityOptions(authOptions) {
|
|
|
6056
6073
|
};
|
|
6057
6074
|
}
|
|
6058
6075
|
|
|
6059
|
-
/*! @azure/msal-common v16.
|
|
6076
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
6060
6077
|
|
|
6061
6078
|
/*
|
|
6062
6079
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6090,7 +6107,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
|
|
|
6090
6107
|
}
|
|
6091
6108
|
}
|
|
6092
6109
|
|
|
6093
|
-
/*! @azure/msal-common v16.
|
|
6110
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
6094
6111
|
|
|
6095
6112
|
/*
|
|
6096
6113
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6210,6 +6227,7 @@ class AuthorizationCodeClient {
|
|
|
6210
6227
|
}
|
|
6211
6228
|
// Add scope array, parameter builder will add default scopes and dedupe
|
|
6212
6229
|
addScopes(parameters, request.scopes, true, this.oidcDefaultScopes);
|
|
6230
|
+
addResource(parameters, request.resource);
|
|
6213
6231
|
// add code: user set, not validated
|
|
6214
6232
|
addAuthorizationCode(parameters, request.code);
|
|
6215
6233
|
// Add library metadata
|
|
@@ -6350,7 +6368,7 @@ class AuthorizationCodeClient {
|
|
|
6350
6368
|
}
|
|
6351
6369
|
}
|
|
6352
6370
|
|
|
6353
|
-
/*! @azure/msal-common v16.
|
|
6371
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
6354
6372
|
|
|
6355
6373
|
/*
|
|
6356
6374
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6575,7 +6593,7 @@ class RefreshTokenClient {
|
|
|
6575
6593
|
}
|
|
6576
6594
|
}
|
|
6577
6595
|
|
|
6578
|
-
/*! @azure/msal-common v16.
|
|
6596
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
6579
6597
|
|
|
6580
6598
|
/*
|
|
6581
6599
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6631,6 +6649,13 @@ class SilentFlowClient {
|
|
|
6631
6649
|
this.setCacheOutcome(CacheOutcome.CACHED_ACCESS_TOKEN_EXPIRED, request.correlationId);
|
|
6632
6650
|
throw createClientAuthError(tokenRefreshRequired);
|
|
6633
6651
|
}
|
|
6652
|
+
else if (request.resource) {
|
|
6653
|
+
// cached access token must have a resource that matches the request resource for MCP scenarios
|
|
6654
|
+
if (cachedAccessToken.resource !== request.resource) {
|
|
6655
|
+
this.setCacheOutcome(CacheOutcome.NO_CACHED_ACCESS_TOKEN, request.correlationId);
|
|
6656
|
+
throw createClientAuthError(tokenRefreshRequired);
|
|
6657
|
+
}
|
|
6658
|
+
}
|
|
6634
6659
|
else if (cachedAccessToken.refreshOn &&
|
|
6635
6660
|
isTokenExpired(cachedAccessToken.refreshOn, 0)) {
|
|
6636
6661
|
// must refresh (in the background) due to the refresh_in value
|
|
@@ -6684,7 +6709,7 @@ class SilentFlowClient {
|
|
|
6684
6709
|
}
|
|
6685
6710
|
}
|
|
6686
6711
|
|
|
6687
|
-
/*! @azure/msal-common v16.
|
|
6712
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
6688
6713
|
|
|
6689
6714
|
/*
|
|
6690
6715
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6710,6 +6735,7 @@ function getStandardAuthorizeRequestParameters(authOptions, request, logger, per
|
|
|
6710
6735
|
...(request.extraScopesToConsent || []),
|
|
6711
6736
|
];
|
|
6712
6737
|
addScopes(parameters, requestScopes, true, authOptions.authority.options.OIDCOptions?.defaultScopes);
|
|
6738
|
+
addResource(parameters, request.resource);
|
|
6713
6739
|
addRedirectUri(parameters, request.redirectUri);
|
|
6714
6740
|
addCorrelationId(parameters, correlationId);
|
|
6715
6741
|
// add response_mode. If not passed in it defaults to query.
|
|
@@ -6834,7 +6860,40 @@ function extractLoginHint(account) {
|
|
|
6834
6860
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
6835
6861
|
}
|
|
6836
6862
|
|
|
6837
|
-
/*! @azure/msal-common v16.
|
|
6863
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
6864
|
+
|
|
6865
|
+
/*
|
|
6866
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6867
|
+
* Licensed under the MIT License.
|
|
6868
|
+
*/
|
|
6869
|
+
/**
|
|
6870
|
+
* Helper to enforce resource parameter presence in token requests when isMcp is set in the configuration.
|
|
6871
|
+
* If resource parameter is set in both the request and in extraQueryParameters or extraParameters, an error will be thrown.
|
|
6872
|
+
* This is used for MCP flows.
|
|
6873
|
+
* @param isMcp - Flag indicating if application is an MCP app, from configuration
|
|
6874
|
+
* @param request - Auth request
|
|
6875
|
+
*/
|
|
6876
|
+
function enforceResourceParameter(isMcp, request) {
|
|
6877
|
+
if (!isMcp) {
|
|
6878
|
+
return;
|
|
6879
|
+
}
|
|
6880
|
+
if (request.resource &&
|
|
6881
|
+
(containsResourceParam(request.extraParameters) ||
|
|
6882
|
+
containsResourceParam(request.extraQueryParameters))) {
|
|
6883
|
+
throw createClientAuthError(misplacedResourceParam);
|
|
6884
|
+
}
|
|
6885
|
+
if (!request.resource) {
|
|
6886
|
+
throw createClientAuthError(resourceParameterRequired);
|
|
6887
|
+
}
|
|
6888
|
+
}
|
|
6889
|
+
function containsResourceParam(params) {
|
|
6890
|
+
if (!params) {
|
|
6891
|
+
return false;
|
|
6892
|
+
}
|
|
6893
|
+
return Object.prototype.hasOwnProperty.call(params, "resource");
|
|
6894
|
+
}
|
|
6895
|
+
|
|
6896
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
6838
6897
|
/*
|
|
6839
6898
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6840
6899
|
* Licensed under the MIT License.
|
|
@@ -6851,7 +6910,7 @@ var AuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
6851
6910
|
unexpectedError: unexpectedError
|
|
6852
6911
|
});
|
|
6853
6912
|
|
|
6854
|
-
/*! @azure/msal-common v16.
|
|
6913
|
+
/*! @azure/msal-common v16.3.0 2026-03-13 */
|
|
6855
6914
|
|
|
6856
6915
|
/*
|
|
6857
6916
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7208,6 +7267,7 @@ class Deserializer {
|
|
|
7208
7267
|
keyId: serializedAT.key_id,
|
|
7209
7268
|
tokenType: serializedAT.token_type,
|
|
7210
7269
|
userAssertionHash: serializedAT.userAssertionHash,
|
|
7270
|
+
resource: serializedAT.resource,
|
|
7211
7271
|
lastUpdatedAt: Date.now().toString(),
|
|
7212
7272
|
};
|
|
7213
7273
|
atObjects[key] = accessToken;
|
|
@@ -7851,6 +7911,7 @@ const DEFAULT_AUTH_OPTIONS = {
|
|
|
7851
7911
|
azureCloudInstance: AzureCloudInstance.None,
|
|
7852
7912
|
tenant: "",
|
|
7853
7913
|
},
|
|
7914
|
+
isMcp: false,
|
|
7854
7915
|
};
|
|
7855
7916
|
const DEFAULT_LOGGER_OPTIONS = {
|
|
7856
7917
|
loggerCallback: () => {
|
|
@@ -9052,7 +9113,7 @@ class ClientAssertion {
|
|
|
9052
9113
|
|
|
9053
9114
|
/* eslint-disable header/header */
|
|
9054
9115
|
const name = "@azure/msal-node";
|
|
9055
|
-
const version = "5.0
|
|
9116
|
+
const version = "5.1.0";
|
|
9056
9117
|
|
|
9057
9118
|
/*
|
|
9058
9119
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -9505,6 +9566,7 @@ class ClientApplication {
|
|
|
9505
9566
|
authority: discoveredAuthority,
|
|
9506
9567
|
clientCapabilities: this.config.auth.clientCapabilities,
|
|
9507
9568
|
redirectUri,
|
|
9569
|
+
isMcp: this.config.auth.isMcp,
|
|
9508
9570
|
},
|
|
9509
9571
|
loggerOptions: {
|
|
9510
9572
|
logLevel: this.config.system.loggerOptions.logLevel,
|
|
@@ -9956,6 +10018,7 @@ class PublicClientApplication extends ClientApplication {
|
|
|
9956
10018
|
*/
|
|
9957
10019
|
async acquireTokenByDeviceCode(request) {
|
|
9958
10020
|
this.logger.info("acquireTokenByDeviceCode called", request.correlationId || "");
|
|
10021
|
+
enforceResourceParameter(this.config.auth.isMcp, request);
|
|
9959
10022
|
const validRequest = Object.assign(request, await this.initializeBaseRequest(request));
|
|
9960
10023
|
const serverTelemetryManager = this.initializeServerTelemetryManager(ApiId.acquireTokenByDeviceCode, validRequest.correlationId);
|
|
9961
10024
|
try {
|
|
@@ -9979,6 +10042,7 @@ class PublicClientApplication extends ClientApplication {
|
|
|
9979
10042
|
async acquireTokenInteractive(request) {
|
|
9980
10043
|
const correlationId = request.correlationId || this.cryptoProvider.createNewGuid();
|
|
9981
10044
|
this.logger.trace("acquireTokenInteractive called", correlationId);
|
|
10045
|
+
enforceResourceParameter(this.config.auth.isMcp, request);
|
|
9982
10046
|
const { openBrowser, successTemplate, errorTemplate, windowHandle, loopbackClient: customLoopbackClient, ...remainingProperties } = request;
|
|
9983
10047
|
if (this.nativeBrokerPlugin) {
|
|
9984
10048
|
const brokerRequest = {
|
|
@@ -10063,6 +10127,7 @@ class PublicClientApplication extends ClientApplication {
|
|
|
10063
10127
|
async acquireTokenSilent(request) {
|
|
10064
10128
|
const correlationId = request.correlationId || this.cryptoProvider.createNewGuid();
|
|
10065
10129
|
this.logger.trace("acquireTokenSilent called", correlationId);
|
|
10130
|
+
enforceResourceParameter(this.config.auth.isMcp, request);
|
|
10066
10131
|
if (this.nativeBrokerPlugin) {
|
|
10067
10132
|
const brokerRequest = {
|
|
10068
10133
|
...request,
|
|
@@ -10090,6 +10155,22 @@ class PublicClientApplication extends ClientApplication {
|
|
|
10090
10155
|
}
|
|
10091
10156
|
return super.acquireTokenSilent(request);
|
|
10092
10157
|
}
|
|
10158
|
+
/**
|
|
10159
|
+
* Acquires a token by exchanging the authorization code received from the first step of OAuth 2.0 Authorization Code Flow.
|
|
10160
|
+
* In MCP mode, a resource parameter is required on the request.
|
|
10161
|
+
*/
|
|
10162
|
+
async acquireTokenByCode(request, authCodePayLoad) {
|
|
10163
|
+
enforceResourceParameter(this.config.auth.isMcp, request);
|
|
10164
|
+
return super.acquireTokenByCode(request, authCodePayLoad);
|
|
10165
|
+
}
|
|
10166
|
+
/**
|
|
10167
|
+
* Acquires a token by exchanging the refresh token provided for a new set of tokens.
|
|
10168
|
+
* In MCP mode, a resource parameter is required on the request.
|
|
10169
|
+
*/
|
|
10170
|
+
async acquireTokenByRefreshToken(request) {
|
|
10171
|
+
enforceResourceParameter(this.config.auth.isMcp, request);
|
|
10172
|
+
return super.acquireTokenByRefreshToken(request);
|
|
10173
|
+
}
|
|
10093
10174
|
/**
|
|
10094
10175
|
* Removes cache artifacts associated with the given account
|
|
10095
10176
|
* @param request - developer provided SignOutRequest
|