@azure/msal-browser 3.15.0 → 3.17.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/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientNext.mjs +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.mjs +1 -1
- package/dist/broker/nativeBroker/NativeRequest.d.ts +1 -0
- package/dist/broker/nativeBroker/NativeRequest.d.ts.map +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.mjs +1 -1
- package/dist/cache/BrowserStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/controllers/ControllerFactory.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.d.ts.map +1 -1
- package/dist/controllers/StandardController.mjs +58 -37
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.d.ts +11 -0
- package/dist/crypto/CryptoOps.d.ts.map +1 -1
- package/dist/crypto/CryptoOps.mjs +16 -1
- package/dist/crypto/CryptoOps.mjs.map +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/encode/Base64Decode.mjs +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.d.ts +5 -0
- package/dist/error/BrowserAuthError.d.ts.map +1 -1
- package/dist/error/BrowserAuthError.mjs +7 -2
- package/dist/error/BrowserAuthError.mjs.map +1 -1
- package/dist/error/BrowserAuthErrorCodes.d.ts +1 -0
- package/dist/error/BrowserAuthErrorCodes.d.ts.map +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +3 -2
- package/dist/error/BrowserAuthErrorCodes.mjs.map +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/error/NativeAuthError.mjs +1 -1
- package/dist/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/error/NestedAppAuthError.mjs +1 -1
- package/dist/event/EventHandler.mjs +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/NativeInteractionClient.d.ts +4 -3
- package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.mjs +34 -14
- package/dist/interaction_client/NativeInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +1 -1
- package/dist/interaction_client/RedirectClient.mjs +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/RedirectHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/request/RequestHelpers.mjs +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/utils/BrowserConstants.mjs +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/lib/msal-browser.cjs +229 -127
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +229 -127
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +61 -61
- package/package.json +2 -2
- package/src/broker/nativeBroker/NativeRequest.ts +1 -0
- package/src/controllers/StandardController.ts +89 -63
- package/src/crypto/CryptoOps.ts +17 -0
- package/src/error/BrowserAuthError.ts +8 -0
- package/src/error/BrowserAuthErrorCodes.ts +1 -0
- package/src/interaction_client/NativeInteractionClient.ts +55 -18
- package/src/packageMetadata.ts +1 -1
package/lib/msal-browser.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @azure/msal-browser v3.
|
|
1
|
+
/*! @azure/msal-browser v3.17.0 2024-06-10 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
/*! @azure/msal-common v14.
|
|
5
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6
6
|
/*
|
|
7
7
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8
8
|
* Licensed under the MIT License.
|
|
@@ -310,7 +310,7 @@ const JsonWebTokenTypes = {
|
|
|
310
310
|
// Token renewal offset default in seconds
|
|
311
311
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
312
312
|
|
|
313
|
-
/*! @azure/msal-common v14.
|
|
313
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
314
314
|
/*
|
|
315
315
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
316
316
|
* Licensed under the MIT License.
|
|
@@ -327,7 +327,7 @@ var AuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
327
327
|
unexpectedError: unexpectedError
|
|
328
328
|
});
|
|
329
329
|
|
|
330
|
-
/*! @azure/msal-common v14.
|
|
330
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
331
331
|
|
|
332
332
|
/*
|
|
333
333
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -376,7 +376,7 @@ function createAuthError(code, additionalMessage) {
|
|
|
376
376
|
: AuthErrorMessages[code]);
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
-
/*! @azure/msal-common v14.
|
|
379
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
380
380
|
/*
|
|
381
381
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
382
382
|
* Licensed under the MIT License.
|
|
@@ -474,7 +474,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
474
474
|
userTimeoutReached: userTimeoutReached
|
|
475
475
|
});
|
|
476
476
|
|
|
477
|
-
/*! @azure/msal-common v14.
|
|
477
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
478
478
|
|
|
479
479
|
/*
|
|
480
480
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -726,7 +726,7 @@ function createClientAuthError(errorCode, additionalMessage) {
|
|
|
726
726
|
return new ClientAuthError(errorCode, additionalMessage);
|
|
727
727
|
}
|
|
728
728
|
|
|
729
|
-
/*! @azure/msal-common v14.
|
|
729
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
730
730
|
|
|
731
731
|
/*
|
|
732
732
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -787,7 +787,7 @@ function checkMaxAge(authTime, maxAge) {
|
|
|
787
787
|
}
|
|
788
788
|
}
|
|
789
789
|
|
|
790
|
-
/*! @azure/msal-common v14.
|
|
790
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
791
791
|
/*
|
|
792
792
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
793
793
|
* Licensed under the MIT License.
|
|
@@ -802,7 +802,7 @@ const AuthorityType = {
|
|
|
802
802
|
Ciam: 3,
|
|
803
803
|
};
|
|
804
804
|
|
|
805
|
-
/*! @azure/msal-common v14.
|
|
805
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
806
806
|
/*
|
|
807
807
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
808
808
|
* Licensed under the MIT License.
|
|
@@ -814,7 +814,7 @@ function isOpenIdConfigResponse(response) {
|
|
|
814
814
|
response.hasOwnProperty("jwks_uri"));
|
|
815
815
|
}
|
|
816
816
|
|
|
817
|
-
/*! @azure/msal-common v14.
|
|
817
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
818
818
|
/*
|
|
819
819
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
820
820
|
* Licensed under the MIT License.
|
|
@@ -868,7 +868,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
868
868
|
urlParseError: urlParseError
|
|
869
869
|
});
|
|
870
870
|
|
|
871
|
-
/*! @azure/msal-common v14.
|
|
871
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
872
872
|
|
|
873
873
|
/*
|
|
874
874
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1006,7 +1006,7 @@ function createClientConfigurationError(errorCode) {
|
|
|
1006
1006
|
return new ClientConfigurationError(errorCode);
|
|
1007
1007
|
}
|
|
1008
1008
|
|
|
1009
|
-
/*! @azure/msal-common v14.
|
|
1009
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1010
1010
|
/*
|
|
1011
1011
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1012
1012
|
* Licensed under the MIT License.
|
|
@@ -1103,7 +1103,7 @@ class StringUtils {
|
|
|
1103
1103
|
}
|
|
1104
1104
|
}
|
|
1105
1105
|
|
|
1106
|
-
/*! @azure/msal-common v14.
|
|
1106
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1107
1107
|
|
|
1108
1108
|
/*
|
|
1109
1109
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1150,7 +1150,7 @@ function getDeserializedResponse(responseString) {
|
|
|
1150
1150
|
return null;
|
|
1151
1151
|
}
|
|
1152
1152
|
|
|
1153
|
-
/*! @azure/msal-common v14.
|
|
1153
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1154
1154
|
|
|
1155
1155
|
/*
|
|
1156
1156
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1314,7 +1314,7 @@ class UrlString {
|
|
|
1314
1314
|
}
|
|
1315
1315
|
}
|
|
1316
1316
|
|
|
1317
|
-
/*! @azure/msal-common v14.
|
|
1317
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1318
1318
|
|
|
1319
1319
|
/*
|
|
1320
1320
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1454,7 +1454,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
1454
1454
|
return null;
|
|
1455
1455
|
}
|
|
1456
1456
|
|
|
1457
|
-
/*! @azure/msal-common v14.
|
|
1457
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1458
1458
|
/*
|
|
1459
1459
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1460
1460
|
* Licensed under the MIT License.
|
|
@@ -1467,7 +1467,7 @@ const ProtocolMode = {
|
|
|
1467
1467
|
OIDC: "OIDC",
|
|
1468
1468
|
};
|
|
1469
1469
|
|
|
1470
|
-
/*! @azure/msal-common v14.
|
|
1470
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1471
1471
|
/*
|
|
1472
1472
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1473
1473
|
* Licensed under the MIT License.
|
|
@@ -1487,7 +1487,7 @@ const AzureCloudInstance = {
|
|
|
1487
1487
|
AzureUsGovernment: "https://login.microsoftonline.us",
|
|
1488
1488
|
};
|
|
1489
1489
|
|
|
1490
|
-
/*! @azure/msal-common v14.
|
|
1490
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1491
1491
|
/*
|
|
1492
1492
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1493
1493
|
* Licensed under the MIT License.
|
|
@@ -1497,7 +1497,7 @@ function isCloudInstanceDiscoveryResponse(response) {
|
|
|
1497
1497
|
response.hasOwnProperty("metadata"));
|
|
1498
1498
|
}
|
|
1499
1499
|
|
|
1500
|
-
/*! @azure/msal-common v14.
|
|
1500
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1501
1501
|
/*
|
|
1502
1502
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1503
1503
|
* Licensed under the MIT License.
|
|
@@ -1507,7 +1507,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
|
|
|
1507
1507
|
response.hasOwnProperty("error_description"));
|
|
1508
1508
|
}
|
|
1509
1509
|
|
|
1510
|
-
/*! @azure/msal-common v14.
|
|
1510
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1511
1511
|
/*
|
|
1512
1512
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1513
1513
|
* Licensed under the MIT License.
|
|
@@ -1544,9 +1544,16 @@ const PerformanceEvents = {
|
|
|
1544
1544
|
* Used to acquire a new access token interactively through pop ups
|
|
1545
1545
|
*/
|
|
1546
1546
|
AcquireTokenPopup: "acquireTokenPopup",
|
|
1547
|
+
/**
|
|
1548
|
+
* acquireTokenPreRedirect (msal-browser).
|
|
1549
|
+
* First part of the redirect flow.
|
|
1550
|
+
* Used to acquire a new access token interactively through redirects.
|
|
1551
|
+
*/
|
|
1552
|
+
AcquireTokenPreRedirect: "acquireTokenPreRedirect",
|
|
1547
1553
|
/**
|
|
1548
1554
|
* acquireTokenRedirect (msal-browser).
|
|
1549
|
-
*
|
|
1555
|
+
* Second part of the redirect flow.
|
|
1556
|
+
* Used to acquire a new access token interactively through redirects.
|
|
1550
1557
|
*/
|
|
1551
1558
|
AcquireTokenRedirect: "acquireTokenRedirect",
|
|
1552
1559
|
/**
|
|
@@ -1982,7 +1989,7 @@ const IntFields = new Set([
|
|
|
1982
1989
|
"multiMatchedRT",
|
|
1983
1990
|
]);
|
|
1984
1991
|
|
|
1985
|
-
/*! @azure/msal-common v14.
|
|
1992
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1986
1993
|
/*
|
|
1987
1994
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1988
1995
|
* Licensed under the MIT License.
|
|
@@ -2078,7 +2085,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
|
|
|
2078
2085
|
};
|
|
2079
2086
|
};
|
|
2080
2087
|
|
|
2081
|
-
/*! @azure/msal-common v14.
|
|
2088
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
2082
2089
|
|
|
2083
2090
|
/*
|
|
2084
2091
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2187,7 +2194,7 @@ RegionDiscovery.IMDS_OPTIONS = {
|
|
|
2187
2194
|
},
|
|
2188
2195
|
};
|
|
2189
2196
|
|
|
2190
|
-
/*! @azure/msal-common v14.
|
|
2197
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
2191
2198
|
/*
|
|
2192
2199
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2193
2200
|
* Licensed under the MIT License.
|
|
@@ -2224,7 +2231,7 @@ function wasClockTurnedBack(cachedAt) {
|
|
|
2224
2231
|
return cachedAtSec > nowSeconds();
|
|
2225
2232
|
}
|
|
2226
2233
|
|
|
2227
|
-
/*! @azure/msal-common v14.
|
|
2234
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
2228
2235
|
|
|
2229
2236
|
/*
|
|
2230
2237
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2551,7 +2558,7 @@ function isAuthorityMetadataExpired(metadata) {
|
|
|
2551
2558
|
return metadata.expiresAt <= nowSeconds();
|
|
2552
2559
|
}
|
|
2553
2560
|
|
|
2554
|
-
/*! @azure/msal-common v14.
|
|
2561
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
2555
2562
|
|
|
2556
2563
|
/*
|
|
2557
2564
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3390,7 +3397,7 @@ function buildStaticAuthorityOptions(authOptions) {
|
|
|
3390
3397
|
};
|
|
3391
3398
|
}
|
|
3392
3399
|
|
|
3393
|
-
/*! @azure/msal-common v14.
|
|
3400
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3394
3401
|
|
|
3395
3402
|
/*
|
|
3396
3403
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3421,7 +3428,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
|
|
|
3421
3428
|
}
|
|
3422
3429
|
}
|
|
3423
3430
|
|
|
3424
|
-
/*! @azure/msal-common v14.
|
|
3431
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3425
3432
|
/*
|
|
3426
3433
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3427
3434
|
* Licensed under the MIT License.
|
|
@@ -3439,7 +3446,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint) {
|
|
|
3439
3446
|
}
|
|
3440
3447
|
}
|
|
3441
3448
|
|
|
3442
|
-
/*! @azure/msal-common v14.
|
|
3449
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3443
3450
|
/*
|
|
3444
3451
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3445
3452
|
* Licensed under the MIT License.
|
|
@@ -3486,7 +3493,7 @@ const SID = "sid";
|
|
|
3486
3493
|
const LOGIN_HINT = "login_hint";
|
|
3487
3494
|
const DOMAIN_HINT = "domain_hint";
|
|
3488
3495
|
|
|
3489
|
-
/*! @azure/msal-common v14.
|
|
3496
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3490
3497
|
|
|
3491
3498
|
/*
|
|
3492
3499
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3502,6 +3509,12 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
3502
3509
|
base64Encode: () => {
|
|
3503
3510
|
throw createClientAuthError(methodNotImplemented);
|
|
3504
3511
|
},
|
|
3512
|
+
base64UrlEncode: () => {
|
|
3513
|
+
throw createClientAuthError(methodNotImplemented);
|
|
3514
|
+
},
|
|
3515
|
+
encodeKid: () => {
|
|
3516
|
+
throw createClientAuthError(methodNotImplemented);
|
|
3517
|
+
},
|
|
3505
3518
|
async getPublicKeyThumbprint() {
|
|
3506
3519
|
throw createClientAuthError(methodNotImplemented);
|
|
3507
3520
|
},
|
|
@@ -3519,7 +3532,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
3519
3532
|
},
|
|
3520
3533
|
};
|
|
3521
3534
|
|
|
3522
|
-
/*! @azure/msal-common v14.
|
|
3535
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3523
3536
|
|
|
3524
3537
|
/*
|
|
3525
3538
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3710,12 +3723,12 @@ class Logger {
|
|
|
3710
3723
|
}
|
|
3711
3724
|
}
|
|
3712
3725
|
|
|
3713
|
-
/*! @azure/msal-common v14.
|
|
3726
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3714
3727
|
/* eslint-disable header/header */
|
|
3715
3728
|
const name$1 = "@azure/msal-common";
|
|
3716
|
-
const version$1 = "14.
|
|
3729
|
+
const version$1 = "14.12.0";
|
|
3717
3730
|
|
|
3718
|
-
/*! @azure/msal-common v14.
|
|
3731
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3719
3732
|
|
|
3720
3733
|
/*
|
|
3721
3734
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3915,7 +3928,7 @@ class ScopeSet {
|
|
|
3915
3928
|
}
|
|
3916
3929
|
}
|
|
3917
3930
|
|
|
3918
|
-
/*! @azure/msal-common v14.
|
|
3931
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3919
3932
|
|
|
3920
3933
|
/*
|
|
3921
3934
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3955,7 +3968,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
|
|
|
3955
3968
|
};
|
|
3956
3969
|
}
|
|
3957
3970
|
|
|
3958
|
-
/*! @azure/msal-common v14.
|
|
3971
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3959
3972
|
/*
|
|
3960
3973
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3961
3974
|
* Licensed under the MIT License.
|
|
@@ -4017,7 +4030,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
|
|
|
4017
4030
|
return updatedAccountInfo;
|
|
4018
4031
|
}
|
|
4019
4032
|
|
|
4020
|
-
/*! @azure/msal-common v14.
|
|
4033
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
4021
4034
|
/*
|
|
4022
4035
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4023
4036
|
* Licensed under the MIT License.
|
|
@@ -4039,7 +4052,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
|
|
|
4039
4052
|
return null;
|
|
4040
4053
|
}
|
|
4041
4054
|
|
|
4042
|
-
/*! @azure/msal-common v14.
|
|
4055
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
4043
4056
|
|
|
4044
4057
|
/*
|
|
4045
4058
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4286,7 +4299,7 @@ class AccountEntity {
|
|
|
4286
4299
|
}
|
|
4287
4300
|
}
|
|
4288
4301
|
|
|
4289
|
-
/*! @azure/msal-common v14.
|
|
4302
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
4290
4303
|
/*
|
|
4291
4304
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4292
4305
|
* Licensed under the MIT License.
|
|
@@ -4294,7 +4307,7 @@ class AccountEntity {
|
|
|
4294
4307
|
const cacheQuotaExceededErrorCode = "cache_quota_exceeded";
|
|
4295
4308
|
const cacheUnknownErrorCode = "cache_error_unknown";
|
|
4296
4309
|
|
|
4297
|
-
/*! @azure/msal-common v14.
|
|
4310
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
4298
4311
|
|
|
4299
4312
|
/*
|
|
4300
4313
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4321,7 +4334,7 @@ class CacheError extends Error {
|
|
|
4321
4334
|
}
|
|
4322
4335
|
}
|
|
4323
4336
|
|
|
4324
|
-
/*! @azure/msal-common v14.
|
|
4337
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
4325
4338
|
|
|
4326
4339
|
/*
|
|
4327
4340
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5460,7 +5473,7 @@ class CacheManager {
|
|
|
5460
5473
|
/**
|
|
5461
5474
|
* Returns true if the credential's keyId matches the one in the request, false otherwise
|
|
5462
5475
|
* @param entity
|
|
5463
|
-
* @param
|
|
5476
|
+
* @param keyId
|
|
5464
5477
|
*/
|
|
5465
5478
|
matchKeyId(entity, keyId) {
|
|
5466
5479
|
return !!(entity.keyId && entity.keyId === keyId);
|
|
@@ -5576,7 +5589,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
5576
5589
|
}
|
|
5577
5590
|
}
|
|
5578
5591
|
|
|
5579
|
-
/*! @azure/msal-common v14.
|
|
5592
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5580
5593
|
|
|
5581
5594
|
/*
|
|
5582
5595
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5674,7 +5687,7 @@ function isOidcProtocolMode(config) {
|
|
|
5674
5687
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
5675
5688
|
}
|
|
5676
5689
|
|
|
5677
|
-
/*! @azure/msal-common v14.
|
|
5690
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5678
5691
|
|
|
5679
5692
|
/*
|
|
5680
5693
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5692,7 +5705,7 @@ class ServerError extends AuthError {
|
|
|
5692
5705
|
}
|
|
5693
5706
|
}
|
|
5694
5707
|
|
|
5695
|
-
/*! @azure/msal-common v14.
|
|
5708
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5696
5709
|
|
|
5697
5710
|
/*
|
|
5698
5711
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5790,7 +5803,7 @@ class ThrottlingUtils {
|
|
|
5790
5803
|
}
|
|
5791
5804
|
}
|
|
5792
5805
|
|
|
5793
|
-
/*! @azure/msal-common v14.
|
|
5806
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5794
5807
|
|
|
5795
5808
|
/*
|
|
5796
5809
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5827,7 +5840,7 @@ class NetworkManager {
|
|
|
5827
5840
|
}
|
|
5828
5841
|
}
|
|
5829
5842
|
|
|
5830
|
-
/*! @azure/msal-common v14.
|
|
5843
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5831
5844
|
/*
|
|
5832
5845
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5833
5846
|
* Licensed under the MIT License.
|
|
@@ -5837,7 +5850,7 @@ const CcsCredentialType = {
|
|
|
5837
5850
|
UPN: "UPN",
|
|
5838
5851
|
};
|
|
5839
5852
|
|
|
5840
|
-
/*! @azure/msal-common v14.
|
|
5853
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5841
5854
|
|
|
5842
5855
|
/*
|
|
5843
5856
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5921,7 +5934,7 @@ class RequestValidator {
|
|
|
5921
5934
|
}
|
|
5922
5935
|
}
|
|
5923
5936
|
|
|
5924
|
-
/*! @azure/msal-common v14.
|
|
5937
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5925
5938
|
|
|
5926
5939
|
/*
|
|
5927
5940
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6305,7 +6318,7 @@ class RequestParameterBuilder {
|
|
|
6305
6318
|
}
|
|
6306
6319
|
}
|
|
6307
6320
|
|
|
6308
|
-
/*! @azure/msal-common v14.
|
|
6321
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6309
6322
|
|
|
6310
6323
|
/*
|
|
6311
6324
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6408,7 +6421,7 @@ class BaseClient {
|
|
|
6408
6421
|
}
|
|
6409
6422
|
}
|
|
6410
6423
|
|
|
6411
|
-
/*! @azure/msal-common v14.
|
|
6424
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6412
6425
|
/*
|
|
6413
6426
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6414
6427
|
* Licensed under the MIT License.
|
|
@@ -6434,7 +6447,7 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
6434
6447
|
refreshTokenExpired: refreshTokenExpired
|
|
6435
6448
|
});
|
|
6436
6449
|
|
|
6437
|
-
/*! @azure/msal-common v14.
|
|
6450
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6438
6451
|
|
|
6439
6452
|
/*
|
|
6440
6453
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6522,7 +6535,7 @@ function createInteractionRequiredAuthError(errorCode) {
|
|
|
6522
6535
|
return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
|
|
6523
6536
|
}
|
|
6524
6537
|
|
|
6525
|
-
/*! @azure/msal-common v14.
|
|
6538
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6526
6539
|
/*
|
|
6527
6540
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6528
6541
|
* Licensed under the MIT License.
|
|
@@ -6538,7 +6551,7 @@ class CacheRecord {
|
|
|
6538
6551
|
}
|
|
6539
6552
|
}
|
|
6540
6553
|
|
|
6541
|
-
/*! @azure/msal-common v14.
|
|
6554
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6542
6555
|
|
|
6543
6556
|
/*
|
|
6544
6557
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6610,7 +6623,7 @@ class ProtocolUtils {
|
|
|
6610
6623
|
}
|
|
6611
6624
|
}
|
|
6612
6625
|
|
|
6613
|
-
/*! @azure/msal-common v14.
|
|
6626
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6614
6627
|
|
|
6615
6628
|
/*
|
|
6616
6629
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6635,11 +6648,10 @@ class PopTokenGenerator {
|
|
|
6635
6648
|
async generateCnf(request, logger) {
|
|
6636
6649
|
this.performanceClient?.addQueueMeasurement(PerformanceEvents.PopTokenGenerateCnf, request.correlationId);
|
|
6637
6650
|
const reqCnf = await invokeAsync(this.generateKid.bind(this), PerformanceEvents.PopTokenGenerateCnf, logger, this.performanceClient, request.correlationId)(request);
|
|
6638
|
-
const reqCnfString = this.cryptoUtils.
|
|
6651
|
+
const reqCnfString = this.cryptoUtils.base64UrlEncode(JSON.stringify(reqCnf));
|
|
6639
6652
|
return {
|
|
6640
6653
|
kid: reqCnf.kid,
|
|
6641
6654
|
reqCnfString,
|
|
6642
|
-
reqCnfHash: await this.cryptoUtils.hashString(reqCnfString),
|
|
6643
6655
|
};
|
|
6644
6656
|
}
|
|
6645
6657
|
/**
|
|
@@ -6695,7 +6707,7 @@ class PopTokenGenerator {
|
|
|
6695
6707
|
}
|
|
6696
6708
|
}
|
|
6697
6709
|
|
|
6698
|
-
/*! @azure/msal-common v14.
|
|
6710
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6699
6711
|
/*
|
|
6700
6712
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6701
6713
|
* Licensed under the MIT License.
|
|
@@ -6722,7 +6734,7 @@ class PopTokenGenerator {
|
|
|
6722
6734
|
}
|
|
6723
6735
|
}
|
|
6724
6736
|
|
|
6725
|
-
/*! @azure/msal-common v14.
|
|
6737
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6726
6738
|
|
|
6727
6739
|
/*
|
|
6728
6740
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6990,7 +7002,13 @@ class ResponseHandler {
|
|
|
6990
7002
|
let refreshOn;
|
|
6991
7003
|
let familyId = Constants.EMPTY_STRING;
|
|
6992
7004
|
if (cacheRecord.accessToken) {
|
|
6993
|
-
|
|
7005
|
+
/*
|
|
7006
|
+
* if the request object has `popKid` property, `signPopToken` will be set to false and
|
|
7007
|
+
* the token will be returned unsigned
|
|
7008
|
+
*/
|
|
7009
|
+
if (cacheRecord.accessToken.tokenType ===
|
|
7010
|
+
AuthenticationScheme.POP &&
|
|
7011
|
+
!request.popKid) {
|
|
6994
7012
|
const popTokenGenerator = new PopTokenGenerator(cryptoObj);
|
|
6995
7013
|
const { secret, keyId } = cacheRecord.accessToken;
|
|
6996
7014
|
if (!keyId) {
|
|
@@ -7086,7 +7104,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, idTokenClai
|
|
|
7086
7104
|
return baseAccount;
|
|
7087
7105
|
}
|
|
7088
7106
|
|
|
7089
|
-
/*! @azure/msal-common v14.
|
|
7107
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7090
7108
|
|
|
7091
7109
|
/*
|
|
7092
7110
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7254,9 +7272,16 @@ class AuthorizationCodeClient extends BaseClient {
|
|
|
7254
7272
|
parameterBuilder.addClientInfo();
|
|
7255
7273
|
if (request.authenticationScheme === AuthenticationScheme.POP) {
|
|
7256
7274
|
const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils, this.performanceClient);
|
|
7257
|
-
|
|
7275
|
+
let reqCnfData;
|
|
7276
|
+
if (!request.popKid) {
|
|
7277
|
+
const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger);
|
|
7278
|
+
reqCnfData = generatedReqCnfData.reqCnfString;
|
|
7279
|
+
}
|
|
7280
|
+
else {
|
|
7281
|
+
reqCnfData = this.cryptoUtils.encodeKid(request.popKid);
|
|
7282
|
+
}
|
|
7258
7283
|
// SPA PoP requires full Base64Url encoded req_cnf string (unhashed)
|
|
7259
|
-
parameterBuilder.addPopToken(reqCnfData
|
|
7284
|
+
parameterBuilder.addPopToken(reqCnfData);
|
|
7260
7285
|
}
|
|
7261
7286
|
else if (request.authenticationScheme === AuthenticationScheme.SSH) {
|
|
7262
7287
|
if (request.sshJwk) {
|
|
@@ -7450,9 +7475,16 @@ class AuthorizationCodeClient extends BaseClient {
|
|
|
7450
7475
|
// pass the req_cnf for POP
|
|
7451
7476
|
if (request.authenticationScheme === AuthenticationScheme.POP) {
|
|
7452
7477
|
const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils);
|
|
7453
|
-
//
|
|
7454
|
-
|
|
7455
|
-
|
|
7478
|
+
// req_cnf is always sent as a string for SPAs
|
|
7479
|
+
let reqCnfData;
|
|
7480
|
+
if (!request.popKid) {
|
|
7481
|
+
const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger);
|
|
7482
|
+
reqCnfData = generatedReqCnfData.reqCnfString;
|
|
7483
|
+
}
|
|
7484
|
+
else {
|
|
7485
|
+
reqCnfData = this.cryptoUtils.encodeKid(request.popKid);
|
|
7486
|
+
}
|
|
7487
|
+
parameterBuilder.addPopToken(reqCnfData);
|
|
7456
7488
|
}
|
|
7457
7489
|
}
|
|
7458
7490
|
return parameterBuilder.createQueryString();
|
|
@@ -7495,7 +7527,7 @@ class AuthorizationCodeClient extends BaseClient {
|
|
|
7495
7527
|
}
|
|
7496
7528
|
}
|
|
7497
7529
|
|
|
7498
|
-
/*! @azure/msal-common v14.
|
|
7530
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7499
7531
|
|
|
7500
7532
|
/*
|
|
7501
7533
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7660,9 +7692,16 @@ class RefreshTokenClient extends BaseClient {
|
|
|
7660
7692
|
}
|
|
7661
7693
|
if (request.authenticationScheme === AuthenticationScheme.POP) {
|
|
7662
7694
|
const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils, this.performanceClient);
|
|
7663
|
-
|
|
7695
|
+
let reqCnfData;
|
|
7696
|
+
if (!request.popKid) {
|
|
7697
|
+
const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(request, this.logger);
|
|
7698
|
+
reqCnfData = generatedReqCnfData.reqCnfString;
|
|
7699
|
+
}
|
|
7700
|
+
else {
|
|
7701
|
+
reqCnfData = this.cryptoUtils.encodeKid(request.popKid);
|
|
7702
|
+
}
|
|
7664
7703
|
// SPA PoP requires full Base64Url encoded req_cnf string (unhashed)
|
|
7665
|
-
parameterBuilder.addPopToken(reqCnfData
|
|
7704
|
+
parameterBuilder.addPopToken(reqCnfData);
|
|
7666
7705
|
}
|
|
7667
7706
|
else if (request.authenticationScheme === AuthenticationScheme.SSH) {
|
|
7668
7707
|
if (request.sshJwk) {
|
|
@@ -7702,7 +7741,7 @@ class RefreshTokenClient extends BaseClient {
|
|
|
7702
7741
|
}
|
|
7703
7742
|
}
|
|
7704
7743
|
|
|
7705
|
-
/*! @azure/msal-common v14.
|
|
7744
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7706
7745
|
|
|
7707
7746
|
/*
|
|
7708
7747
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7838,7 +7877,7 @@ class SilentFlowClient extends BaseClient {
|
|
|
7838
7877
|
}
|
|
7839
7878
|
}
|
|
7840
7879
|
|
|
7841
|
-
/*! @azure/msal-common v14.
|
|
7880
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7842
7881
|
|
|
7843
7882
|
/*
|
|
7844
7883
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7853,7 +7892,7 @@ const StubbedNetworkModule = {
|
|
|
7853
7892
|
},
|
|
7854
7893
|
};
|
|
7855
7894
|
|
|
7856
|
-
/*! @azure/msal-common v14.
|
|
7895
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7857
7896
|
/*
|
|
7858
7897
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7859
7898
|
* Licensed under the MIT License.
|
|
@@ -7861,7 +7900,7 @@ const StubbedNetworkModule = {
|
|
|
7861
7900
|
const missingKidError = "missing_kid_error";
|
|
7862
7901
|
const missingAlgError = "missing_alg_error";
|
|
7863
7902
|
|
|
7864
|
-
/*! @azure/msal-common v14.
|
|
7903
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7865
7904
|
|
|
7866
7905
|
/*
|
|
7867
7906
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7886,7 +7925,7 @@ function createJoseHeaderError(code) {
|
|
|
7886
7925
|
return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
|
|
7887
7926
|
}
|
|
7888
7927
|
|
|
7889
|
-
/*! @azure/msal-common v14.
|
|
7928
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7890
7929
|
|
|
7891
7930
|
/*
|
|
7892
7931
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7926,7 +7965,7 @@ class JoseHeader {
|
|
|
7926
7965
|
}
|
|
7927
7966
|
}
|
|
7928
7967
|
|
|
7929
|
-
/*! @azure/msal-common v14.
|
|
7968
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7930
7969
|
|
|
7931
7970
|
/*
|
|
7932
7971
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7984,7 +8023,7 @@ class AuthenticationHeaderParser {
|
|
|
7984
8023
|
}
|
|
7985
8024
|
}
|
|
7986
8025
|
|
|
7987
|
-
/*! @azure/msal-common v14.
|
|
8026
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7988
8027
|
|
|
7989
8028
|
/*
|
|
7990
8029
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8188,7 +8227,7 @@ class ServerTelemetryManager {
|
|
|
8188
8227
|
}
|
|
8189
8228
|
}
|
|
8190
8229
|
|
|
8191
|
-
/*! @azure/msal-common v14.
|
|
8230
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
8192
8231
|
|
|
8193
8232
|
/*
|
|
8194
8233
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8267,7 +8306,7 @@ class StubPerformanceClient {
|
|
|
8267
8306
|
}
|
|
8268
8307
|
}
|
|
8269
8308
|
|
|
8270
|
-
/*! @azure/msal-common v14.
|
|
8309
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
8271
8310
|
|
|
8272
8311
|
/*
|
|
8273
8312
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8906,6 +8945,7 @@ const nativeConnectionNotEstablished = "native_connection_not_established";
|
|
|
8906
8945
|
const uninitializedPublicClientApplication = "uninitialized_public_client_application";
|
|
8907
8946
|
const nativePromptNotSupported = "native_prompt_not_supported";
|
|
8908
8947
|
const invalidBase64String = "invalid_base64_string";
|
|
8948
|
+
const invalidPopTokenRequest = "invalid_pop_token_request";
|
|
8909
8949
|
|
|
8910
8950
|
var BrowserAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
8911
8951
|
__proto__: null,
|
|
@@ -8928,6 +8968,7 @@ var BrowserAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
8928
8968
|
interactionInProgress: interactionInProgress,
|
|
8929
8969
|
invalidBase64String: invalidBase64String,
|
|
8930
8970
|
invalidCacheType: invalidCacheType,
|
|
8971
|
+
invalidPopTokenRequest: invalidPopTokenRequest,
|
|
8931
8972
|
monitorPopupTimeout: monitorPopupTimeout,
|
|
8932
8973
|
monitorWindowTimeout: monitorWindowTimeout,
|
|
8933
8974
|
nativeConnectionNotEstablished: nativeConnectionNotEstablished,
|
|
@@ -9010,6 +9051,7 @@ const BrowserAuthErrorMessages = {
|
|
|
9010
9051
|
[uninitializedPublicClientApplication]: `You must call and await the initialize function before attempting to call any other MSAL API. ${ErrorLink}`,
|
|
9011
9052
|
[nativePromptNotSupported]: "The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",
|
|
9012
9053
|
[invalidBase64String]: "Invalid base64 encoded string.",
|
|
9054
|
+
[invalidPopTokenRequest]: "Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",
|
|
9013
9055
|
};
|
|
9014
9056
|
/**
|
|
9015
9057
|
* BrowserAuthErrorMessage class containing string constants used by error codes and messages.
|
|
@@ -9200,6 +9242,10 @@ const BrowserAuthErrorMessage = {
|
|
|
9200
9242
|
code: invalidBase64String,
|
|
9201
9243
|
desc: BrowserAuthErrorMessages[invalidBase64String],
|
|
9202
9244
|
},
|
|
9245
|
+
invalidPopTokenRequest: {
|
|
9246
|
+
code: invalidPopTokenRequest,
|
|
9247
|
+
desc: BrowserAuthErrorMessages[invalidPopTokenRequest],
|
|
9248
|
+
},
|
|
9203
9249
|
};
|
|
9204
9250
|
/**
|
|
9205
9251
|
* Browser library error class thrown by the MSAL.js library for SPAs
|
|
@@ -10131,7 +10177,7 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
10131
10177
|
|
|
10132
10178
|
/* eslint-disable header/header */
|
|
10133
10179
|
const name = "@azure/msal-browser";
|
|
10134
|
-
const version = "3.
|
|
10180
|
+
const version = "3.17.0";
|
|
10135
10181
|
|
|
10136
10182
|
/*
|
|
10137
10183
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -10947,6 +10993,21 @@ class CryptoOps {
|
|
|
10947
10993
|
base64Decode(input) {
|
|
10948
10994
|
return base64Decode(input);
|
|
10949
10995
|
}
|
|
10996
|
+
/**
|
|
10997
|
+
* Encodes input string to base64 URL safe string.
|
|
10998
|
+
* @param input
|
|
10999
|
+
*/
|
|
11000
|
+
base64UrlEncode(input) {
|
|
11001
|
+
return urlEncode(input);
|
|
11002
|
+
}
|
|
11003
|
+
/**
|
|
11004
|
+
* Stringifies and base64Url encodes input public key
|
|
11005
|
+
* @param inputKid
|
|
11006
|
+
* @returns Base64Url encoded public key
|
|
11007
|
+
*/
|
|
11008
|
+
encodeKid(inputKid) {
|
|
11009
|
+
return this.base64UrlEncode(JSON.stringify({ kid: inputKid }));
|
|
11010
|
+
}
|
|
10950
11011
|
/**
|
|
10951
11012
|
* Generates a keypair, stores it and returns a thumbprint
|
|
10952
11013
|
* @param request
|
|
@@ -13287,10 +13348,11 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13287
13348
|
// continue with a native call for any and all errors
|
|
13288
13349
|
this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call");
|
|
13289
13350
|
}
|
|
13351
|
+
const { ...nativeTokenRequest } = nativeRequest;
|
|
13290
13352
|
// fall back to native calls
|
|
13291
13353
|
const messageBody = {
|
|
13292
13354
|
method: NativeExtensionMethod.GetToken,
|
|
13293
|
-
request:
|
|
13355
|
+
request: nativeTokenRequest,
|
|
13294
13356
|
};
|
|
13295
13357
|
const response = await this.nativeMessageHandler.sendMessage(messageBody);
|
|
13296
13358
|
const validatedResponse = this.validateNativeResponse(response);
|
|
@@ -13366,14 +13428,16 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13366
13428
|
}
|
|
13367
13429
|
/**
|
|
13368
13430
|
* Acquires a token from native platform then redirects to the redirectUri instead of returning the response
|
|
13369
|
-
* @param request
|
|
13431
|
+
* @param {RedirectRequest} request
|
|
13432
|
+
* @param {InProgressPerformanceEvent} rootMeasurement
|
|
13370
13433
|
*/
|
|
13371
|
-
async acquireTokenRedirect(request) {
|
|
13434
|
+
async acquireTokenRedirect(request, rootMeasurement) {
|
|
13372
13435
|
this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");
|
|
13373
13436
|
const nativeRequest = await this.initializeNativeRequest(request);
|
|
13437
|
+
const { ...nativeTokenRequest } = nativeRequest;
|
|
13374
13438
|
const messageBody = {
|
|
13375
13439
|
method: NativeExtensionMethod.GetToken,
|
|
13376
|
-
request:
|
|
13440
|
+
request: nativeTokenRequest,
|
|
13377
13441
|
};
|
|
13378
13442
|
try {
|
|
13379
13443
|
const response = await this.nativeMessageHandler.sendMessage(messageBody);
|
|
@@ -13394,6 +13458,7 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13394
13458
|
const redirectUri = this.config.auth.navigateToLoginRequestUrl
|
|
13395
13459
|
? window.location.href
|
|
13396
13460
|
: this.getRedirectUri(request.redirectUri);
|
|
13461
|
+
rootMeasurement.end({ success: true });
|
|
13397
13462
|
await this.navigationClient.navigateExternal(redirectUri, navigationOptions); // Need to treat this as external to ensure handleRedirectPromise is run again
|
|
13398
13463
|
}
|
|
13399
13464
|
/**
|
|
@@ -13475,7 +13540,7 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13475
13540
|
const result = await this.generateAuthenticationResult(response, request, idTokenClaims, baseAccount, authority.canonicalAuthority, reqTimestamp);
|
|
13476
13541
|
// cache accounts and tokens in the appropriate storage
|
|
13477
13542
|
this.cacheAccount(baseAccount);
|
|
13478
|
-
this.cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims,
|
|
13543
|
+
this.cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, response.access_token, result.tenantId, reqTimestamp);
|
|
13479
13544
|
return result;
|
|
13480
13545
|
}
|
|
13481
13546
|
/**
|
|
@@ -13506,7 +13571,8 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13506
13571
|
* @param response
|
|
13507
13572
|
*/
|
|
13508
13573
|
async generatePopAccessToken(response, request) {
|
|
13509
|
-
if (request.tokenType === AuthenticationScheme.POP
|
|
13574
|
+
if (request.tokenType === AuthenticationScheme.POP &&
|
|
13575
|
+
request.signPopToken) {
|
|
13510
13576
|
/**
|
|
13511
13577
|
* This code prioritizes SHR returned from the native layer. In case of error/SHR not calculated from WAM and the AT
|
|
13512
13578
|
* is still received, SHR is calculated locally
|
|
@@ -13626,7 +13692,7 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13626
13692
|
: response.expires_in) || 0;
|
|
13627
13693
|
const tokenExpirationSeconds = reqTimestamp + expiresIn;
|
|
13628
13694
|
const responseScopes = this.generateScopes(response, request);
|
|
13629
|
-
const cachedAccessToken = createAccessTokenEntity(homeAccountIdentifier, request.authority, responseAccessToken, request.clientId, idTokenClaims.tid || tenantId, responseScopes.printScopes(), tokenExpirationSeconds, 0, base64Decode);
|
|
13695
|
+
const cachedAccessToken = createAccessTokenEntity(homeAccountIdentifier, request.authority, responseAccessToken, request.clientId, idTokenClaims.tid || tenantId, responseScopes.printScopes(), tokenExpirationSeconds, 0, base64Decode, undefined, request.tokenType, undefined, request.keyId);
|
|
13630
13696
|
const nativeCacheRecord = new CacheRecord(undefined, cachedIdToken, cachedAccessToken);
|
|
13631
13697
|
void this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, request.storeInCache);
|
|
13632
13698
|
}
|
|
@@ -13756,8 +13822,13 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13756
13822
|
...request.extraQueryParameters,
|
|
13757
13823
|
...request.tokenQueryParameters,
|
|
13758
13824
|
},
|
|
13759
|
-
extendedExpiryToken: false,
|
|
13825
|
+
extendedExpiryToken: false,
|
|
13826
|
+
keyId: request.popKid,
|
|
13760
13827
|
};
|
|
13828
|
+
// Check for PoP token requests: signPopToken should only be set to true if popKid is not set
|
|
13829
|
+
if (validatedRequest.signPopToken && !!request.popKid) {
|
|
13830
|
+
throw createBrowserAuthError(invalidPopTokenRequest);
|
|
13831
|
+
}
|
|
13761
13832
|
this.handleExtraBrokerParams(validatedRequest);
|
|
13762
13833
|
validatedRequest.extraParameters =
|
|
13763
13834
|
validatedRequest.extraParameters || {};
|
|
@@ -13772,10 +13843,20 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13772
13843
|
shrNonce: request.shrNonce,
|
|
13773
13844
|
};
|
|
13774
13845
|
const popTokenGenerator = new PopTokenGenerator(this.browserCrypto);
|
|
13775
|
-
|
|
13776
|
-
|
|
13777
|
-
validatedRequest.
|
|
13778
|
-
|
|
13846
|
+
// generate reqCnf if not provided in the request
|
|
13847
|
+
let reqCnfData;
|
|
13848
|
+
if (!validatedRequest.keyId) {
|
|
13849
|
+
const generatedReqCnfData = await invokeAsync(popTokenGenerator.generateCnf.bind(popTokenGenerator), PerformanceEvents.PopTokenGenerateCnf, this.logger, this.performanceClient, request.correlationId)(shrParameters, this.logger);
|
|
13850
|
+
reqCnfData = generatedReqCnfData.reqCnfString;
|
|
13851
|
+
validatedRequest.keyId = generatedReqCnfData.kid;
|
|
13852
|
+
validatedRequest.signPopToken = true;
|
|
13853
|
+
}
|
|
13854
|
+
else {
|
|
13855
|
+
reqCnfData = this.browserCrypto.base64UrlEncode(JSON.stringify({ kid: validatedRequest.keyId }));
|
|
13856
|
+
validatedRequest.signPopToken = false;
|
|
13857
|
+
}
|
|
13858
|
+
// SPAs require whole string to be passed to broker
|
|
13859
|
+
validatedRequest.reqCnf = reqCnfData;
|
|
13779
13860
|
}
|
|
13780
13861
|
return validatedRequest;
|
|
13781
13862
|
}
|
|
@@ -15832,7 +15913,7 @@ class StandardController {
|
|
|
15832
15913
|
const correlationId = useNative
|
|
15833
15914
|
? request?.correlationId
|
|
15834
15915
|
: this.browserStorage.getTemporaryCache(TemporaryCacheKeys.CORRELATION_ID, true) || "";
|
|
15835
|
-
const rootMeasurement = this.performanceClient.startMeasurement(
|
|
15916
|
+
const rootMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenRedirect, correlationId);
|
|
15836
15917
|
this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_START, exports.InteractionType.Redirect);
|
|
15837
15918
|
let redirectResponse;
|
|
15838
15919
|
if (useNative && this.nativeExtensionProvider) {
|
|
@@ -15907,43 +15988,64 @@ class StandardController {
|
|
|
15907
15988
|
// Preflight request
|
|
15908
15989
|
const correlationId = this.getRequestCorrelationId(request);
|
|
15909
15990
|
this.logger.verbose("acquireTokenRedirect called", correlationId);
|
|
15910
|
-
|
|
15911
|
-
|
|
15991
|
+
const atrMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.AcquireTokenPreRedirect, correlationId);
|
|
15992
|
+
atrMeasurement.add({
|
|
15993
|
+
accountType: getAccountType(request.account),
|
|
15994
|
+
scenarioId: request.scenarioId,
|
|
15995
|
+
});
|
|
15996
|
+
const onRedirectNavigateCb = request.onRedirectNavigate;
|
|
15997
|
+
request.onRedirectNavigate = (url) => {
|
|
15998
|
+
const navigate = typeof onRedirectNavigateCb === "function"
|
|
15999
|
+
? onRedirectNavigateCb(url)
|
|
16000
|
+
: undefined;
|
|
16001
|
+
if (navigate !== false) {
|
|
16002
|
+
atrMeasurement.end({ success: true });
|
|
16003
|
+
}
|
|
16004
|
+
else {
|
|
16005
|
+
atrMeasurement.discard();
|
|
16006
|
+
}
|
|
16007
|
+
return navigate;
|
|
16008
|
+
};
|
|
15912
16009
|
// If logged in, emit acquire token events
|
|
15913
16010
|
const isLoggedIn = this.getAllAccounts().length > 0;
|
|
15914
|
-
|
|
15915
|
-
this.
|
|
15916
|
-
|
|
15917
|
-
|
|
15918
|
-
|
|
15919
|
-
|
|
15920
|
-
|
|
15921
|
-
|
|
15922
|
-
|
|
15923
|
-
result
|
|
15924
|
-
|
|
15925
|
-
.
|
|
15926
|
-
|
|
15927
|
-
|
|
15928
|
-
|
|
15929
|
-
|
|
15930
|
-
|
|
15931
|
-
|
|
15932
|
-
|
|
15933
|
-
|
|
15934
|
-
|
|
15935
|
-
|
|
15936
|
-
|
|
15937
|
-
|
|
15938
|
-
|
|
15939
|
-
|
|
15940
|
-
|
|
15941
|
-
|
|
15942
|
-
|
|
15943
|
-
|
|
16011
|
+
try {
|
|
16012
|
+
redirectPreflightCheck(this.initialized, this.config);
|
|
16013
|
+
this.browserStorage.setInteractionInProgress(true);
|
|
16014
|
+
if (isLoggedIn) {
|
|
16015
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, exports.InteractionType.Redirect, request);
|
|
16016
|
+
}
|
|
16017
|
+
else {
|
|
16018
|
+
this.eventHandler.emitEvent(EventType.LOGIN_START, exports.InteractionType.Redirect, request);
|
|
16019
|
+
}
|
|
16020
|
+
let result;
|
|
16021
|
+
if (this.nativeExtensionProvider && this.canUseNative(request)) {
|
|
16022
|
+
const nativeClient = new NativeInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.acquireTokenRedirect, this.performanceClient, this.nativeExtensionProvider, this.getNativeAccountId(request), this.nativeInternalStorage, correlationId);
|
|
16023
|
+
result = nativeClient
|
|
16024
|
+
.acquireTokenRedirect(request, atrMeasurement)
|
|
16025
|
+
.catch((e) => {
|
|
16026
|
+
if (e instanceof NativeAuthError &&
|
|
16027
|
+
isFatalNativeAuthError(e)) {
|
|
16028
|
+
this.nativeExtensionProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt
|
|
16029
|
+
const redirectClient = this.createRedirectClient(correlationId);
|
|
16030
|
+
return redirectClient.acquireToken(request);
|
|
16031
|
+
}
|
|
16032
|
+
else if (e instanceof InteractionRequiredAuthError) {
|
|
16033
|
+
this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");
|
|
16034
|
+
const redirectClient = this.createRedirectClient(correlationId);
|
|
16035
|
+
return redirectClient.acquireToken(request);
|
|
16036
|
+
}
|
|
16037
|
+
this.browserStorage.setInteractionInProgress(false);
|
|
16038
|
+
throw e;
|
|
16039
|
+
});
|
|
16040
|
+
}
|
|
16041
|
+
else {
|
|
16042
|
+
const redirectClient = this.createRedirectClient(correlationId);
|
|
16043
|
+
result = redirectClient.acquireToken(request);
|
|
16044
|
+
}
|
|
16045
|
+
return await result;
|
|
15944
16046
|
}
|
|
15945
|
-
|
|
15946
|
-
|
|
16047
|
+
catch (e) {
|
|
16048
|
+
atrMeasurement.end({ success: false }, e);
|
|
15947
16049
|
if (isLoggedIn) {
|
|
15948
16050
|
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, exports.InteractionType.Redirect, null, e);
|
|
15949
16051
|
}
|
|
@@ -15951,7 +16053,7 @@ class StandardController {
|
|
|
15951
16053
|
this.eventHandler.emitEvent(EventType.LOGIN_FAILURE, exports.InteractionType.Redirect, null, e);
|
|
15952
16054
|
}
|
|
15953
16055
|
throw e;
|
|
15954
|
-
}
|
|
16056
|
+
}
|
|
15955
16057
|
}
|
|
15956
16058
|
// #endregion
|
|
15957
16059
|
// #region Popup Flow
|