@azure/msal-browser 3.16.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.mjs +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.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.mjs +30 -12
- 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 +160 -88
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +160 -88
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +60 -60
- package/package.json +2 -2
- package/src/broker/nativeBroker/NativeRequest.ts +1 -0
- 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 +47 -16
- 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.
|
|
@@ -1989,7 +1989,7 @@ const IntFields = new Set([
|
|
|
1989
1989
|
"multiMatchedRT",
|
|
1990
1990
|
]);
|
|
1991
1991
|
|
|
1992
|
-
/*! @azure/msal-common v14.
|
|
1992
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
1993
1993
|
/*
|
|
1994
1994
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1995
1995
|
* Licensed under the MIT License.
|
|
@@ -2085,7 +2085,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
|
|
|
2085
2085
|
};
|
|
2086
2086
|
};
|
|
2087
2087
|
|
|
2088
|
-
/*! @azure/msal-common v14.
|
|
2088
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
2089
2089
|
|
|
2090
2090
|
/*
|
|
2091
2091
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2194,7 +2194,7 @@ RegionDiscovery.IMDS_OPTIONS = {
|
|
|
2194
2194
|
},
|
|
2195
2195
|
};
|
|
2196
2196
|
|
|
2197
|
-
/*! @azure/msal-common v14.
|
|
2197
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
2198
2198
|
/*
|
|
2199
2199
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2200
2200
|
* Licensed under the MIT License.
|
|
@@ -2231,7 +2231,7 @@ function wasClockTurnedBack(cachedAt) {
|
|
|
2231
2231
|
return cachedAtSec > nowSeconds();
|
|
2232
2232
|
}
|
|
2233
2233
|
|
|
2234
|
-
/*! @azure/msal-common v14.
|
|
2234
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
2235
2235
|
|
|
2236
2236
|
/*
|
|
2237
2237
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2558,7 +2558,7 @@ function isAuthorityMetadataExpired(metadata) {
|
|
|
2558
2558
|
return metadata.expiresAt <= nowSeconds();
|
|
2559
2559
|
}
|
|
2560
2560
|
|
|
2561
|
-
/*! @azure/msal-common v14.
|
|
2561
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
2562
2562
|
|
|
2563
2563
|
/*
|
|
2564
2564
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3397,7 +3397,7 @@ function buildStaticAuthorityOptions(authOptions) {
|
|
|
3397
3397
|
};
|
|
3398
3398
|
}
|
|
3399
3399
|
|
|
3400
|
-
/*! @azure/msal-common v14.
|
|
3400
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3401
3401
|
|
|
3402
3402
|
/*
|
|
3403
3403
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3428,7 +3428,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
|
|
|
3428
3428
|
}
|
|
3429
3429
|
}
|
|
3430
3430
|
|
|
3431
|
-
/*! @azure/msal-common v14.
|
|
3431
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3432
3432
|
/*
|
|
3433
3433
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3434
3434
|
* Licensed under the MIT License.
|
|
@@ -3446,7 +3446,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint) {
|
|
|
3446
3446
|
}
|
|
3447
3447
|
}
|
|
3448
3448
|
|
|
3449
|
-
/*! @azure/msal-common v14.
|
|
3449
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3450
3450
|
/*
|
|
3451
3451
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3452
3452
|
* Licensed under the MIT License.
|
|
@@ -3493,7 +3493,7 @@ const SID = "sid";
|
|
|
3493
3493
|
const LOGIN_HINT = "login_hint";
|
|
3494
3494
|
const DOMAIN_HINT = "domain_hint";
|
|
3495
3495
|
|
|
3496
|
-
/*! @azure/msal-common v14.
|
|
3496
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3497
3497
|
|
|
3498
3498
|
/*
|
|
3499
3499
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3509,6 +3509,12 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
3509
3509
|
base64Encode: () => {
|
|
3510
3510
|
throw createClientAuthError(methodNotImplemented);
|
|
3511
3511
|
},
|
|
3512
|
+
base64UrlEncode: () => {
|
|
3513
|
+
throw createClientAuthError(methodNotImplemented);
|
|
3514
|
+
},
|
|
3515
|
+
encodeKid: () => {
|
|
3516
|
+
throw createClientAuthError(methodNotImplemented);
|
|
3517
|
+
},
|
|
3512
3518
|
async getPublicKeyThumbprint() {
|
|
3513
3519
|
throw createClientAuthError(methodNotImplemented);
|
|
3514
3520
|
},
|
|
@@ -3526,7 +3532,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
3526
3532
|
},
|
|
3527
3533
|
};
|
|
3528
3534
|
|
|
3529
|
-
/*! @azure/msal-common v14.
|
|
3535
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3530
3536
|
|
|
3531
3537
|
/*
|
|
3532
3538
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3717,12 +3723,12 @@ class Logger {
|
|
|
3717
3723
|
}
|
|
3718
3724
|
}
|
|
3719
3725
|
|
|
3720
|
-
/*! @azure/msal-common v14.
|
|
3726
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3721
3727
|
/* eslint-disable header/header */
|
|
3722
3728
|
const name$1 = "@azure/msal-common";
|
|
3723
|
-
const version$1 = "14.
|
|
3729
|
+
const version$1 = "14.12.0";
|
|
3724
3730
|
|
|
3725
|
-
/*! @azure/msal-common v14.
|
|
3731
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3726
3732
|
|
|
3727
3733
|
/*
|
|
3728
3734
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3922,7 +3928,7 @@ class ScopeSet {
|
|
|
3922
3928
|
}
|
|
3923
3929
|
}
|
|
3924
3930
|
|
|
3925
|
-
/*! @azure/msal-common v14.
|
|
3931
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3926
3932
|
|
|
3927
3933
|
/*
|
|
3928
3934
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3962,7 +3968,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
|
|
|
3962
3968
|
};
|
|
3963
3969
|
}
|
|
3964
3970
|
|
|
3965
|
-
/*! @azure/msal-common v14.
|
|
3971
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
3966
3972
|
/*
|
|
3967
3973
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3968
3974
|
* Licensed under the MIT License.
|
|
@@ -4024,7 +4030,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
|
|
|
4024
4030
|
return updatedAccountInfo;
|
|
4025
4031
|
}
|
|
4026
4032
|
|
|
4027
|
-
/*! @azure/msal-common v14.
|
|
4033
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
4028
4034
|
/*
|
|
4029
4035
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4030
4036
|
* Licensed under the MIT License.
|
|
@@ -4046,7 +4052,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
|
|
|
4046
4052
|
return null;
|
|
4047
4053
|
}
|
|
4048
4054
|
|
|
4049
|
-
/*! @azure/msal-common v14.
|
|
4055
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
4050
4056
|
|
|
4051
4057
|
/*
|
|
4052
4058
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4293,7 +4299,7 @@ class AccountEntity {
|
|
|
4293
4299
|
}
|
|
4294
4300
|
}
|
|
4295
4301
|
|
|
4296
|
-
/*! @azure/msal-common v14.
|
|
4302
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
4297
4303
|
/*
|
|
4298
4304
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4299
4305
|
* Licensed under the MIT License.
|
|
@@ -4301,7 +4307,7 @@ class AccountEntity {
|
|
|
4301
4307
|
const cacheQuotaExceededErrorCode = "cache_quota_exceeded";
|
|
4302
4308
|
const cacheUnknownErrorCode = "cache_error_unknown";
|
|
4303
4309
|
|
|
4304
|
-
/*! @azure/msal-common v14.
|
|
4310
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
4305
4311
|
|
|
4306
4312
|
/*
|
|
4307
4313
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4328,7 +4334,7 @@ class CacheError extends Error {
|
|
|
4328
4334
|
}
|
|
4329
4335
|
}
|
|
4330
4336
|
|
|
4331
|
-
/*! @azure/msal-common v14.
|
|
4337
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
4332
4338
|
|
|
4333
4339
|
/*
|
|
4334
4340
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5467,7 +5473,7 @@ class CacheManager {
|
|
|
5467
5473
|
/**
|
|
5468
5474
|
* Returns true if the credential's keyId matches the one in the request, false otherwise
|
|
5469
5475
|
* @param entity
|
|
5470
|
-
* @param
|
|
5476
|
+
* @param keyId
|
|
5471
5477
|
*/
|
|
5472
5478
|
matchKeyId(entity, keyId) {
|
|
5473
5479
|
return !!(entity.keyId && entity.keyId === keyId);
|
|
@@ -5583,7 +5589,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
5583
5589
|
}
|
|
5584
5590
|
}
|
|
5585
5591
|
|
|
5586
|
-
/*! @azure/msal-common v14.
|
|
5592
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5587
5593
|
|
|
5588
5594
|
/*
|
|
5589
5595
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5681,7 +5687,7 @@ function isOidcProtocolMode(config) {
|
|
|
5681
5687
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
5682
5688
|
}
|
|
5683
5689
|
|
|
5684
|
-
/*! @azure/msal-common v14.
|
|
5690
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5685
5691
|
|
|
5686
5692
|
/*
|
|
5687
5693
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5699,7 +5705,7 @@ class ServerError extends AuthError {
|
|
|
5699
5705
|
}
|
|
5700
5706
|
}
|
|
5701
5707
|
|
|
5702
|
-
/*! @azure/msal-common v14.
|
|
5708
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5703
5709
|
|
|
5704
5710
|
/*
|
|
5705
5711
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5797,7 +5803,7 @@ class ThrottlingUtils {
|
|
|
5797
5803
|
}
|
|
5798
5804
|
}
|
|
5799
5805
|
|
|
5800
|
-
/*! @azure/msal-common v14.
|
|
5806
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5801
5807
|
|
|
5802
5808
|
/*
|
|
5803
5809
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5834,7 +5840,7 @@ class NetworkManager {
|
|
|
5834
5840
|
}
|
|
5835
5841
|
}
|
|
5836
5842
|
|
|
5837
|
-
/*! @azure/msal-common v14.
|
|
5843
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5838
5844
|
/*
|
|
5839
5845
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5840
5846
|
* Licensed under the MIT License.
|
|
@@ -5844,7 +5850,7 @@ const CcsCredentialType = {
|
|
|
5844
5850
|
UPN: "UPN",
|
|
5845
5851
|
};
|
|
5846
5852
|
|
|
5847
|
-
/*! @azure/msal-common v14.
|
|
5853
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5848
5854
|
|
|
5849
5855
|
/*
|
|
5850
5856
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5928,7 +5934,7 @@ class RequestValidator {
|
|
|
5928
5934
|
}
|
|
5929
5935
|
}
|
|
5930
5936
|
|
|
5931
|
-
/*! @azure/msal-common v14.
|
|
5937
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
5932
5938
|
|
|
5933
5939
|
/*
|
|
5934
5940
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6312,7 +6318,7 @@ class RequestParameterBuilder {
|
|
|
6312
6318
|
}
|
|
6313
6319
|
}
|
|
6314
6320
|
|
|
6315
|
-
/*! @azure/msal-common v14.
|
|
6321
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6316
6322
|
|
|
6317
6323
|
/*
|
|
6318
6324
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6415,7 +6421,7 @@ class BaseClient {
|
|
|
6415
6421
|
}
|
|
6416
6422
|
}
|
|
6417
6423
|
|
|
6418
|
-
/*! @azure/msal-common v14.
|
|
6424
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6419
6425
|
/*
|
|
6420
6426
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6421
6427
|
* Licensed under the MIT License.
|
|
@@ -6441,7 +6447,7 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
6441
6447
|
refreshTokenExpired: refreshTokenExpired
|
|
6442
6448
|
});
|
|
6443
6449
|
|
|
6444
|
-
/*! @azure/msal-common v14.
|
|
6450
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6445
6451
|
|
|
6446
6452
|
/*
|
|
6447
6453
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6529,7 +6535,7 @@ function createInteractionRequiredAuthError(errorCode) {
|
|
|
6529
6535
|
return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
|
|
6530
6536
|
}
|
|
6531
6537
|
|
|
6532
|
-
/*! @azure/msal-common v14.
|
|
6538
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6533
6539
|
/*
|
|
6534
6540
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6535
6541
|
* Licensed under the MIT License.
|
|
@@ -6545,7 +6551,7 @@ class CacheRecord {
|
|
|
6545
6551
|
}
|
|
6546
6552
|
}
|
|
6547
6553
|
|
|
6548
|
-
/*! @azure/msal-common v14.
|
|
6554
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6549
6555
|
|
|
6550
6556
|
/*
|
|
6551
6557
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6617,7 +6623,7 @@ class ProtocolUtils {
|
|
|
6617
6623
|
}
|
|
6618
6624
|
}
|
|
6619
6625
|
|
|
6620
|
-
/*! @azure/msal-common v14.
|
|
6626
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6621
6627
|
|
|
6622
6628
|
/*
|
|
6623
6629
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6642,11 +6648,10 @@ class PopTokenGenerator {
|
|
|
6642
6648
|
async generateCnf(request, logger) {
|
|
6643
6649
|
this.performanceClient?.addQueueMeasurement(PerformanceEvents.PopTokenGenerateCnf, request.correlationId);
|
|
6644
6650
|
const reqCnf = await invokeAsync(this.generateKid.bind(this), PerformanceEvents.PopTokenGenerateCnf, logger, this.performanceClient, request.correlationId)(request);
|
|
6645
|
-
const reqCnfString = this.cryptoUtils.
|
|
6651
|
+
const reqCnfString = this.cryptoUtils.base64UrlEncode(JSON.stringify(reqCnf));
|
|
6646
6652
|
return {
|
|
6647
6653
|
kid: reqCnf.kid,
|
|
6648
6654
|
reqCnfString,
|
|
6649
|
-
reqCnfHash: await this.cryptoUtils.hashString(reqCnfString),
|
|
6650
6655
|
};
|
|
6651
6656
|
}
|
|
6652
6657
|
/**
|
|
@@ -6702,7 +6707,7 @@ class PopTokenGenerator {
|
|
|
6702
6707
|
}
|
|
6703
6708
|
}
|
|
6704
6709
|
|
|
6705
|
-
/*! @azure/msal-common v14.
|
|
6710
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6706
6711
|
/*
|
|
6707
6712
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6708
6713
|
* Licensed under the MIT License.
|
|
@@ -6729,7 +6734,7 @@ class PopTokenGenerator {
|
|
|
6729
6734
|
}
|
|
6730
6735
|
}
|
|
6731
6736
|
|
|
6732
|
-
/*! @azure/msal-common v14.
|
|
6737
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
6733
6738
|
|
|
6734
6739
|
/*
|
|
6735
6740
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6997,7 +7002,13 @@ class ResponseHandler {
|
|
|
6997
7002
|
let refreshOn;
|
|
6998
7003
|
let familyId = Constants.EMPTY_STRING;
|
|
6999
7004
|
if (cacheRecord.accessToken) {
|
|
7000
|
-
|
|
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) {
|
|
7001
7012
|
const popTokenGenerator = new PopTokenGenerator(cryptoObj);
|
|
7002
7013
|
const { secret, keyId } = cacheRecord.accessToken;
|
|
7003
7014
|
if (!keyId) {
|
|
@@ -7093,7 +7104,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, idTokenClai
|
|
|
7093
7104
|
return baseAccount;
|
|
7094
7105
|
}
|
|
7095
7106
|
|
|
7096
|
-
/*! @azure/msal-common v14.
|
|
7107
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7097
7108
|
|
|
7098
7109
|
/*
|
|
7099
7110
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7261,9 +7272,16 @@ class AuthorizationCodeClient extends BaseClient {
|
|
|
7261
7272
|
parameterBuilder.addClientInfo();
|
|
7262
7273
|
if (request.authenticationScheme === AuthenticationScheme.POP) {
|
|
7263
7274
|
const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils, this.performanceClient);
|
|
7264
|
-
|
|
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
|
+
}
|
|
7265
7283
|
// SPA PoP requires full Base64Url encoded req_cnf string (unhashed)
|
|
7266
|
-
parameterBuilder.addPopToken(reqCnfData
|
|
7284
|
+
parameterBuilder.addPopToken(reqCnfData);
|
|
7267
7285
|
}
|
|
7268
7286
|
else if (request.authenticationScheme === AuthenticationScheme.SSH) {
|
|
7269
7287
|
if (request.sshJwk) {
|
|
@@ -7457,9 +7475,16 @@ class AuthorizationCodeClient extends BaseClient {
|
|
|
7457
7475
|
// pass the req_cnf for POP
|
|
7458
7476
|
if (request.authenticationScheme === AuthenticationScheme.POP) {
|
|
7459
7477
|
const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils);
|
|
7460
|
-
//
|
|
7461
|
-
|
|
7462
|
-
|
|
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);
|
|
7463
7488
|
}
|
|
7464
7489
|
}
|
|
7465
7490
|
return parameterBuilder.createQueryString();
|
|
@@ -7502,7 +7527,7 @@ class AuthorizationCodeClient extends BaseClient {
|
|
|
7502
7527
|
}
|
|
7503
7528
|
}
|
|
7504
7529
|
|
|
7505
|
-
/*! @azure/msal-common v14.
|
|
7530
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7506
7531
|
|
|
7507
7532
|
/*
|
|
7508
7533
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7667,9 +7692,16 @@ class RefreshTokenClient extends BaseClient {
|
|
|
7667
7692
|
}
|
|
7668
7693
|
if (request.authenticationScheme === AuthenticationScheme.POP) {
|
|
7669
7694
|
const popTokenGenerator = new PopTokenGenerator(this.cryptoUtils, this.performanceClient);
|
|
7670
|
-
|
|
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
|
+
}
|
|
7671
7703
|
// SPA PoP requires full Base64Url encoded req_cnf string (unhashed)
|
|
7672
|
-
parameterBuilder.addPopToken(reqCnfData
|
|
7704
|
+
parameterBuilder.addPopToken(reqCnfData);
|
|
7673
7705
|
}
|
|
7674
7706
|
else if (request.authenticationScheme === AuthenticationScheme.SSH) {
|
|
7675
7707
|
if (request.sshJwk) {
|
|
@@ -7709,7 +7741,7 @@ class RefreshTokenClient extends BaseClient {
|
|
|
7709
7741
|
}
|
|
7710
7742
|
}
|
|
7711
7743
|
|
|
7712
|
-
/*! @azure/msal-common v14.
|
|
7744
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7713
7745
|
|
|
7714
7746
|
/*
|
|
7715
7747
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7845,7 +7877,7 @@ class SilentFlowClient extends BaseClient {
|
|
|
7845
7877
|
}
|
|
7846
7878
|
}
|
|
7847
7879
|
|
|
7848
|
-
/*! @azure/msal-common v14.
|
|
7880
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7849
7881
|
|
|
7850
7882
|
/*
|
|
7851
7883
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7860,7 +7892,7 @@ const StubbedNetworkModule = {
|
|
|
7860
7892
|
},
|
|
7861
7893
|
};
|
|
7862
7894
|
|
|
7863
|
-
/*! @azure/msal-common v14.
|
|
7895
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7864
7896
|
/*
|
|
7865
7897
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7866
7898
|
* Licensed under the MIT License.
|
|
@@ -7868,7 +7900,7 @@ const StubbedNetworkModule = {
|
|
|
7868
7900
|
const missingKidError = "missing_kid_error";
|
|
7869
7901
|
const missingAlgError = "missing_alg_error";
|
|
7870
7902
|
|
|
7871
|
-
/*! @azure/msal-common v14.
|
|
7903
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7872
7904
|
|
|
7873
7905
|
/*
|
|
7874
7906
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7893,7 +7925,7 @@ function createJoseHeaderError(code) {
|
|
|
7893
7925
|
return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
|
|
7894
7926
|
}
|
|
7895
7927
|
|
|
7896
|
-
/*! @azure/msal-common v14.
|
|
7928
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7897
7929
|
|
|
7898
7930
|
/*
|
|
7899
7931
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7933,7 +7965,7 @@ class JoseHeader {
|
|
|
7933
7965
|
}
|
|
7934
7966
|
}
|
|
7935
7967
|
|
|
7936
|
-
/*! @azure/msal-common v14.
|
|
7968
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7937
7969
|
|
|
7938
7970
|
/*
|
|
7939
7971
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7991,7 +8023,7 @@ class AuthenticationHeaderParser {
|
|
|
7991
8023
|
}
|
|
7992
8024
|
}
|
|
7993
8025
|
|
|
7994
|
-
/*! @azure/msal-common v14.
|
|
8026
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
7995
8027
|
|
|
7996
8028
|
/*
|
|
7997
8029
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8195,7 +8227,7 @@ class ServerTelemetryManager {
|
|
|
8195
8227
|
}
|
|
8196
8228
|
}
|
|
8197
8229
|
|
|
8198
|
-
/*! @azure/msal-common v14.
|
|
8230
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
8199
8231
|
|
|
8200
8232
|
/*
|
|
8201
8233
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8274,7 +8306,7 @@ class StubPerformanceClient {
|
|
|
8274
8306
|
}
|
|
8275
8307
|
}
|
|
8276
8308
|
|
|
8277
|
-
/*! @azure/msal-common v14.
|
|
8309
|
+
/*! @azure/msal-common v14.12.0 2024-06-10 */
|
|
8278
8310
|
|
|
8279
8311
|
/*
|
|
8280
8312
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8913,6 +8945,7 @@ const nativeConnectionNotEstablished = "native_connection_not_established";
|
|
|
8913
8945
|
const uninitializedPublicClientApplication = "uninitialized_public_client_application";
|
|
8914
8946
|
const nativePromptNotSupported = "native_prompt_not_supported";
|
|
8915
8947
|
const invalidBase64String = "invalid_base64_string";
|
|
8948
|
+
const invalidPopTokenRequest = "invalid_pop_token_request";
|
|
8916
8949
|
|
|
8917
8950
|
var BrowserAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
8918
8951
|
__proto__: null,
|
|
@@ -8935,6 +8968,7 @@ var BrowserAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
8935
8968
|
interactionInProgress: interactionInProgress,
|
|
8936
8969
|
invalidBase64String: invalidBase64String,
|
|
8937
8970
|
invalidCacheType: invalidCacheType,
|
|
8971
|
+
invalidPopTokenRequest: invalidPopTokenRequest,
|
|
8938
8972
|
monitorPopupTimeout: monitorPopupTimeout,
|
|
8939
8973
|
monitorWindowTimeout: monitorWindowTimeout,
|
|
8940
8974
|
nativeConnectionNotEstablished: nativeConnectionNotEstablished,
|
|
@@ -9017,6 +9051,7 @@ const BrowserAuthErrorMessages = {
|
|
|
9017
9051
|
[uninitializedPublicClientApplication]: `You must call and await the initialize function before attempting to call any other MSAL API. ${ErrorLink}`,
|
|
9018
9052
|
[nativePromptNotSupported]: "The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",
|
|
9019
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.",
|
|
9020
9055
|
};
|
|
9021
9056
|
/**
|
|
9022
9057
|
* BrowserAuthErrorMessage class containing string constants used by error codes and messages.
|
|
@@ -9207,6 +9242,10 @@ const BrowserAuthErrorMessage = {
|
|
|
9207
9242
|
code: invalidBase64String,
|
|
9208
9243
|
desc: BrowserAuthErrorMessages[invalidBase64String],
|
|
9209
9244
|
},
|
|
9245
|
+
invalidPopTokenRequest: {
|
|
9246
|
+
code: invalidPopTokenRequest,
|
|
9247
|
+
desc: BrowserAuthErrorMessages[invalidPopTokenRequest],
|
|
9248
|
+
},
|
|
9210
9249
|
};
|
|
9211
9250
|
/**
|
|
9212
9251
|
* Browser library error class thrown by the MSAL.js library for SPAs
|
|
@@ -10138,7 +10177,7 @@ function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system
|
|
|
10138
10177
|
|
|
10139
10178
|
/* eslint-disable header/header */
|
|
10140
10179
|
const name = "@azure/msal-browser";
|
|
10141
|
-
const version = "3.
|
|
10180
|
+
const version = "3.17.0";
|
|
10142
10181
|
|
|
10143
10182
|
/*
|
|
10144
10183
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -10954,6 +10993,21 @@ class CryptoOps {
|
|
|
10954
10993
|
base64Decode(input) {
|
|
10955
10994
|
return base64Decode(input);
|
|
10956
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
|
+
}
|
|
10957
11011
|
/**
|
|
10958
11012
|
* Generates a keypair, stores it and returns a thumbprint
|
|
10959
11013
|
* @param request
|
|
@@ -13294,10 +13348,11 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13294
13348
|
// continue with a native call for any and all errors
|
|
13295
13349
|
this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call");
|
|
13296
13350
|
}
|
|
13351
|
+
const { ...nativeTokenRequest } = nativeRequest;
|
|
13297
13352
|
// fall back to native calls
|
|
13298
13353
|
const messageBody = {
|
|
13299
13354
|
method: NativeExtensionMethod.GetToken,
|
|
13300
|
-
request:
|
|
13355
|
+
request: nativeTokenRequest,
|
|
13301
13356
|
};
|
|
13302
13357
|
const response = await this.nativeMessageHandler.sendMessage(messageBody);
|
|
13303
13358
|
const validatedResponse = this.validateNativeResponse(response);
|
|
@@ -13379,9 +13434,10 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13379
13434
|
async acquireTokenRedirect(request, rootMeasurement) {
|
|
13380
13435
|
this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");
|
|
13381
13436
|
const nativeRequest = await this.initializeNativeRequest(request);
|
|
13437
|
+
const { ...nativeTokenRequest } = nativeRequest;
|
|
13382
13438
|
const messageBody = {
|
|
13383
13439
|
method: NativeExtensionMethod.GetToken,
|
|
13384
|
-
request:
|
|
13440
|
+
request: nativeTokenRequest,
|
|
13385
13441
|
};
|
|
13386
13442
|
try {
|
|
13387
13443
|
const response = await this.nativeMessageHandler.sendMessage(messageBody);
|
|
@@ -13484,7 +13540,7 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13484
13540
|
const result = await this.generateAuthenticationResult(response, request, idTokenClaims, baseAccount, authority.canonicalAuthority, reqTimestamp);
|
|
13485
13541
|
// cache accounts and tokens in the appropriate storage
|
|
13486
13542
|
this.cacheAccount(baseAccount);
|
|
13487
|
-
this.cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims,
|
|
13543
|
+
this.cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, response.access_token, result.tenantId, reqTimestamp);
|
|
13488
13544
|
return result;
|
|
13489
13545
|
}
|
|
13490
13546
|
/**
|
|
@@ -13515,7 +13571,8 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13515
13571
|
* @param response
|
|
13516
13572
|
*/
|
|
13517
13573
|
async generatePopAccessToken(response, request) {
|
|
13518
|
-
if (request.tokenType === AuthenticationScheme.POP
|
|
13574
|
+
if (request.tokenType === AuthenticationScheme.POP &&
|
|
13575
|
+
request.signPopToken) {
|
|
13519
13576
|
/**
|
|
13520
13577
|
* This code prioritizes SHR returned from the native layer. In case of error/SHR not calculated from WAM and the AT
|
|
13521
13578
|
* is still received, SHR is calculated locally
|
|
@@ -13635,7 +13692,7 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13635
13692
|
: response.expires_in) || 0;
|
|
13636
13693
|
const tokenExpirationSeconds = reqTimestamp + expiresIn;
|
|
13637
13694
|
const responseScopes = this.generateScopes(response, request);
|
|
13638
|
-
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);
|
|
13639
13696
|
const nativeCacheRecord = new CacheRecord(undefined, cachedIdToken, cachedAccessToken);
|
|
13640
13697
|
void this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, request.storeInCache);
|
|
13641
13698
|
}
|
|
@@ -13765,8 +13822,13 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13765
13822
|
...request.extraQueryParameters,
|
|
13766
13823
|
...request.tokenQueryParameters,
|
|
13767
13824
|
},
|
|
13768
|
-
extendedExpiryToken: false,
|
|
13825
|
+
extendedExpiryToken: false,
|
|
13826
|
+
keyId: request.popKid,
|
|
13769
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
|
+
}
|
|
13770
13832
|
this.handleExtraBrokerParams(validatedRequest);
|
|
13771
13833
|
validatedRequest.extraParameters =
|
|
13772
13834
|
validatedRequest.extraParameters || {};
|
|
@@ -13781,10 +13843,20 @@ class NativeInteractionClient extends BaseInteractionClient {
|
|
|
13781
13843
|
shrNonce: request.shrNonce,
|
|
13782
13844
|
};
|
|
13783
13845
|
const popTokenGenerator = new PopTokenGenerator(this.browserCrypto);
|
|
13784
|
-
|
|
13785
|
-
|
|
13786
|
-
validatedRequest.
|
|
13787
|
-
|
|
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;
|
|
13788
13860
|
}
|
|
13789
13861
|
return validatedRequest;
|
|
13790
13862
|
}
|