@azure/msal-node-extensions 1.5.21 → 1.5.22
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/bin/arm64/dpapi.node +0 -0
- package/bin/ia32/dpapi.node +0 -0
- package/bin/x64/dpapi.node +0 -0
- package/dist/Dpapi.mjs +1 -1
- package/dist/broker/NativeBrokerPlugin.mjs +16 -8
- package/dist/broker/NativeBrokerPlugin.mjs.map +1 -1
- package/dist/error/NativeAuthError.d.ts +1 -1
- package/dist/error/NativeAuthError.mjs +3 -2
- package/dist/error/NativeAuthError.mjs.map +1 -1
- package/dist/error/PersistenceError.mjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/lib/msal-common/dist/constants/AADServerParamKeys.mjs +2 -2
- package/dist/lib/msal-common/dist/constants/AADServerParamKeys.mjs.map +1 -1
- package/dist/lib/msal-common/dist/error/AuthError.mjs +2 -2
- package/dist/lib/msal-common/dist/error/AuthError.mjs.map +1 -1
- package/dist/lib/msal-common/dist/error/ClientAuthError.mjs +2 -2
- package/dist/lib/msal-common/dist/error/ClientAuthError.mjs.map +1 -1
- package/dist/lib/msal-common/dist/error/ClientAuthErrorCodes.mjs +2 -2
- package/dist/lib/msal-common/dist/error/ClientAuthErrorCodes.mjs.map +1 -1
- package/dist/lib/msal-common/dist/error/ClientConfigurationError.mjs +2 -2
- package/dist/lib/msal-common/dist/error/ClientConfigurationError.mjs.map +1 -1
- package/dist/lib/msal-common/dist/error/ClientConfigurationErrorCodes.mjs +2 -2
- package/dist/lib/msal-common/dist/error/ClientConfigurationErrorCodes.mjs.map +1 -1
- package/dist/lib/msal-common/dist/error/InteractionRequiredAuthError.mjs +2 -2
- package/dist/lib/msal-common/dist/error/InteractionRequiredAuthError.mjs.map +1 -1
- package/dist/lib/msal-common/dist/error/ServerError.mjs +2 -2
- package/dist/lib/msal-common/dist/error/ServerError.mjs.map +1 -1
- package/dist/lib/msal-common/dist/logger/Logger.mjs +2 -2
- package/dist/lib/msal-common/dist/logger/Logger.mjs.map +1 -1
- package/dist/lib/msal-common/dist/telemetry/server/ServerTelemetryManager.mjs +2 -2
- package/dist/lib/msal-common/dist/telemetry/server/ServerTelemetryManager.mjs.map +1 -1
- package/dist/lib/msal-common/dist/utils/Constants.mjs +2 -2
- package/dist/lib/msal-common/dist/utils/Constants.mjs.map +1 -1
- package/dist/lib/msal-common/dist/utils/TimeUtils.mjs +2 -2
- package/dist/lib/msal-common/dist/utils/TimeUtils.mjs.map +1 -1
- package/dist/lock/CrossPlatformLock.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/persistence/BasePersistence.mjs +1 -1
- package/dist/persistence/DataProtectionScope.mjs +1 -1
- package/dist/persistence/FilePersistence.mjs +1 -1
- package/dist/persistence/FilePersistenceWithDataProtection.mjs +1 -1
- package/dist/persistence/KeychainPersistence.mjs +1 -1
- package/dist/persistence/LibSecretPersistence.mjs +1 -1
- package/dist/persistence/PersistenceCachePlugin.mjs +1 -1
- package/dist/persistence/PersistenceCreator.mjs +1 -1
- package/dist/utils/Constants.mjs +1 -1
- package/dist/utils/Environment.mjs +1 -1
- package/dist/utils/StringUtils.d.ts +8 -0
- package/dist/utils/StringUtils.mjs +32 -0
- package/dist/utils/StringUtils.mjs.map +1 -0
- package/dist/utils/TypeGuards.mjs +1 -1
- package/lib/msal-node-extensions.cjs +58 -22
- package/lib/msal-node-extensions.cjs.map +1 -1
- package/lib/types/error/NativeAuthError.d.ts +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/packageMetadata.d.ts +1 -1
- package/lib/types/utils/StringUtils.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-node-extensions v1.5.
|
|
1
|
+
/*! @azure/msal-node-extensions v1.5.22 2025-08-27 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -343,7 +343,7 @@ class PersistenceCachePlugin {
|
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
-
/*! @azure/msal-common v15.12.0 2025-08-
|
|
346
|
+
/*! @azure/msal-common v15.12.0 2025-08-27 */
|
|
347
347
|
/*
|
|
348
348
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
349
349
|
* Licensed under the MIT License.
|
|
@@ -444,7 +444,7 @@ const CacheOutcome = {
|
|
|
444
444
|
// When a token is found in the cache or the cache is not supposed to be hit when making the request
|
|
445
445
|
NOT_APPLICABLE: "0"};
|
|
446
446
|
|
|
447
|
-
/*! @azure/msal-common v15.12.0 2025-08-
|
|
447
|
+
/*! @azure/msal-common v15.12.0 2025-08-27 */
|
|
448
448
|
/**
|
|
449
449
|
* General error class thrown by the MSAL.js library.
|
|
450
450
|
*/
|
|
@@ -465,7 +465,7 @@ class AuthError extends Error {
|
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
467
|
|
|
468
|
-
/*! @azure/msal-common v15.12.0 2025-08-
|
|
468
|
+
/*! @azure/msal-common v15.12.0 2025-08-27 */
|
|
469
469
|
/*
|
|
470
470
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
471
471
|
* Licensed under the MIT License.
|
|
@@ -515,7 +515,7 @@ const missingTenantIdError = "missing_tenant_id_error";
|
|
|
515
515
|
const methodNotImplemented = "method_not_implemented";
|
|
516
516
|
const nestedAppAuthBridgeDisabled = "nested_app_auth_bridge_disabled";
|
|
517
517
|
|
|
518
|
-
/*! @azure/msal-common v15.12.0 2025-08-
|
|
518
|
+
/*! @azure/msal-common v15.12.0 2025-08-27 */
|
|
519
519
|
|
|
520
520
|
/*
|
|
521
521
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -589,7 +589,7 @@ function createClientAuthError(errorCode, additionalMessage) {
|
|
|
589
589
|
return new ClientAuthError(errorCode, additionalMessage);
|
|
590
590
|
}
|
|
591
591
|
|
|
592
|
-
/*! @azure/msal-common v15.12.0 2025-08-
|
|
592
|
+
/*! @azure/msal-common v15.12.0 2025-08-27 */
|
|
593
593
|
|
|
594
594
|
/*
|
|
595
595
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -780,7 +780,7 @@ class Logger {
|
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
782
|
|
|
783
|
-
/*! @azure/msal-common v15.12.0 2025-08-
|
|
783
|
+
/*! @azure/msal-common v15.12.0 2025-08-27 */
|
|
784
784
|
/*
|
|
785
785
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
786
786
|
* Licensed under the MIT License.
|
|
@@ -809,7 +809,7 @@ const authorityMismatch = "authority_mismatch";
|
|
|
809
809
|
const invalidRequestMethodForEAR = "invalid_request_method_for_EAR";
|
|
810
810
|
const invalidAuthorizePostBodyParameters = "invalid_authorize_post_body_parameters";
|
|
811
811
|
|
|
812
|
-
/*! @azure/msal-common v15.12.0 2025-08-
|
|
812
|
+
/*! @azure/msal-common v15.12.0 2025-08-27 */
|
|
813
813
|
|
|
814
814
|
/*
|
|
815
815
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -854,10 +854,10 @@ function createClientConfigurationError(errorCode) {
|
|
|
854
854
|
return new ClientConfigurationError(errorCode);
|
|
855
855
|
}
|
|
856
856
|
|
|
857
|
-
/*! @azure/msal-common v15.12.0 2025-08-
|
|
857
|
+
/*! @azure/msal-common v15.12.0 2025-08-27 */
|
|
858
858
|
const X_CLIENT_EXTRA_SKU = "x-client-xtra-sku";
|
|
859
859
|
|
|
860
|
-
/*! @azure/msal-common v15.12.0 2025-08-
|
|
860
|
+
/*! @azure/msal-common v15.12.0 2025-08-27 */
|
|
861
861
|
/**
|
|
862
862
|
* Convert seconds to JS Date object. Seconds can be in a number or string format or undefined (will still return a date).
|
|
863
863
|
* @param seconds
|
|
@@ -869,7 +869,7 @@ function toDateFromSeconds(seconds) {
|
|
|
869
869
|
return new Date();
|
|
870
870
|
}
|
|
871
871
|
|
|
872
|
-
/*! @azure/msal-common v15.12.0 2025-08-
|
|
872
|
+
/*! @azure/msal-common v15.12.0 2025-08-27 */
|
|
873
873
|
|
|
874
874
|
/*
|
|
875
875
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -888,7 +888,7 @@ class ServerError extends AuthError {
|
|
|
888
888
|
}
|
|
889
889
|
}
|
|
890
890
|
|
|
891
|
-
/*! @azure/msal-common v15.12.0 2025-08-
|
|
891
|
+
/*! @azure/msal-common v15.12.0 2025-08-27 */
|
|
892
892
|
/**
|
|
893
893
|
* Error thrown when user interaction is required.
|
|
894
894
|
*/
|
|
@@ -905,7 +905,7 @@ class InteractionRequiredAuthError extends AuthError {
|
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
907
|
|
|
908
|
-
/*! @azure/msal-common v15.12.0 2025-08-
|
|
908
|
+
/*! @azure/msal-common v15.12.0 2025-08-27 */
|
|
909
909
|
|
|
910
910
|
/*
|
|
911
911
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1789,6 +1789,34 @@ class PersistenceCreator {
|
|
|
1789
1789
|
}
|
|
1790
1790
|
}
|
|
1791
1791
|
|
|
1792
|
+
/*
|
|
1793
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1794
|
+
* Licensed under the MIT License.
|
|
1795
|
+
*/
|
|
1796
|
+
class StringUtils {
|
|
1797
|
+
/**
|
|
1798
|
+
* Converts a numeric tag to a string representation
|
|
1799
|
+
* @param tag - The numeric tag to convert
|
|
1800
|
+
* @returns The string representation of the tag
|
|
1801
|
+
*/
|
|
1802
|
+
static tagToString(tag) {
|
|
1803
|
+
if (tag === 0) {
|
|
1804
|
+
return "UNTAG";
|
|
1805
|
+
}
|
|
1806
|
+
const tagSymbolSpace = "abcdefghijklmnopqrstuvwxyz0123456789****************************";
|
|
1807
|
+
let tagBuffer = "*****";
|
|
1808
|
+
const chars = [
|
|
1809
|
+
tagSymbolSpace[(tag >> 24) & 0x3f],
|
|
1810
|
+
tagSymbolSpace[(tag >> 18) & 0x3f],
|
|
1811
|
+
tagSymbolSpace[(tag >> 12) & 0x3f],
|
|
1812
|
+
tagSymbolSpace[(tag >> 6) & 0x3f],
|
|
1813
|
+
tagSymbolSpace[(tag >> 0) & 0x3f],
|
|
1814
|
+
];
|
|
1815
|
+
tagBuffer = chars.join("");
|
|
1816
|
+
return tagBuffer;
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1792
1820
|
/*
|
|
1793
1821
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1794
1822
|
* Licensed under the MIT License.
|
|
@@ -1798,14 +1826,14 @@ class NativeAuthError extends AuthError {
|
|
|
1798
1826
|
super(errorStatus, errorContext);
|
|
1799
1827
|
this.name = "NativeAuthError";
|
|
1800
1828
|
this.statusCode = errorCode;
|
|
1801
|
-
this.tag = errorTag;
|
|
1829
|
+
this.tag = StringUtils.tagToString(errorTag);
|
|
1802
1830
|
Object.setPrototypeOf(this, NativeAuthError.prototype);
|
|
1803
1831
|
}
|
|
1804
1832
|
}
|
|
1805
1833
|
|
|
1806
1834
|
/* eslint-disable header/header */
|
|
1807
1835
|
const name = "@azure/msal-node-extensions";
|
|
1808
|
-
const version = "1.5.
|
|
1836
|
+
const version = "1.5.22";
|
|
1809
1837
|
|
|
1810
1838
|
/*
|
|
1811
1839
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1933,10 +1961,13 @@ class NativeBrokerPlugin {
|
|
|
1933
1961
|
async acquireTokenSilent(request) {
|
|
1934
1962
|
this.logger.trace("NativeBrokerPlugin - acquireTokenSilent called", request.correlationId);
|
|
1935
1963
|
const platformRequest = request;
|
|
1964
|
+
if (!platformRequest.redirectUri) {
|
|
1965
|
+
platformRequest.redirectUri =
|
|
1966
|
+
this.chooseRedirectUriByPlatform(platformRequest);
|
|
1967
|
+
this.logger.info("NativeBrokerPlugin - No Redirect URI provided, using default", platformRequest.redirectUri);
|
|
1968
|
+
}
|
|
1936
1969
|
const authParams = this.generateRequestParameters(platformRequest);
|
|
1937
1970
|
const account = await this.getAccount(platformRequest);
|
|
1938
|
-
platformRequest.redirectUri =
|
|
1939
|
-
this.chooseRedirectUriByPlatform(platformRequest);
|
|
1940
1971
|
return new Promise((resolve, reject) => {
|
|
1941
1972
|
const resultCallback = (result) => {
|
|
1942
1973
|
try {
|
|
@@ -1971,9 +2002,12 @@ class NativeBrokerPlugin {
|
|
|
1971
2002
|
async acquireTokenInteractive(request, providedWindowHandle) {
|
|
1972
2003
|
this.logger.trace("NativeBrokerPlugin - acquireTokenInteractive called", request.correlationId);
|
|
1973
2004
|
const platformRequest = request;
|
|
2005
|
+
if (!platformRequest.redirectUri) {
|
|
2006
|
+
platformRequest.redirectUri =
|
|
2007
|
+
this.chooseRedirectUriByPlatform(platformRequest);
|
|
2008
|
+
this.logger.info("NativeBrokerPlugin - No Redirect URI provided, using default", platformRequest.redirectUri);
|
|
2009
|
+
}
|
|
1974
2010
|
const authParams = this.generateRequestParameters(platformRequest);
|
|
1975
|
-
platformRequest.redirectUri =
|
|
1976
|
-
this.chooseRedirectUriByPlatform(platformRequest);
|
|
1977
2011
|
const account = await this.getAccount(platformRequest);
|
|
1978
2012
|
const windowHandle = providedWindowHandle || Buffer.from([0]);
|
|
1979
2013
|
return new Promise((resolve, reject) => {
|
|
@@ -2103,7 +2137,7 @@ class NativeBrokerPlugin {
|
|
|
2103
2137
|
const authParams = new msalNodeRuntime.msalNodeRuntime.AuthParameters();
|
|
2104
2138
|
try {
|
|
2105
2139
|
authParams.CreateAuthParameters(request.clientId, request.authority);
|
|
2106
|
-
authParams.SetRedirectUri(
|
|
2140
|
+
authParams.SetRedirectUri(request.redirectUri);
|
|
2107
2141
|
authParams.SetRequestedScopes(request.scopes.join(" "));
|
|
2108
2142
|
if (request.claims) {
|
|
2109
2143
|
authParams.SetDecodedClaims(request.claims);
|
|
@@ -2228,9 +2262,10 @@ class NativeBrokerPlugin {
|
|
|
2228
2262
|
typeof error === "object" &&
|
|
2229
2263
|
this.isMsalRuntimeError(error)) {
|
|
2230
2264
|
const { errorCode, errorStatus, errorContext, errorTag } = error;
|
|
2265
|
+
const tagString = StringUtils.tagToString(errorTag);
|
|
2231
2266
|
const enhancedErrorContext = errorContext
|
|
2232
|
-
? `${errorContext} (Error Code: ${errorCode}, Tag: ${
|
|
2233
|
-
: `(Error Code: ${errorCode}, Tag: ${
|
|
2267
|
+
? `${errorContext} (Error Code: ${errorCode}, Tag: ${tagString})`
|
|
2268
|
+
: `(Error Code: ${errorCode}, Tag: ${tagString})`;
|
|
2234
2269
|
switch (errorStatus) {
|
|
2235
2270
|
case msalNodeRuntime.ErrorStatus.InteractionRequired:
|
|
2236
2271
|
case msalNodeRuntime.ErrorStatus.AccountUnusable:
|
|
@@ -2266,4 +2301,5 @@ exports.LibSecretPersistence = LibSecretPersistence;
|
|
|
2266
2301
|
exports.NativeBrokerPlugin = NativeBrokerPlugin;
|
|
2267
2302
|
exports.PersistenceCachePlugin = PersistenceCachePlugin;
|
|
2268
2303
|
exports.PersistenceCreator = PersistenceCreator;
|
|
2304
|
+
exports.StringUtils = StringUtils;
|
|
2269
2305
|
//# sourceMappingURL=msal-node-extensions.cjs.map
|