@azure/msal-browser 5.17.0 → 5.17.3
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/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +2 -4
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthProvider.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/CacheHelpers.mjs +1 -1
- package/dist/cache/CacheKeys.mjs +1 -1
- package/dist/cache/CookieStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/EncryptedData.mjs +1 -1
- package/dist/cache/LocalStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/SessionStorage.mjs +1 -1
- package/dist/cache/TokenCache.mjs +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.mjs +23 -26
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/crypto/BrowserCrypto.mjs +61 -12
- package/dist/crypto/BrowserCrypto.mjs.map +1 -1
- package/dist/crypto/CryptoOps.mjs +6 -12
- package/dist/crypto/CryptoOps.mjs.map +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
- package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +1 -1
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs +1 -1
- package/dist/custom_auth/core/CustomAuthAuthority.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
- package/dist/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
- package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
- package/dist/custom_auth/core/error/HttpError.mjs +1 -1
- package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
- package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
- package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
- package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
- package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
- package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
- package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
- package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
- package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
- package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
- package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
- package/dist/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
- package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
- package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
- package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
- package/dist/custom_auth/index.mjs +1 -1
- package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
- package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
- package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
- package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
- package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
- package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
- package/dist/encode/Base64Decode.mjs +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.mjs +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/PlatformAuthInteractionClient.mjs +123 -59
- package/dist/interaction_client/PlatformAuthInteractionClient.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/SilentHandler.mjs +1 -1
- package/dist/log-strings-mapping.json +1201 -1201
- 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 +39 -13
- package/dist/network/FetchClient.mjs.map +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/packageMetadata.mjs +2 -2
- package/dist/popup_relay/constants.mjs +1 -1
- package/dist/popup_relay/index.mjs +1 -1
- package/dist/popup_relay/relayClient.mjs +1 -1
- package/dist/protocol/Authorize.mjs +1 -1
- package/dist/redirect_bridge/index.mjs +1 -1
- package/dist/request/RequestHelpers.mjs +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceEvents.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/telemetry/BrowserRootPerformanceEvents.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/dist/utils/Helpers.mjs +1 -1
- package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
- package/lib/custom-auth-path/log-strings-mapping.json +2 -2
- package/lib/custom-auth-path/msal-custom-auth.cjs +317 -184
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +317 -184
- package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
- package/lib/log-strings-mapping.json +2 -2
- package/lib/msal-browser.cjs +326 -187
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +326 -187
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
- package/lib/popup-relay/msal-popup-relay.js +2 -2
- package/lib/popup-relay/msal-popup-relay.js.map +1 -1
- package/lib/popup-relay/msal-popup-relay.min.js +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
- package/package.json +2 -2
- package/src/broker/nativeBroker/PlatformAuthDOMHandler.ts +0 -4
- package/src/broker/nativeBroker/PlatformAuthRequest.ts +4 -7
- package/src/controllers/StandardController.ts +24 -29
- package/src/crypto/BrowserCrypto.ts +104 -9
- package/src/crypto/CryptoOps.ts +13 -12
- package/src/error/BrowserAuthErrorCodes.ts +1 -0
- package/src/interaction_client/PlatformAuthInteractionClient.ts +160 -72
- package/src/network/FetchClient.ts +62 -14
- package/src/packageMetadata.ts +1 -1
- package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthRequest.d.ts +3 -6
- package/types/broker/nativeBroker/PlatformAuthRequest.d.ts.map +1 -1
- package/types/controllers/StandardController.d.ts +3 -0
- package/types/controllers/StandardController.d.ts.map +1 -1
- package/types/crypto/BrowserCrypto.d.ts +19 -5
- package/types/crypto/BrowserCrypto.d.ts.map +1 -1
- package/types/crypto/CryptoOps.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/types/error/BrowserAuthErrorCodes.d.ts +1 -0
- package/types/error/BrowserAuthErrorCodes.d.ts.map +1 -1
- package/types/interaction_client/PlatformAuthInteractionClient.d.ts +13 -3
- package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/types/network/FetchClient.d.ts.map +1 -1
- package/types/packageMetadata.d.ts +1 -1
package/lib/msal-browser.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.17.
|
|
1
|
+
/*! @azure/msal-browser v5.17.3 2026-07-29 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
/*! @azure/msal-common v16.11.
|
|
5
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6
6
|
/*
|
|
7
7
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8
8
|
* Licensed under the MIT License.
|
|
@@ -54,7 +54,7 @@ const EAR_JWE_CRYPTO = "ear_jwe_crypto";
|
|
|
54
54
|
const RESOURCE = "resource";
|
|
55
55
|
const CLI_DATA = "clidata";
|
|
56
56
|
|
|
57
|
-
/*! @azure/msal-common v16.11.
|
|
57
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
58
58
|
/*
|
|
59
59
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
60
60
|
* Licensed under the MIT License.
|
|
@@ -290,7 +290,7 @@ const JsonWebTokenTypes$1 = {
|
|
|
290
290
|
// Token renewal offset default in seconds
|
|
291
291
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
292
292
|
|
|
293
|
-
/*! @azure/msal-common v16.11.
|
|
293
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
294
294
|
/*
|
|
295
295
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
296
296
|
* Licensed under the MIT License.
|
|
@@ -319,7 +319,7 @@ function createAuthError(code, correlationId, additionalMessage) {
|
|
|
319
319
|
return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage$1(code));
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
-
/*! @azure/msal-common v16.11.
|
|
322
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
323
323
|
|
|
324
324
|
/*
|
|
325
325
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -342,7 +342,7 @@ function createClientAuthError(errorCode, correlationId, additionalMessage) {
|
|
|
342
342
|
return new ClientAuthError(errorCode, correlationId, additionalMessage);
|
|
343
343
|
}
|
|
344
344
|
|
|
345
|
-
/*! @azure/msal-common v16.11.
|
|
345
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
346
346
|
/*
|
|
347
347
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
348
348
|
* Licensed under the MIT License.
|
|
@@ -426,7 +426,7 @@ var ClientAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
426
426
|
userCanceled: userCanceled
|
|
427
427
|
});
|
|
428
428
|
|
|
429
|
-
/*! @azure/msal-common v16.11.
|
|
429
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
430
430
|
|
|
431
431
|
/*
|
|
432
432
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -464,7 +464,7 @@ function buildClientInfoFromHomeAccountId(homeAccountId) {
|
|
|
464
464
|
};
|
|
465
465
|
}
|
|
466
466
|
|
|
467
|
-
/*! @azure/msal-common v16.11.
|
|
467
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
468
468
|
|
|
469
469
|
/*
|
|
470
470
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -530,7 +530,7 @@ function getJWSPayload(authToken, correlationId) {
|
|
|
530
530
|
return matches[2];
|
|
531
531
|
}
|
|
532
532
|
|
|
533
|
-
/*! @azure/msal-common v16.11.
|
|
533
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
534
534
|
|
|
535
535
|
/*
|
|
536
536
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -618,7 +618,7 @@ function updateAccountTenantProfileData(baseAccountInfo, tenantProfile, idTokenC
|
|
|
618
618
|
return updatedAccountInfo;
|
|
619
619
|
}
|
|
620
620
|
|
|
621
|
-
/*! @azure/msal-common v16.11.
|
|
621
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
622
622
|
/*
|
|
623
623
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
624
624
|
* Licensed under the MIT License.
|
|
@@ -633,7 +633,7 @@ const AuthorityType = {
|
|
|
633
633
|
Ciam: 3,
|
|
634
634
|
};
|
|
635
635
|
|
|
636
|
-
/*! @azure/msal-common v16.11.
|
|
636
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
637
637
|
/*
|
|
638
638
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
639
639
|
* Licensed under the MIT License.
|
|
@@ -655,7 +655,7 @@ function getTenantIdFromIdTokenClaims(idTokenClaims) {
|
|
|
655
655
|
return null;
|
|
656
656
|
}
|
|
657
657
|
|
|
658
|
-
/*! @azure/msal-common v16.11.
|
|
658
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
659
659
|
/*
|
|
660
660
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
661
661
|
* Licensed under the MIT License.
|
|
@@ -679,7 +679,7 @@ const ProtocolMode = {
|
|
|
679
679
|
EAR: "EAR",
|
|
680
680
|
};
|
|
681
681
|
|
|
682
|
-
/*! @azure/msal-common v16.11.
|
|
682
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
683
683
|
/**
|
|
684
684
|
* Returns the AccountInfo interface for this account.
|
|
685
685
|
* @internal
|
|
@@ -868,7 +868,7 @@ function isAccountEntity(entity) {
|
|
|
868
868
|
entity.hasOwnProperty("authorityType"));
|
|
869
869
|
}
|
|
870
870
|
|
|
871
|
-
/*! @azure/msal-common v16.11.
|
|
871
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
872
872
|
/*
|
|
873
873
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
874
874
|
* Licensed under the MIT License.
|
|
@@ -885,7 +885,7 @@ var AuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
885
885
|
unexpectedError: unexpectedError
|
|
886
886
|
});
|
|
887
887
|
|
|
888
|
-
/*! @azure/msal-common v16.11.
|
|
888
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
889
889
|
|
|
890
890
|
/*
|
|
891
891
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -905,7 +905,7 @@ function createClientConfigurationError(errorCode, correlationId) {
|
|
|
905
905
|
return new ClientConfigurationError(errorCode, correlationId);
|
|
906
906
|
}
|
|
907
907
|
|
|
908
|
-
/*! @azure/msal-common v16.11.
|
|
908
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
909
909
|
/*
|
|
910
910
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
911
911
|
* Licensed under the MIT License.
|
|
@@ -934,7 +934,9 @@ const authorityMismatch = "authority_mismatch";
|
|
|
934
934
|
const invalidRequestMethodForEAR = "invalid_request_method_for_EAR";
|
|
935
935
|
const invalidPlatformBrokerConfiguration = "invalid_platform_broker_configuration";
|
|
936
936
|
const issuerValidationFailed = "issuer_validation_failed";
|
|
937
|
-
const invalidResponseMode = "invalid_response_mode";
|
|
937
|
+
const invalidResponseMode = "invalid_response_mode";
|
|
938
|
+
const invalidDpopHtm = "invalid_dpop_htm";
|
|
939
|
+
const invalidDpopHtu = "invalid_dpop_htu";
|
|
938
940
|
|
|
939
941
|
var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
|
|
940
942
|
__proto__: null,
|
|
@@ -949,6 +951,8 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
949
951
|
invalidClaims: invalidClaims,
|
|
950
952
|
invalidCloudDiscoveryMetadata: invalidCloudDiscoveryMetadata,
|
|
951
953
|
invalidCodeChallengeMethod: invalidCodeChallengeMethod,
|
|
954
|
+
invalidDpopHtm: invalidDpopHtm,
|
|
955
|
+
invalidDpopHtu: invalidDpopHtu,
|
|
952
956
|
invalidPlatformBrokerConfiguration: invalidPlatformBrokerConfiguration,
|
|
953
957
|
invalidRequestMethodForEAR: invalidRequestMethodForEAR,
|
|
954
958
|
invalidResponseMode: invalidResponseMode,
|
|
@@ -965,7 +969,7 @@ var ClientConfigurationErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
965
969
|
urlParseError: urlParseError
|
|
966
970
|
});
|
|
967
971
|
|
|
968
|
-
/*! @azure/msal-common v16.11.
|
|
972
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
969
973
|
|
|
970
974
|
/*
|
|
971
975
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1023,7 +1027,7 @@ class AuthenticationHeaderParser {
|
|
|
1023
1027
|
}
|
|
1024
1028
|
}
|
|
1025
1029
|
|
|
1026
|
-
/*! @azure/msal-common v16.11.
|
|
1030
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1027
1031
|
/*
|
|
1028
1032
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1029
1033
|
* Licensed under the MIT License.
|
|
@@ -1035,7 +1039,7 @@ function isOpenIdConfigResponse(response) {
|
|
|
1035
1039
|
response.hasOwnProperty("jwks_uri"));
|
|
1036
1040
|
}
|
|
1037
1041
|
|
|
1038
|
-
/*! @azure/msal-common v16.11.
|
|
1042
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1039
1043
|
/*
|
|
1040
1044
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1041
1045
|
* Licensed under the MIT License.
|
|
@@ -1115,7 +1119,7 @@ class StringUtils {
|
|
|
1115
1119
|
}
|
|
1116
1120
|
}
|
|
1117
1121
|
|
|
1118
|
-
/*! @azure/msal-common v16.11.
|
|
1122
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1119
1123
|
|
|
1120
1124
|
/*
|
|
1121
1125
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1273,7 +1277,7 @@ class UrlString {
|
|
|
1273
1277
|
}
|
|
1274
1278
|
}
|
|
1275
1279
|
|
|
1276
|
-
/*! @azure/msal-common v16.11.
|
|
1280
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1277
1281
|
|
|
1278
1282
|
/*
|
|
1279
1283
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1439,7 +1443,7 @@ function getCloudDiscoveryMetadataFromNetworkResponse(response, authorityHost) {
|
|
|
1439
1443
|
return null;
|
|
1440
1444
|
}
|
|
1441
1445
|
|
|
1442
|
-
/*! @azure/msal-common v16.11.
|
|
1446
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1443
1447
|
/*
|
|
1444
1448
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1445
1449
|
* Licensed under the MIT License.
|
|
@@ -1459,7 +1463,7 @@ const AzureCloudInstance = {
|
|
|
1459
1463
|
AzureUsGovernment: "https://login.microsoftonline.us",
|
|
1460
1464
|
};
|
|
1461
1465
|
|
|
1462
|
-
/*! @azure/msal-common v16.11.
|
|
1466
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1463
1467
|
/*
|
|
1464
1468
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1465
1469
|
* Licensed under the MIT License.
|
|
@@ -1469,7 +1473,7 @@ function isCloudInstanceDiscoveryResponse(response) {
|
|
|
1469
1473
|
response.hasOwnProperty("metadata"));
|
|
1470
1474
|
}
|
|
1471
1475
|
|
|
1472
|
-
/*! @azure/msal-common v16.11.
|
|
1476
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1473
1477
|
/*
|
|
1474
1478
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1475
1479
|
* Licensed under the MIT License.
|
|
@@ -1479,7 +1483,7 @@ function isCloudInstanceDiscoveryErrorResponse(response) {
|
|
|
1479
1483
|
response.hasOwnProperty("error_description"));
|
|
1480
1484
|
}
|
|
1481
1485
|
|
|
1482
|
-
/*! @azure/msal-common v16.11.
|
|
1486
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1483
1487
|
/*
|
|
1484
1488
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1485
1489
|
* Licensed under the MIT License.
|
|
@@ -1550,7 +1554,7 @@ const RegionDiscoveryGetCurrentVersion = "regionDiscoveryGetCurrentVersion";
|
|
|
1550
1554
|
const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
|
|
1551
1555
|
const SetUserData = "setUserData";
|
|
1552
1556
|
|
|
1553
|
-
/*! @azure/msal-common v16.11.
|
|
1557
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1554
1558
|
/*
|
|
1555
1559
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1556
1560
|
* Licensed under the MIT License.
|
|
@@ -1643,7 +1647,7 @@ const invokeAsync = (callback, eventName, logger, telemetryClient, correlationId
|
|
|
1643
1647
|
};
|
|
1644
1648
|
};
|
|
1645
1649
|
|
|
1646
|
-
/*! @azure/msal-common v16.11.
|
|
1650
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1647
1651
|
|
|
1648
1652
|
/*
|
|
1649
1653
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1754,7 +1758,7 @@ RegionDiscovery.IMDS_OPTIONS = {
|
|
|
1754
1758
|
},
|
|
1755
1759
|
};
|
|
1756
1760
|
|
|
1757
|
-
/*! @azure/msal-common v16.11.
|
|
1761
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1758
1762
|
/*
|
|
1759
1763
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1760
1764
|
* Licensed under the MIT License.
|
|
@@ -1819,7 +1823,7 @@ function wasClockTurnedBack(cachedAt) {
|
|
|
1819
1823
|
return cachedAtSec > nowSeconds();
|
|
1820
1824
|
}
|
|
1821
1825
|
|
|
1822
|
-
/*! @azure/msal-common v16.11.
|
|
1826
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1823
1827
|
|
|
1824
1828
|
/*
|
|
1825
1829
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2086,7 +2090,7 @@ function isAuthorityMetadataExpired(metadata) {
|
|
|
2086
2090
|
return metadata.expiresAt <= nowSeconds();
|
|
2087
2091
|
}
|
|
2088
2092
|
|
|
2089
|
-
/*! @azure/msal-common v16.11.
|
|
2093
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
2090
2094
|
|
|
2091
2095
|
/*
|
|
2092
2096
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3056,7 +3060,7 @@ function buildStaticAuthorityOptions(authOptions) {
|
|
|
3056
3060
|
};
|
|
3057
3061
|
}
|
|
3058
3062
|
|
|
3059
|
-
/*! @azure/msal-common v16.11.
|
|
3063
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
3060
3064
|
|
|
3061
3065
|
/*
|
|
3062
3066
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3090,7 +3094,7 @@ async function createDiscoveredInstance(authorityUri, networkClient, cacheManage
|
|
|
3090
3094
|
}
|
|
3091
3095
|
}
|
|
3092
3096
|
|
|
3093
|
-
/*! @azure/msal-common v16.11.
|
|
3097
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
3094
3098
|
|
|
3095
3099
|
/*
|
|
3096
3100
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3286,7 +3290,7 @@ class ScopeSet {
|
|
|
3286
3290
|
}
|
|
3287
3291
|
}
|
|
3288
3292
|
|
|
3289
|
-
/*! @azure/msal-common v16.11.
|
|
3293
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
3290
3294
|
|
|
3291
3295
|
/*
|
|
3292
3296
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3701,7 +3705,7 @@ function addResource(parameters, resource) {
|
|
|
3701
3705
|
}
|
|
3702
3706
|
}
|
|
3703
3707
|
|
|
3704
|
-
/*! @azure/msal-common v16.11.
|
|
3708
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
3705
3709
|
|
|
3706
3710
|
/*
|
|
3707
3711
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3823,12 +3827,16 @@ function validateUrl(url, logger, correlationId) {
|
|
|
3823
3827
|
}
|
|
3824
3828
|
}
|
|
3825
3829
|
|
|
3826
|
-
/*! @azure/msal-common v16.11.
|
|
3830
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
3827
3831
|
|
|
3828
3832
|
/*
|
|
3829
3833
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3830
3834
|
* Licensed under the MIT License.
|
|
3831
3835
|
*/
|
|
3836
|
+
/**
|
|
3837
|
+
* Default crypto implementation used when a platform-specific implementation has
|
|
3838
|
+
* not been provided.
|
|
3839
|
+
*/
|
|
3832
3840
|
const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
3833
3841
|
createNewGuid: () => {
|
|
3834
3842
|
throw createClientAuthError(methodNotImplemented, "");
|
|
@@ -3862,7 +3870,7 @@ const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
|
3862
3870
|
},
|
|
3863
3871
|
};
|
|
3864
3872
|
|
|
3865
|
-
/*! @azure/msal-common v16.11.
|
|
3873
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
3866
3874
|
/*
|
|
3867
3875
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3868
3876
|
* Licensed under the MIT License.
|
|
@@ -4151,12 +4159,12 @@ class Logger {
|
|
|
4151
4159
|
}
|
|
4152
4160
|
}
|
|
4153
4161
|
|
|
4154
|
-
/*! @azure/msal-common v16.11.
|
|
4162
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
4155
4163
|
/* eslint-disable header/header */
|
|
4156
4164
|
const name$1 = "@azure/msal-common";
|
|
4157
|
-
const version$1 = "16.11.
|
|
4165
|
+
const version$1 = "16.11.3";
|
|
4158
4166
|
|
|
4159
|
-
/*! @azure/msal-common v16.11.
|
|
4167
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
4160
4168
|
/*
|
|
4161
4169
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4162
4170
|
* Licensed under the MIT License.
|
|
@@ -4164,7 +4172,7 @@ const version$1 = "16.11.1";
|
|
|
4164
4172
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
4165
4173
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
4166
4174
|
|
|
4167
|
-
/*! @azure/msal-common v16.11.
|
|
4175
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
4168
4176
|
|
|
4169
4177
|
/*
|
|
4170
4178
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4202,7 +4210,7 @@ function createCacheError(e) {
|
|
|
4202
4210
|
}
|
|
4203
4211
|
}
|
|
4204
4212
|
|
|
4205
|
-
/*! @azure/msal-common v16.11.
|
|
4213
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
4206
4214
|
|
|
4207
4215
|
/*
|
|
4208
4216
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5350,7 +5358,7 @@ class DefaultStorageClass extends CacheManager {
|
|
|
5350
5358
|
}
|
|
5351
5359
|
}
|
|
5352
5360
|
|
|
5353
|
-
/*! @azure/msal-common v16.11.
|
|
5361
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5354
5362
|
/*
|
|
5355
5363
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5356
5364
|
* Licensed under the MIT License.
|
|
@@ -5412,9 +5420,10 @@ const IntFields = new Set([
|
|
|
5412
5420
|
"networkRtt",
|
|
5413
5421
|
"redirectBridgeTimeoutMs",
|
|
5414
5422
|
"redirectBridgeMessageVersion",
|
|
5423
|
+
"fetchRetryCount",
|
|
5415
5424
|
]);
|
|
5416
5425
|
|
|
5417
|
-
/*! @azure/msal-common v16.11.
|
|
5426
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5418
5427
|
|
|
5419
5428
|
/*
|
|
5420
5429
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5472,7 +5481,7 @@ class StubPerformanceClient {
|
|
|
5472
5481
|
}
|
|
5473
5482
|
}
|
|
5474
5483
|
|
|
5475
|
-
/*! @azure/msal-common v16.11.
|
|
5484
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5476
5485
|
|
|
5477
5486
|
/*
|
|
5478
5487
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5568,7 +5577,7 @@ function isOidcProtocolMode(config) {
|
|
|
5568
5577
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
5569
5578
|
}
|
|
5570
5579
|
|
|
5571
|
-
/*! @azure/msal-common v16.11.
|
|
5580
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5572
5581
|
/*
|
|
5573
5582
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5574
5583
|
* Licensed under the MIT License.
|
|
@@ -5595,7 +5604,7 @@ function isOidcProtocolMode(config) {
|
|
|
5595
5604
|
}
|
|
5596
5605
|
}
|
|
5597
5606
|
|
|
5598
|
-
/*! @azure/msal-common v16.11.
|
|
5607
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5599
5608
|
|
|
5600
5609
|
/*
|
|
5601
5610
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5675,7 +5684,7 @@ class PopTokenGenerator {
|
|
|
5675
5684
|
}
|
|
5676
5685
|
}
|
|
5677
5686
|
|
|
5678
|
-
/*! @azure/msal-common v16.11.
|
|
5687
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5679
5688
|
/*
|
|
5680
5689
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5681
5690
|
* Licensed under the MIT License.
|
|
@@ -5739,7 +5748,7 @@ var InteractionRequiredAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
5739
5748
|
uiNotAllowed: uiNotAllowed
|
|
5740
5749
|
});
|
|
5741
5750
|
|
|
5742
|
-
/*! @azure/msal-common v16.11.
|
|
5751
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5743
5752
|
|
|
5744
5753
|
/*
|
|
5745
5754
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5806,7 +5815,7 @@ function createInteractionRequiredAuthError(errorCode, correlationId, errorMessa
|
|
|
5806
5815
|
return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
|
|
5807
5816
|
}
|
|
5808
5817
|
|
|
5809
|
-
/*! @azure/msal-common v16.11.
|
|
5818
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5810
5819
|
|
|
5811
5820
|
/*
|
|
5812
5821
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5825,7 +5834,7 @@ class ServerError extends AuthError {
|
|
|
5825
5834
|
}
|
|
5826
5835
|
}
|
|
5827
5836
|
|
|
5828
|
-
/*! @azure/msal-common v16.11.
|
|
5837
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5829
5838
|
|
|
5830
5839
|
/*
|
|
5831
5840
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5896,7 +5905,7 @@ function parseRequestState(base64Decode, state, correlationId) {
|
|
|
5896
5905
|
}
|
|
5897
5906
|
}
|
|
5898
5907
|
|
|
5899
|
-
/*! @azure/msal-common v16.11.
|
|
5908
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5900
5909
|
|
|
5901
5910
|
/*
|
|
5902
5911
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6247,7 +6256,7 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
|
|
|
6247
6256
|
return baseAccount;
|
|
6248
6257
|
}
|
|
6249
6258
|
|
|
6250
|
-
/*! @azure/msal-common v16.11.
|
|
6259
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6251
6260
|
/*
|
|
6252
6261
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6253
6262
|
* Licensed under the MIT License.
|
|
@@ -6257,7 +6266,7 @@ const CcsCredentialType = {
|
|
|
6257
6266
|
UPN: "UPN",
|
|
6258
6267
|
};
|
|
6259
6268
|
|
|
6260
|
-
/*! @azure/msal-common v16.11.
|
|
6269
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6261
6270
|
/*
|
|
6262
6271
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6263
6272
|
* Licensed under the MIT License.
|
|
@@ -6276,7 +6285,7 @@ async function getClientAssertion(clientAssertion, clientId, tokenEndpoint, fmiP
|
|
|
6276
6285
|
}
|
|
6277
6286
|
}
|
|
6278
6287
|
|
|
6279
|
-
/*! @azure/msal-common v16.11.
|
|
6288
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6280
6289
|
/*
|
|
6281
6290
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6282
6291
|
* Licensed under the MIT License.
|
|
@@ -6298,7 +6307,7 @@ function getRequestThumbprint(clientId, request, homeAccountId) {
|
|
|
6298
6307
|
};
|
|
6299
6308
|
}
|
|
6300
6309
|
|
|
6301
|
-
/*! @azure/msal-common v16.11.
|
|
6310
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6302
6311
|
|
|
6303
6312
|
/*
|
|
6304
6313
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6384,7 +6393,7 @@ class ThrottlingUtils {
|
|
|
6384
6393
|
}
|
|
6385
6394
|
}
|
|
6386
6395
|
|
|
6387
|
-
/*! @azure/msal-common v16.11.
|
|
6396
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6388
6397
|
|
|
6389
6398
|
/*
|
|
6390
6399
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6415,7 +6424,7 @@ function createNetworkError(error, httpStatus, responseHeaders, additionalError)
|
|
|
6415
6424
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
6416
6425
|
}
|
|
6417
6426
|
|
|
6418
|
-
/*! @azure/msal-common v16.11.
|
|
6427
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6419
6428
|
|
|
6420
6429
|
/*
|
|
6421
6430
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6495,7 +6504,7 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
|
|
|
6495
6504
|
ThrottlingUtils.preProcess(cacheManager, thumbprint, correlationId);
|
|
6496
6505
|
let response;
|
|
6497
6506
|
try {
|
|
6498
|
-
response = await invokeAsync((networkClient.sendPostRequestAsync.bind(networkClient)), NetworkClientSendPostRequestAsync, logger, performanceClient, correlationId)(tokenEndpoint, options);
|
|
6507
|
+
response = await invokeAsync((networkClient.sendPostRequestAsync.bind(networkClient)), NetworkClientSendPostRequestAsync, logger, performanceClient, correlationId)(tokenEndpoint, { ...options, correlationId, performanceClient });
|
|
6499
6508
|
const responseHeaders = response.headers || {};
|
|
6500
6509
|
performanceClient?.addFields({
|
|
6501
6510
|
refreshTokenSize: response.body.refresh_token?.length || 0,
|
|
@@ -6531,7 +6540,7 @@ async function sendPostRequest(thumbprint, tokenEndpoint, options, correlationId
|
|
|
6531
6540
|
return response;
|
|
6532
6541
|
}
|
|
6533
6542
|
|
|
6534
|
-
/*! @azure/msal-common v16.11.
|
|
6543
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6535
6544
|
|
|
6536
6545
|
/*
|
|
6537
6546
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6788,7 +6797,7 @@ class AuthorizationCodeClient {
|
|
|
6788
6797
|
}
|
|
6789
6798
|
}
|
|
6790
6799
|
|
|
6791
|
-
/*! @azure/msal-common v16.11.
|
|
6800
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6792
6801
|
|
|
6793
6802
|
/*
|
|
6794
6803
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7015,7 +7024,7 @@ function extractLoginHint(account) {
|
|
|
7015
7024
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
7016
7025
|
}
|
|
7017
7026
|
|
|
7018
|
-
/*! @azure/msal-common v16.11.
|
|
7027
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
7019
7028
|
|
|
7020
7029
|
/*
|
|
7021
7030
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7036,7 +7045,7 @@ function createJoseHeaderError(code, correlationId) {
|
|
|
7036
7045
|
return new JoseHeaderError(code, correlationId);
|
|
7037
7046
|
}
|
|
7038
7047
|
|
|
7039
|
-
/*! @azure/msal-common v16.11.
|
|
7048
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
7040
7049
|
/*
|
|
7041
7050
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7042
7051
|
* Licensed under the MIT License.
|
|
@@ -7044,7 +7053,7 @@ function createJoseHeaderError(code, correlationId) {
|
|
|
7044
7053
|
const missingKidError = "missing_kid_error";
|
|
7045
7054
|
const missingAlgError = "missing_alg_error";
|
|
7046
7055
|
|
|
7047
|
-
/*! @azure/msal-common v16.11.
|
|
7056
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
7048
7057
|
|
|
7049
7058
|
/*
|
|
7050
7059
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7084,7 +7093,7 @@ class JoseHeader {
|
|
|
7084
7093
|
}
|
|
7085
7094
|
}
|
|
7086
7095
|
|
|
7087
|
-
/*! @azure/msal-common v16.11.
|
|
7096
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
7088
7097
|
|
|
7089
7098
|
/*
|
|
7090
7099
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7633,7 +7642,7 @@ class PerformanceClient {
|
|
|
7633
7642
|
}
|
|
7634
7643
|
}
|
|
7635
7644
|
|
|
7636
|
-
/*! @azure/msal-common v16.11.
|
|
7645
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
7637
7646
|
|
|
7638
7647
|
/*
|
|
7639
7648
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7854,7 +7863,7 @@ class RefreshTokenClient {
|
|
|
7854
7863
|
}
|
|
7855
7864
|
}
|
|
7856
7865
|
|
|
7857
|
-
/*! @azure/msal-common v16.11.
|
|
7866
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
7858
7867
|
|
|
7859
7868
|
/*
|
|
7860
7869
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8147,7 +8156,7 @@ class StubServerTelemetryManager extends ServerTelemetryManager {
|
|
|
8147
8156
|
clearNativeBrokerErrorCode() { }
|
|
8148
8157
|
}
|
|
8149
8158
|
|
|
8150
|
-
/*! @azure/msal-common v16.11.
|
|
8159
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
8151
8160
|
|
|
8152
8161
|
/*
|
|
8153
8162
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8255,7 +8264,7 @@ class SilentFlowClient {
|
|
|
8255
8264
|
}
|
|
8256
8265
|
}
|
|
8257
8266
|
|
|
8258
|
-
/*! @azure/msal-common v16.11.
|
|
8267
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
8259
8268
|
|
|
8260
8269
|
/*
|
|
8261
8270
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8271,7 +8280,7 @@ const StubbedNetworkModule = {
|
|
|
8271
8280
|
},
|
|
8272
8281
|
};
|
|
8273
8282
|
|
|
8274
|
-
/*! @azure/msal-common v16.11.
|
|
8283
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
8275
8284
|
|
|
8276
8285
|
/*
|
|
8277
8286
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8474,6 +8483,7 @@ const getRequestFailed = "get_request_failed";
|
|
|
8474
8483
|
const failedToParseResponse = "failed_to_parse_response";
|
|
8475
8484
|
const unableToLoadToken = "unable_to_load_token";
|
|
8476
8485
|
const cryptoKeyNotFound = "crypto_key_not_found";
|
|
8486
|
+
const invalidPublicJwk = "invalid_public_jwk";
|
|
8477
8487
|
const authCodeRequired = "auth_code_required";
|
|
8478
8488
|
const authCodeOrNativeAccountIdRequired = "auth_code_or_nativeAccountId_required";
|
|
8479
8489
|
const spaCodeAndNativeAccountIdPresent = "spa_code_and_nativeAccountId_present";
|
|
@@ -8521,6 +8531,7 @@ var BrowserAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
|
8521
8531
|
invalidBase64String: invalidBase64String,
|
|
8522
8532
|
invalidCacheType: invalidCacheType,
|
|
8523
8533
|
invalidPopTokenRequest: invalidPopTokenRequest,
|
|
8534
|
+
invalidPublicJwk: invalidPublicJwk,
|
|
8524
8535
|
nativeConnectionNotEstablished: nativeConnectionNotEstablished,
|
|
8525
8536
|
nativeExtensionNotInstalled: nativeExtensionNotInstalled,
|
|
8526
8537
|
nativeHandshakeTimeout: nativeHandshakeTimeout,
|
|
@@ -8883,6 +8894,12 @@ const AES_GCM = "AES-GCM";
|
|
|
8883
8894
|
const HKDF = "HKDF";
|
|
8884
8895
|
// SHA-256 hashing algorithm
|
|
8885
8896
|
const S256_HASH_ALG = "SHA-256";
|
|
8897
|
+
const JSON_WEB_KEY_TYPE_EC = "EC";
|
|
8898
|
+
const JSON_WEB_KEY_TYPE_RSA = "RSA";
|
|
8899
|
+
const MISSING_JWK_KTY_SUBERROR = "missing_jwk_kty";
|
|
8900
|
+
const UNSUPPORTED_JWK_KTY_SUBERROR = "unsupported_jwk_kty";
|
|
8901
|
+
const MISSING_JWK_MEMBER_SUBERROR = "missing_jwk_member";
|
|
8902
|
+
const EMPTY_JWK_MEMBER_SUBERROR = "empty_jwk_member";
|
|
8886
8903
|
// MOD length for PoP tokens
|
|
8887
8904
|
const MODULUS_LENGTH = 2048;
|
|
8888
8905
|
// Public Exponent
|
|
@@ -8899,12 +8916,15 @@ const DECRYPT = "decrypt";
|
|
|
8899
8916
|
const DERIVE_KEY = "deriveKey";
|
|
8900
8917
|
// Suberror
|
|
8901
8918
|
const SUBTLE_SUBERROR = "crypto_subtle_undefined";
|
|
8902
|
-
const
|
|
8919
|
+
const RSA_KEYGEN_ALGORITHM_OPTIONS = {
|
|
8903
8920
|
name: PKCS1_V15_KEYGEN_ALG,
|
|
8904
8921
|
hash: S256_HASH_ALG,
|
|
8905
8922
|
modulusLength: MODULUS_LENGTH,
|
|
8906
8923
|
publicExponent: PUBLIC_EXPONENT,
|
|
8907
8924
|
};
|
|
8925
|
+
const RSA_SIGN_ALGORITHM_OPTIONS = {
|
|
8926
|
+
name: PKCS1_V15_KEYGEN_ALG,
|
|
8927
|
+
};
|
|
8908
8928
|
/**
|
|
8909
8929
|
* Check whether browser crypto is available.
|
|
8910
8930
|
*/
|
|
@@ -8988,12 +9008,13 @@ function createNewGuid() {
|
|
|
8988
9008
|
return text;
|
|
8989
9009
|
}
|
|
8990
9010
|
/**
|
|
8991
|
-
* Generates a keypair based on
|
|
9011
|
+
* Generates a keypair based on the provided algorithm config.
|
|
8992
9012
|
* @param extractable
|
|
8993
9013
|
* @param usages
|
|
9014
|
+
* @param algorithm
|
|
8994
9015
|
*/
|
|
8995
|
-
async function generateKeyPair(extractable, usages) {
|
|
8996
|
-
return window.crypto.subtle.generateKey(
|
|
9016
|
+
async function generateKeyPair(extractable, usages, algorithm) {
|
|
9017
|
+
return window.crypto.subtle.generateKey(algorithm, extractable, usages);
|
|
8997
9018
|
}
|
|
8998
9019
|
/**
|
|
8999
9020
|
* Export key as Json Web Key (JWK)
|
|
@@ -9007,17 +9028,19 @@ async function exportJwk(key) {
|
|
|
9007
9028
|
* @param key
|
|
9008
9029
|
* @param extractable
|
|
9009
9030
|
* @param usages
|
|
9031
|
+
* @param algorithm
|
|
9010
9032
|
*/
|
|
9011
|
-
async function importJwk(key, extractable, usages) {
|
|
9012
|
-
return window.crypto.subtle.importKey(KEY_FORMAT_JWK, key,
|
|
9033
|
+
async function importJwk(key, extractable, usages, algorithm) {
|
|
9034
|
+
return window.crypto.subtle.importKey(KEY_FORMAT_JWK, key, algorithm, extractable, usages);
|
|
9013
9035
|
}
|
|
9014
9036
|
/**
|
|
9015
|
-
* Signs given data with given key
|
|
9037
|
+
* Signs given data with given key.
|
|
9016
9038
|
* @param key
|
|
9017
9039
|
* @param data
|
|
9040
|
+
* @param algorithm
|
|
9018
9041
|
*/
|
|
9019
|
-
async function sign(key, data) {
|
|
9020
|
-
return window.crypto.subtle.sign(
|
|
9042
|
+
async function sign(key, data, algorithm) {
|
|
9043
|
+
return window.crypto.subtle.sign(algorithm, key, data);
|
|
9021
9044
|
}
|
|
9022
9045
|
/**
|
|
9023
9046
|
* Generates Base64 encoded jwk used in the Encrypted Authorize Response (EAR) flow
|
|
@@ -9160,6 +9183,43 @@ async function hashString(plainText) {
|
|
|
9160
9183
|
const hashBuffer = await sha256Digest(plainText);
|
|
9161
9184
|
const hashBytes = new Uint8Array(hashBuffer);
|
|
9162
9185
|
return urlEncodeArr(hashBytes);
|
|
9186
|
+
}
|
|
9187
|
+
const JWK_THUMBPRINT_REQUIRED_MEMBERS = {
|
|
9188
|
+
[JSON_WEB_KEY_TYPE_EC]: ["crv", "kty", "x", "y"],
|
|
9189
|
+
[JSON_WEB_KEY_TYPE_RSA]: ["e", "kty", "n"],
|
|
9190
|
+
};
|
|
9191
|
+
function getJwkThumbprintMembers(publicJwk) {
|
|
9192
|
+
const kty = publicJwk.kty;
|
|
9193
|
+
if (typeof kty !== "string" || kty.length === 0) {
|
|
9194
|
+
throw createBrowserAuthError(invalidPublicJwk, "", MISSING_JWK_KTY_SUBERROR);
|
|
9195
|
+
}
|
|
9196
|
+
const requiredMembers = JWK_THUMBPRINT_REQUIRED_MEMBERS[kty];
|
|
9197
|
+
if (!requiredMembers) {
|
|
9198
|
+
throw createBrowserAuthError(invalidPublicJwk, "", UNSUPPORTED_JWK_KTY_SUBERROR);
|
|
9199
|
+
}
|
|
9200
|
+
return requiredMembers.reduce((thumbprintMembers, memberName) => {
|
|
9201
|
+
const memberValue = publicJwk[memberName];
|
|
9202
|
+
if (typeof memberValue !== "string") {
|
|
9203
|
+
throw createBrowserAuthError(invalidPublicJwk, "", MISSING_JWK_MEMBER_SUBERROR);
|
|
9204
|
+
}
|
|
9205
|
+
if (memberValue.length === 0) {
|
|
9206
|
+
throw createBrowserAuthError(invalidPublicJwk, "", EMPTY_JWK_MEMBER_SUBERROR);
|
|
9207
|
+
}
|
|
9208
|
+
thumbprintMembers[memberName] = memberValue;
|
|
9209
|
+
return thumbprintMembers;
|
|
9210
|
+
}, {});
|
|
9211
|
+
}
|
|
9212
|
+
/**
|
|
9213
|
+
* Computes an RFC 7638 JWK thumbprint for a public key.
|
|
9214
|
+
* The required members for the JWK key type are serialised in lexicographic order
|
|
9215
|
+
* and the SHA-256 digest is returned as a base64url string.
|
|
9216
|
+
* @internal
|
|
9217
|
+
*/
|
|
9218
|
+
async function computeJwkThumbprint(publicJwk) {
|
|
9219
|
+
const thumbprintMembers = getJwkThumbprintMembers(publicJwk);
|
|
9220
|
+
// RFC 7638 §3.3: use only required members, sorted lexicographically
|
|
9221
|
+
const thumbprintJson = JSON.stringify(thumbprintMembers, Object.keys(thumbprintMembers).sort());
|
|
9222
|
+
return hashString(thumbprintJson);
|
|
9163
9223
|
}
|
|
9164
9224
|
|
|
9165
9225
|
/*
|
|
@@ -10015,20 +10075,14 @@ class CryptoOps {
|
|
|
10015
10075
|
async getPublicKeyThumbprint(request) {
|
|
10016
10076
|
const publicKeyThumbMeasurement = this.performanceClient?.startMeasurement(CryptoOptsGetPublicKeyThumbprint, request.correlationId);
|
|
10017
10077
|
// Generate Keypair
|
|
10018
|
-
const keyPair = await generateKeyPair(CryptoOps.EXTRACTABLE, CryptoOps.POP_KEY_USAGES);
|
|
10078
|
+
const keyPair = await generateKeyPair(CryptoOps.EXTRACTABLE, CryptoOps.POP_KEY_USAGES, RSA_KEYGEN_ALGORITHM_OPTIONS);
|
|
10019
10079
|
// Generate Thumbprint for Public Key
|
|
10020
10080
|
const publicKeyJwk = await exportJwk(keyPair.publicKey);
|
|
10021
|
-
const
|
|
10022
|
-
e: publicKeyJwk.e,
|
|
10023
|
-
kty: publicKeyJwk.kty,
|
|
10024
|
-
n: publicKeyJwk.n,
|
|
10025
|
-
};
|
|
10026
|
-
const publicJwkString = getSortedObjectString(pubKeyThumprintObj);
|
|
10027
|
-
const publicJwkHash = await this.hashString(publicJwkString);
|
|
10081
|
+
const publicJwkHash = await computeJwkThumbprint(publicKeyJwk);
|
|
10028
10082
|
// Generate Thumbprint for Private Key
|
|
10029
10083
|
const privateKeyJwk = await exportJwk(keyPair.privateKey);
|
|
10030
10084
|
// Re-import private key to make it unextractable
|
|
10031
|
-
const unextractablePrivateKey = await importJwk(privateKeyJwk, false, ["sign"]);
|
|
10085
|
+
const unextractablePrivateKey = await importJwk(privateKeyJwk, false, ["sign"], RSA_KEYGEN_ALGORITHM_OPTIONS);
|
|
10032
10086
|
// Store Keypair data in keystore
|
|
10033
10087
|
await this.cache.setItem(publicJwkHash, {
|
|
10034
10088
|
privateKey: unextractablePrivateKey,
|
|
@@ -10113,7 +10167,7 @@ class CryptoOps {
|
|
|
10113
10167
|
// Sign token
|
|
10114
10168
|
const encoder = new TextEncoder();
|
|
10115
10169
|
const tokenBuffer = encoder.encode(tokenString);
|
|
10116
|
-
const signatureBuffer = await sign(cachedKeyPair.privateKey, tokenBuffer);
|
|
10170
|
+
const signatureBuffer = await sign(cachedKeyPair.privateKey, tokenBuffer, RSA_SIGN_ALGORITHM_OPTIONS);
|
|
10117
10171
|
const encodedSignature = urlEncodeArr(new Uint8Array(signatureBuffer));
|
|
10118
10172
|
const signedJwt = `${tokenString}.${encodedSignature}`;
|
|
10119
10173
|
if (signJwtMeasurement) {
|
|
@@ -10729,7 +10783,7 @@ const EventType = {
|
|
|
10729
10783
|
|
|
10730
10784
|
/* eslint-disable header/header */
|
|
10731
10785
|
const name = "@azure/msal-browser";
|
|
10732
|
-
const version = "5.17.
|
|
10786
|
+
const version = "5.17.3";
|
|
10733
10787
|
|
|
10734
10788
|
/*
|
|
10735
10789
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -13195,50 +13249,63 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
13195
13249
|
const nativeATMeasurement = this.performanceClient.startMeasurement(NativeInteractionClientAcquireToken, this.correlationId);
|
|
13196
13250
|
const reqTimestamp = nowSeconds();
|
|
13197
13251
|
const serverTelemetryManager = initializeServerTelemetryManager(this.apiId, this.config.auth.clientId, this.correlationId, this.browserStorage, this.logger, undefined, this.config.system.serverTelemetryEnabled);
|
|
13252
|
+
// initialize native request (statically builds the request; does not contact the broker)
|
|
13253
|
+
let nativeRequest;
|
|
13198
13254
|
try {
|
|
13199
|
-
|
|
13200
|
-
|
|
13201
|
-
|
|
13202
|
-
|
|
13203
|
-
|
|
13204
|
-
|
|
13205
|
-
|
|
13255
|
+
nativeRequest = await this.initializePlatformRequest(request);
|
|
13256
|
+
}
|
|
13257
|
+
catch (e) {
|
|
13258
|
+
/*
|
|
13259
|
+
* Request initialization (e.g. PoP token generation or authority
|
|
13260
|
+
* resolution) failed before the broker was contacted, so end the
|
|
13261
|
+
* measurement here to avoid an orphaned sub-measurement.
|
|
13262
|
+
* Broker was never engaged, so this was not a native broker outcome.
|
|
13263
|
+
*/
|
|
13264
|
+
nativeATMeasurement.add({
|
|
13265
|
+
isNativeBroker: false,
|
|
13266
|
+
});
|
|
13267
|
+
nativeATMeasurement.end({
|
|
13268
|
+
success: false,
|
|
13269
|
+
}, e);
|
|
13270
|
+
throw e;
|
|
13271
|
+
}
|
|
13272
|
+
// check if the tokens can be retrieved from internal cache
|
|
13273
|
+
try {
|
|
13274
|
+
const result = await this.acquireTokensFromCache(this.accountId, nativeRequest);
|
|
13275
|
+
// Served from the native internal cache; token did not come directly from the broker
|
|
13276
|
+
nativeATMeasurement.add({
|
|
13277
|
+
isNativeBroker: false,
|
|
13278
|
+
});
|
|
13279
|
+
nativeATMeasurement.end({
|
|
13280
|
+
success: true,
|
|
13281
|
+
fromCache: true,
|
|
13282
|
+
});
|
|
13283
|
+
return result;
|
|
13284
|
+
}
|
|
13285
|
+
catch (e) {
|
|
13286
|
+
if (cacheLookupPolicy === CacheLookupPolicy.AccessToken) {
|
|
13287
|
+
this.logger.info("0eitbc", this.correlationId);
|
|
13288
|
+
nativeATMeasurement.add({
|
|
13206
13289
|
isNativeBroker: false,
|
|
13207
|
-
fromCache: true,
|
|
13208
13290
|
});
|
|
13209
|
-
return result;
|
|
13210
|
-
}
|
|
13211
|
-
catch (e) {
|
|
13212
|
-
if (cacheLookupPolicy === CacheLookupPolicy.AccessToken) {
|
|
13213
|
-
this.logger.info("0eitbc", this.correlationId);
|
|
13214
|
-
nativeATMeasurement.end({
|
|
13215
|
-
success: false,
|
|
13216
|
-
brokerErrorCode: "cache_request_failed",
|
|
13217
|
-
});
|
|
13218
|
-
throw e;
|
|
13219
|
-
}
|
|
13220
|
-
// continue with a native call for any and all errors
|
|
13221
|
-
this.logger.info("0957j1", this.correlationId);
|
|
13222
|
-
}
|
|
13223
|
-
const validatedResponse = await this.platformAuthProvider.sendMessage(nativeRequest);
|
|
13224
|
-
return await this.handleNativeResponse(validatedResponse, nativeRequest, reqTimestamp)
|
|
13225
|
-
.then((result) => {
|
|
13226
|
-
nativeATMeasurement.end({
|
|
13227
|
-
success: true,
|
|
13228
|
-
isNativeBroker: true,
|
|
13229
|
-
requestId: result.requestId,
|
|
13230
|
-
});
|
|
13231
|
-
serverTelemetryManager.clearNativeBrokerErrorCode();
|
|
13232
|
-
return result;
|
|
13233
|
-
})
|
|
13234
|
-
.catch((error) => {
|
|
13235
13291
|
nativeATMeasurement.end({
|
|
13236
13292
|
success: false,
|
|
13237
|
-
errorCode: error.errorCode,
|
|
13238
|
-
subErrorCode: error.subError,
|
|
13239
13293
|
});
|
|
13240
|
-
throw
|
|
13294
|
+
throw e;
|
|
13295
|
+
}
|
|
13296
|
+
// continue with a native call for any and all errors
|
|
13297
|
+
this.logger.info("0957j1", this.correlationId);
|
|
13298
|
+
}
|
|
13299
|
+
// dispatch the request to the broker
|
|
13300
|
+
try {
|
|
13301
|
+
const validatedResponse = await this.platformAuthProvider.sendMessage(nativeRequest);
|
|
13302
|
+
const result = await this.handleNativeResponse(validatedResponse, nativeRequest, reqTimestamp, request.storeInCache);
|
|
13303
|
+
nativeATMeasurement.end({
|
|
13304
|
+
success: true,
|
|
13305
|
+
requestId: result.requestId,
|
|
13241
13306
|
});
|
|
13307
|
+
serverTelemetryManager.clearNativeBrokerErrorCode();
|
|
13308
|
+
return result;
|
|
13242
13309
|
}
|
|
13243
13310
|
catch (e) {
|
|
13244
13311
|
if (e instanceof NativeAuthError) {
|
|
@@ -13246,10 +13313,29 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
13246
13313
|
}
|
|
13247
13314
|
nativeATMeasurement.end({
|
|
13248
13315
|
success: false,
|
|
13249
|
-
});
|
|
13316
|
+
}, e);
|
|
13317
|
+
this.setBrokerErrorTelemetry(e);
|
|
13250
13318
|
throw e;
|
|
13251
13319
|
}
|
|
13252
13320
|
}
|
|
13321
|
+
/**
|
|
13322
|
+
* Records platform-broker error telemetry on the root event for the current
|
|
13323
|
+
* correlationId. `isNativeBroker` is set optimistically to true because the
|
|
13324
|
+
* broker was engaged; when the caller subsequently falls back to a web flow
|
|
13325
|
+
* that succeeds, the root success measurement overrides it to false via
|
|
13326
|
+
* `result.fromPlatformBroker`. Terminal broker errors (no fallback) retain
|
|
13327
|
+
* true. `brokerErrorName`/`brokerErrorCode` are recorded when the error is an `AuthError`.
|
|
13328
|
+
* @param error error thrown by the broker interaction
|
|
13329
|
+
*/
|
|
13330
|
+
setBrokerErrorTelemetry(error) {
|
|
13331
|
+
if (error instanceof AuthError) {
|
|
13332
|
+
this.performanceClient.addFields({
|
|
13333
|
+
isNativeBroker: true,
|
|
13334
|
+
brokerErrorName: error.name,
|
|
13335
|
+
brokerErrorCode: error.errorCode,
|
|
13336
|
+
}, this.correlationId);
|
|
13337
|
+
}
|
|
13338
|
+
}
|
|
13253
13339
|
/**
|
|
13254
13340
|
* Creates silent flow request
|
|
13255
13341
|
* @param request
|
|
@@ -13321,11 +13407,21 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
13321
13407
|
const serverTelemetryManager = initializeServerTelemetryManager(this.apiId, this.config.auth.clientId, this.correlationId, this.browserStorage, this.logger, undefined, this.config.system.serverTelemetryEnabled);
|
|
13322
13408
|
serverTelemetryManager.setNativeBrokerErrorCode(e.errorCode);
|
|
13323
13409
|
if (isFatalNativeAuthError(e)) {
|
|
13410
|
+
/*
|
|
13411
|
+
* Fatal error on redirect initiate always falls back to a
|
|
13412
|
+
* regular web redirect, so this request did not complete
|
|
13413
|
+
* natively. Token telemetry for the eventual outcome lands
|
|
13414
|
+
* in handleRedirectPromise (phase 2).
|
|
13415
|
+
*/
|
|
13416
|
+
this.setBrokerErrorTelemetry(e);
|
|
13324
13417
|
throw e;
|
|
13325
13418
|
}
|
|
13326
13419
|
}
|
|
13327
13420
|
}
|
|
13328
|
-
this.browserStorage.setTemporaryCache(TemporaryCacheKeys.NATIVE_REQUEST, JSON.stringify(
|
|
13421
|
+
this.browserStorage.setTemporaryCache(TemporaryCacheKeys.NATIVE_REQUEST, JSON.stringify({
|
|
13422
|
+
...nativeRequest,
|
|
13423
|
+
storeInCache: request.storeInCache,
|
|
13424
|
+
}), true);
|
|
13329
13425
|
const navigationOptions = {
|
|
13330
13426
|
apiId: ApiId.acquireTokenRedirect,
|
|
13331
13427
|
timeout: this.config.system.redirectNavigationTimeout,
|
|
@@ -13355,7 +13451,11 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
13355
13451
|
this.performanceClient?.addFields({ errorCode: "no_cached_request" }, this.correlationId);
|
|
13356
13452
|
return null;
|
|
13357
13453
|
}
|
|
13358
|
-
|
|
13454
|
+
/*
|
|
13455
|
+
* storeInCache is a client-side cache directive persisted alongside the cached
|
|
13456
|
+
* request (not a broker-contract parameter), so extract it here before resending.
|
|
13457
|
+
*/
|
|
13458
|
+
const { prompt, storeInCache, ...request } = cachedRequest;
|
|
13359
13459
|
if (prompt) {
|
|
13360
13460
|
this.logger.verbose("0ac34v", this.correlationId);
|
|
13361
13461
|
}
|
|
@@ -13364,13 +13464,13 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
13364
13464
|
try {
|
|
13365
13465
|
this.logger.verbose("003x5a", this.correlationId);
|
|
13366
13466
|
const response = await this.platformAuthProvider.sendMessage(request);
|
|
13367
|
-
const authResult = await this.handleNativeResponse(response, request, reqTimestamp);
|
|
13467
|
+
const authResult = await this.handleNativeResponse(response, request, reqTimestamp, storeInCache);
|
|
13368
13468
|
const serverTelemetryManager = initializeServerTelemetryManager(this.apiId, this.config.auth.clientId, this.correlationId, this.browserStorage, this.logger, undefined, this.config.system.serverTelemetryEnabled);
|
|
13369
13469
|
serverTelemetryManager.clearNativeBrokerErrorCode();
|
|
13370
|
-
this.performanceClient?.addFields({ isNativeBroker: true }, this.correlationId);
|
|
13371
13470
|
return authResult;
|
|
13372
13471
|
}
|
|
13373
13472
|
catch (e) {
|
|
13473
|
+
this.setBrokerErrorTelemetry(e);
|
|
13374
13474
|
throw e;
|
|
13375
13475
|
}
|
|
13376
13476
|
}
|
|
@@ -13388,7 +13488,7 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
13388
13488
|
* @param request
|
|
13389
13489
|
* @param reqTimestamp
|
|
13390
13490
|
*/
|
|
13391
|
-
async handleNativeResponse(response, request, reqTimestamp) {
|
|
13491
|
+
async handleNativeResponse(response, request, reqTimestamp, storeInCache) {
|
|
13392
13492
|
this.logger.trace("1bojln", this.correlationId);
|
|
13393
13493
|
// generate identifiers
|
|
13394
13494
|
const idTokenClaims = extractTokenClaims(response.id_token, base64Decode, this.correlationId);
|
|
@@ -13417,8 +13517,8 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
13417
13517
|
const result = await this.generateAuthenticationResult(response, request, idTokenClaims, baseAccount, authority.canonicalAuthority, reqTimestamp);
|
|
13418
13518
|
// cache accounts and tokens in the appropriate storage
|
|
13419
13519
|
await this.cacheAccount(baseAccount, isKmsi(idTokenClaims));
|
|
13420
|
-
await this.cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, result.tenantId, reqTimestamp, authority.getPreferredCache() // environment
|
|
13421
|
-
);
|
|
13520
|
+
await this.cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, result.tenantId, reqTimestamp, authority.getPreferredCache(), // environment
|
|
13521
|
+
storeInCache);
|
|
13422
13522
|
return result;
|
|
13423
13523
|
}
|
|
13424
13524
|
/**
|
|
@@ -13539,7 +13639,9 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
13539
13639
|
correlationId: this.correlationId,
|
|
13540
13640
|
state: response.state,
|
|
13541
13641
|
fromPlatformBroker: true,
|
|
13542
|
-
...(request.resource && {
|
|
13642
|
+
...(request.extraParameters?.resource && {
|
|
13643
|
+
resource: request.extraParameters.resource,
|
|
13644
|
+
}),
|
|
13543
13645
|
};
|
|
13544
13646
|
return result;
|
|
13545
13647
|
}
|
|
@@ -13563,7 +13665,7 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
13563
13665
|
* @param tenantId
|
|
13564
13666
|
* @param reqTimestamp
|
|
13565
13667
|
*/
|
|
13566
|
-
async cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, tenantId, reqTimestamp, environment) {
|
|
13668
|
+
async cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, tenantId, reqTimestamp, environment, storeInCache) {
|
|
13567
13669
|
const cachedIdToken = createIdTokenEntity(homeAccountIdentifier, environment, response.id_token || "", request.clientId, idTokenClaims.tid || "");
|
|
13568
13670
|
// cache accessToken in inmemory storage
|
|
13569
13671
|
const expiresIn = request.tokenType === AuthenticationScheme$1.POP
|
|
@@ -13575,14 +13677,14 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
13575
13677
|
const responseScopes = this.generateScopes(response.scope, request.scope);
|
|
13576
13678
|
const cachedAccessToken = createAccessTokenEntity(homeAccountIdentifier, environment, response.access_token, request.clientId, idTokenClaims.tid || tenantId, responseScopes.printScopes(), tokenExpirationSeconds, 0, base64Decode, request.correlationId, undefined, request.tokenType, undefined, request.keyId);
|
|
13577
13679
|
// save idtoken credential in configured browser storage
|
|
13578
|
-
if (!!cachedIdToken &&
|
|
13680
|
+
if (!!cachedIdToken && storeInCache?.idToken !== false) {
|
|
13579
13681
|
await this.browserStorage.setIdTokenCredential(cachedIdToken, this.correlationId, isKmsi(idTokenClaims));
|
|
13580
13682
|
}
|
|
13581
13683
|
// save access token credential in memory storage
|
|
13582
13684
|
const nativeCacheRecord = {
|
|
13583
13685
|
accessToken: cachedAccessToken,
|
|
13584
13686
|
};
|
|
13585
|
-
return this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, this.correlationId, isKmsi(idTokenClaims), this.apiId,
|
|
13687
|
+
return this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, this.correlationId, isKmsi(idTokenClaims), this.apiId, storeInCache);
|
|
13586
13688
|
}
|
|
13587
13689
|
getExpiresInValue(tokenType, expiresIn) {
|
|
13588
13690
|
return tokenType === AuthenticationScheme$1.POP
|
|
@@ -13654,13 +13756,12 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
13654
13756
|
const configClaims = request.skipBrokerClaims && !!request.embeddedClientId
|
|
13655
13757
|
? undefined
|
|
13656
13758
|
: this.config.auth.clientCapabilities;
|
|
13657
|
-
// scopes are expected to be received by the native broker as "scope" and will be added to the request below.
|
|
13658
|
-
const { scopes, claims
|
|
13759
|
+
// scopes are expected to be received by the native broker as "scope" and will be added to the request below. 'resource' is added in extraParameters for MCP scenarios.
|
|
13760
|
+
const { scopes, claims } = request;
|
|
13659
13761
|
const scopeSet = new ScopeSet(scopes || [], this.correlationId);
|
|
13660
13762
|
scopeSet.appendScopes(OIDC_DEFAULT_SCOPES$1);
|
|
13661
13763
|
const mergedClaims = buildMergedClaims$1(claims, configClaims?.length ? configClaims : undefined);
|
|
13662
13764
|
const validatedRequest = {
|
|
13663
|
-
...remainingProperties,
|
|
13664
13765
|
claims: mergedClaims,
|
|
13665
13766
|
accountId: this.accountId,
|
|
13666
13767
|
clientId: this.config.auth.clientId,
|
|
@@ -13669,19 +13770,28 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
13669
13770
|
redirectUri: getRedirectUri(request.redirectUri, this.config.auth.redirectUri, this.logger, this.correlationId),
|
|
13670
13771
|
prompt: this.getPrompt(request.prompt),
|
|
13671
13772
|
correlationId: this.correlationId,
|
|
13773
|
+
isSts: false,
|
|
13672
13774
|
tokenType: request.authenticationScheme,
|
|
13673
13775
|
windowTitleSubstring: document.title,
|
|
13776
|
+
nonce: request.nonce,
|
|
13777
|
+
state: request.state,
|
|
13778
|
+
loginHint: request.loginHint,
|
|
13674
13779
|
extraParameters: {
|
|
13675
13780
|
...request.extraParameters,
|
|
13781
|
+
...(request.resource && { resource: request.resource }), // resource is set for MCP scenarios
|
|
13676
13782
|
},
|
|
13677
13783
|
extendedExpiryToken: false,
|
|
13678
13784
|
keyId: request.popKid,
|
|
13785
|
+
resourceRequestMethod: request.resourceRequestMethod,
|
|
13786
|
+
resourceRequestUri: request.resourceRequestUri,
|
|
13787
|
+
shrClaims: request.shrClaims,
|
|
13788
|
+
shrNonce: request.shrNonce,
|
|
13679
13789
|
};
|
|
13680
13790
|
// Check for PoP token requests: signPopToken should only be set to true if popKid is not set
|
|
13681
13791
|
if (validatedRequest.signPopToken && !!request.popKid) {
|
|
13682
13792
|
throw createBrowserAuthError(invalidPopTokenRequest, this.correlationId);
|
|
13683
13793
|
}
|
|
13684
|
-
this.handleExtraBrokerParams(validatedRequest);
|
|
13794
|
+
this.handleExtraBrokerParams(validatedRequest, request.embeddedClientId);
|
|
13685
13795
|
validatedRequest.extraParameters =
|
|
13686
13796
|
validatedRequest.extraParameters || {};
|
|
13687
13797
|
validatedRequest.extraParameters.telemetry =
|
|
@@ -13756,19 +13866,19 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
13756
13866
|
* @param request {PlatformAuthRequest}
|
|
13757
13867
|
* @private
|
|
13758
13868
|
*/
|
|
13759
|
-
handleExtraBrokerParams(request) {
|
|
13869
|
+
handleExtraBrokerParams(request, embeddedClientId) {
|
|
13760
13870
|
const hasExtraBrokerParams = request.extraParameters &&
|
|
13761
13871
|
request.extraParameters.hasOwnProperty(BROKER_CLIENT_ID) &&
|
|
13762
13872
|
request.extraParameters.hasOwnProperty(BROKER_REDIRECT_URI) &&
|
|
13763
13873
|
request.extraParameters.hasOwnProperty(CLIENT_ID);
|
|
13764
|
-
if (!
|
|
13874
|
+
if (!embeddedClientId && !hasExtraBrokerParams) {
|
|
13765
13875
|
return;
|
|
13766
13876
|
}
|
|
13767
13877
|
let child_client_id = "";
|
|
13768
13878
|
const child_redirect_uri = request.redirectUri;
|
|
13769
|
-
if (
|
|
13879
|
+
if (embeddedClientId) {
|
|
13770
13880
|
request.redirectUri = this.config.auth.redirectUri;
|
|
13771
|
-
child_client_id =
|
|
13881
|
+
child_client_id = embeddedClientId;
|
|
13772
13882
|
}
|
|
13773
13883
|
else if (request.extraParameters) {
|
|
13774
13884
|
request.redirectUri =
|
|
@@ -13776,7 +13886,15 @@ class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
13776
13886
|
child_client_id =
|
|
13777
13887
|
request.extraParameters[CLIENT_ID];
|
|
13778
13888
|
}
|
|
13889
|
+
const {
|
|
13890
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13891
|
+
[BROKER_CLIENT_ID]: _brkClientId,
|
|
13892
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13893
|
+
[BROKER_REDIRECT_URI]: _brkRedirectUri,
|
|
13894
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13895
|
+
[CLIENT_ID]: _clientId, ...remainingExtraParameters } = request.extraParameters || {};
|
|
13779
13896
|
request.extraParameters = {
|
|
13897
|
+
...remainingExtraParameters,
|
|
13780
13898
|
child_client_id,
|
|
13781
13899
|
child_redirect_uri,
|
|
13782
13900
|
};
|
|
@@ -14201,6 +14319,8 @@ class NavigationClient {
|
|
|
14201
14319
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
14202
14320
|
* Licensed under the MIT License.
|
|
14203
14321
|
*/
|
|
14322
|
+
const MAX_FETCH_POST_RETRIES = 1;
|
|
14323
|
+
const RETRY_DELAY_MS = 100;
|
|
14204
14324
|
/**
|
|
14205
14325
|
* This class implements the Fetch API for GET and POST requests. See more here: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
|
|
14206
14326
|
*/
|
|
@@ -14249,21 +14369,40 @@ class FetchClient {
|
|
|
14249
14369
|
async sendPostRequestAsync(url, options) {
|
|
14250
14370
|
const reqBody = (options && options.body) || "";
|
|
14251
14371
|
const reqHeaders = getFetchHeaders(options);
|
|
14372
|
+
const correlationId = options?.correlationId;
|
|
14373
|
+
const performanceClient = options?.performanceClient;
|
|
14252
14374
|
let response;
|
|
14253
|
-
let
|
|
14254
|
-
let
|
|
14255
|
-
|
|
14256
|
-
|
|
14257
|
-
|
|
14258
|
-
|
|
14259
|
-
|
|
14260
|
-
|
|
14375
|
+
let lastError;
|
|
14376
|
+
for (let attempt = 1; attempt <= MAX_FETCH_POST_RETRIES + 1; attempt++) {
|
|
14377
|
+
try {
|
|
14378
|
+
response = await fetch(url, {
|
|
14379
|
+
method: HTTP_REQUEST_TYPE.POST,
|
|
14380
|
+
headers: reqHeaders,
|
|
14381
|
+
body: reqBody,
|
|
14382
|
+
});
|
|
14383
|
+
break;
|
|
14384
|
+
}
|
|
14385
|
+
catch (e) {
|
|
14386
|
+
lastError = e;
|
|
14387
|
+
if (!shouldRetryPostFetchError(lastError, attempt)) {
|
|
14388
|
+
throw createNetworkError(createBrowserAuthError(window.navigator.onLine !== false
|
|
14389
|
+
? postRequestFailed
|
|
14390
|
+
: noNetworkConnectivity, correlationId || ""), undefined, undefined, lastError);
|
|
14391
|
+
}
|
|
14392
|
+
// Brief backoff before retry
|
|
14393
|
+
await new Promise((resolve) => setTimeout(resolve, RETRY_DELAY_MS));
|
|
14394
|
+
if (correlationId) {
|
|
14395
|
+
performanceClient?.incrementFields({ fetchRetryCount: 1 }, correlationId);
|
|
14396
|
+
}
|
|
14397
|
+
}
|
|
14261
14398
|
}
|
|
14262
|
-
|
|
14263
|
-
throw createNetworkError(createBrowserAuthError(window.navigator.onLine
|
|
14399
|
+
if (!response) {
|
|
14400
|
+
throw createNetworkError(createBrowserAuthError(window.navigator.onLine !== false
|
|
14264
14401
|
? postRequestFailed
|
|
14265
|
-
: noNetworkConnectivity, ""), undefined, undefined,
|
|
14402
|
+
: noNetworkConnectivity, correlationId || ""), undefined, undefined, lastError);
|
|
14266
14403
|
}
|
|
14404
|
+
let responseStatus = 0;
|
|
14405
|
+
let responseHeaders = {};
|
|
14267
14406
|
responseHeaders = getHeaderDict(response.headers);
|
|
14268
14407
|
try {
|
|
14269
14408
|
responseStatus = response.status;
|
|
@@ -14274,10 +14413,15 @@ class FetchClient {
|
|
|
14274
14413
|
};
|
|
14275
14414
|
}
|
|
14276
14415
|
catch (e) {
|
|
14277
|
-
throw createNetworkError(createBrowserAuthError(failedToParseResponse, ""), responseStatus, responseHeaders, e);
|
|
14416
|
+
throw createNetworkError(createBrowserAuthError(failedToParseResponse, correlationId || ""), responseStatus, responseHeaders, e);
|
|
14278
14417
|
}
|
|
14279
14418
|
}
|
|
14280
14419
|
}
|
|
14420
|
+
function shouldRetryPostFetchError(error, attempt) {
|
|
14421
|
+
return (attempt <= MAX_FETCH_POST_RETRIES &&
|
|
14422
|
+
window.navigator.onLine !== false &&
|
|
14423
|
+
error.name !== "AbortError");
|
|
14424
|
+
}
|
|
14281
14425
|
/**
|
|
14282
14426
|
* Get Fetch API Headers object from string map
|
|
14283
14427
|
* @param inputHeaders
|
|
@@ -14763,7 +14907,7 @@ class PlatformAuthDOMHandler {
|
|
|
14763
14907
|
}
|
|
14764
14908
|
initializePlatformDOMRequest(request) {
|
|
14765
14909
|
this.logger.trace(`15d6yv ${this.platformAuthType}`, request.correlationId);
|
|
14766
|
-
const { accountId, clientId, authority, scope, redirectUri, correlationId, state,
|
|
14910
|
+
const { accountId, clientId, authority, scope, redirectUri, correlationId, state, extraParameters, ...remainingProperties } = request;
|
|
14767
14911
|
const validExtraParameters = this.getDOMExtraParams(remainingProperties, correlationId);
|
|
14768
14912
|
const platformDOMRequest = {
|
|
14769
14913
|
accountId: accountId,
|
|
@@ -14779,8 +14923,6 @@ class PlatformAuthDOMHandler {
|
|
|
14779
14923
|
redirectUri: redirectUri,
|
|
14780
14924
|
scope: scope,
|
|
14781
14925
|
state: state,
|
|
14782
|
-
storeInCache: storeInCache,
|
|
14783
|
-
embeddedClientId: embeddedClientId,
|
|
14784
14926
|
};
|
|
14785
14927
|
return platformDOMRequest;
|
|
14786
14928
|
}
|
|
@@ -16564,6 +16706,7 @@ class StandardController {
|
|
|
16564
16706
|
this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_START, correlationId, exports.InteractionType.Redirect);
|
|
16565
16707
|
rootMeasurement = this.performanceClient.startMeasurement(AcquireTokenRedirect, correlationId);
|
|
16566
16708
|
this.logger.trace("12v7is", correlationId);
|
|
16709
|
+
// Cached nativeAccountId routes directly to the broker (no /authorize call)
|
|
16567
16710
|
rootMeasurement.add({
|
|
16568
16711
|
isPlatformBrokerRequest: true,
|
|
16569
16712
|
});
|
|
@@ -16600,6 +16743,7 @@ class StandardController {
|
|
|
16600
16743
|
}
|
|
16601
16744
|
rootMeasurement.end({
|
|
16602
16745
|
success: true,
|
|
16746
|
+
isNativeBroker: result.fromPlatformBroker ?? false,
|
|
16603
16747
|
}, undefined, result.account);
|
|
16604
16748
|
// Fire-and-forget SSO capability verification in background
|
|
16605
16749
|
this.verifySsoCapability(cachedRedirectRequest, exports.InteractionType.Redirect);
|
|
@@ -16609,8 +16753,8 @@ class StandardController {
|
|
|
16609
16753
|
* Instrument an event only if an error code is set. Otherwise, discard it when the redirect response
|
|
16610
16754
|
* is empty and the error code is missing.
|
|
16611
16755
|
*/
|
|
16612
|
-
if (rootMeasurement.event.errorCode) {
|
|
16613
|
-
rootMeasurement.end({ success: false }
|
|
16756
|
+
if (!!rootMeasurement.event.errorCode) {
|
|
16757
|
+
rootMeasurement.end({ success: false });
|
|
16614
16758
|
}
|
|
16615
16759
|
else {
|
|
16616
16760
|
rootMeasurement.discard();
|
|
@@ -16669,10 +16813,6 @@ class StandardController {
|
|
|
16669
16813
|
this.canUsePlatformBroker(request)) {
|
|
16670
16814
|
const nativeClient = new PlatformAuthInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.acquireTokenRedirect, this.performanceClient, this.platformAuthProvider, this.getNativeAccountId(request), this.nativeInternalStorage, correlationId);
|
|
16671
16815
|
result = invokeAsync(nativeClient.acquireTokenRedirect.bind(nativeClient), NativeInteractionClientAcquireTokenRedirect, this.logger, this.performanceClient, correlationId)(request, atrMeasurement).catch((e) => {
|
|
16672
|
-
atrMeasurement.add({
|
|
16673
|
-
brokerErrorName: e.name,
|
|
16674
|
-
brokerErrorCode: e.errorCode,
|
|
16675
|
-
});
|
|
16676
16816
|
if (e instanceof NativeAuthError &&
|
|
16677
16817
|
isFatalNativeAuthError(e)) {
|
|
16678
16818
|
this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt platform broker calls
|
|
@@ -16741,6 +16881,7 @@ class StandardController {
|
|
|
16741
16881
|
let result;
|
|
16742
16882
|
const pkce = this.getPreGeneratedPkceCodes(correlationId);
|
|
16743
16883
|
if (this.canUsePlatformBroker(request)) {
|
|
16884
|
+
// Cached nativeAccountId routes directly to the broker (no /authorize call)
|
|
16744
16885
|
atPopupMeasurement.add({
|
|
16745
16886
|
isPlatformBrokerRequest: true,
|
|
16746
16887
|
});
|
|
@@ -16751,15 +16892,11 @@ class StandardController {
|
|
|
16751
16892
|
.then((response) => {
|
|
16752
16893
|
atPopupMeasurement.end({
|
|
16753
16894
|
success: true,
|
|
16754
|
-
isNativeBroker:
|
|
16895
|
+
isNativeBroker: response.fromPlatformBroker ?? false,
|
|
16755
16896
|
}, undefined, response.account);
|
|
16756
16897
|
return response;
|
|
16757
16898
|
})
|
|
16758
16899
|
.catch((e) => {
|
|
16759
|
-
atPopupMeasurement.add({
|
|
16760
|
-
brokerErrorName: e.name,
|
|
16761
|
-
brokerErrorCode: e.errorCode,
|
|
16762
|
-
});
|
|
16763
16900
|
if (e instanceof NativeAuthError &&
|
|
16764
16901
|
isFatalNativeAuthError(e)) {
|
|
16765
16902
|
this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt platform broker calls
|
|
@@ -16790,6 +16927,7 @@ class StandardController {
|
|
|
16790
16927
|
}
|
|
16791
16928
|
atPopupMeasurement.end({
|
|
16792
16929
|
success: true,
|
|
16930
|
+
isNativeBroker: result.fromPlatformBroker ?? false,
|
|
16793
16931
|
accessTokenSize: result.accessToken.length,
|
|
16794
16932
|
idTokenSize: result.idToken.length,
|
|
16795
16933
|
}, undefined, result.account);
|
|
@@ -16983,14 +17121,11 @@ class StandardController {
|
|
|
16983
17121
|
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, correlationId, exports.InteractionType.Silent, validRequest);
|
|
16984
17122
|
let result;
|
|
16985
17123
|
if (this.canUsePlatformBroker(validRequest)) {
|
|
17124
|
+
// Cached nativeAccountId routes directly to the broker (no /authorize call)
|
|
16986
17125
|
this.ssoSilentMeasurement?.add({
|
|
16987
17126
|
isPlatformBrokerRequest: true,
|
|
16988
17127
|
});
|
|
16989
17128
|
result = this.acquireTokenNative(validRequest, ApiId.ssoSilent).catch((e) => {
|
|
16990
|
-
this.ssoSilentMeasurement?.add({
|
|
16991
|
-
brokerErrorName: e.name,
|
|
16992
|
-
brokerErrorCode: e.errorCode,
|
|
16993
|
-
});
|
|
16994
17129
|
// If native token acquisition fails for availability reasons fallback to standard flow
|
|
16995
17130
|
if (e instanceof NativeAuthError && isFatalNativeAuthError(e)) {
|
|
16996
17131
|
this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt platform broker calls
|
|
@@ -17013,7 +17148,7 @@ class StandardController {
|
|
|
17013
17148
|
}
|
|
17014
17149
|
this.ssoSilentMeasurement?.end({
|
|
17015
17150
|
success: true,
|
|
17016
|
-
isNativeBroker: response.fromPlatformBroker,
|
|
17151
|
+
isNativeBroker: response.fromPlatformBroker ?? false,
|
|
17017
17152
|
accessTokenSize: response.accessToken.length,
|
|
17018
17153
|
idTokenSize: response.idToken.length,
|
|
17019
17154
|
}, undefined, response.account);
|
|
@@ -17066,6 +17201,7 @@ class StandardController {
|
|
|
17066
17201
|
this.hybridAuthCodeResponses.delete(hybridAuthCode);
|
|
17067
17202
|
atbcMeasurement.end({
|
|
17068
17203
|
success: true,
|
|
17204
|
+
isNativeBroker: false,
|
|
17069
17205
|
accessTokenSize: result.accessToken.length,
|
|
17070
17206
|
idTokenSize: result.idToken.length,
|
|
17071
17207
|
}, undefined, result.account);
|
|
@@ -17096,10 +17232,6 @@ class StandardController {
|
|
|
17096
17232
|
...request,
|
|
17097
17233
|
correlationId,
|
|
17098
17234
|
}, ApiId.acquireTokenByCode, request.nativeAccountId).catch((e) => {
|
|
17099
|
-
atbcMeasurement.add({
|
|
17100
|
-
brokerErrorName: e.name,
|
|
17101
|
-
brokerErrorCode: e.errorCode,
|
|
17102
|
-
});
|
|
17103
17235
|
// If native token acquisition fails for availability reasons fallback to standard flow
|
|
17104
17236
|
if (e instanceof NativeAuthError &&
|
|
17105
17237
|
isFatalNativeAuthError(e)) {
|
|
@@ -17109,6 +17241,7 @@ class StandardController {
|
|
|
17109
17241
|
});
|
|
17110
17242
|
atbcMeasurement.end({
|
|
17111
17243
|
success: true,
|
|
17244
|
+
isNativeBroker: result.fromPlatformBroker ?? false,
|
|
17112
17245
|
}, undefined, result.account);
|
|
17113
17246
|
return result;
|
|
17114
17247
|
}
|
|
@@ -17149,6 +17282,7 @@ class StandardController {
|
|
|
17149
17282
|
.then((response) => {
|
|
17150
17283
|
this.acquireTokenByCodeAsyncMeasurement?.end({
|
|
17151
17284
|
success: true,
|
|
17285
|
+
isNativeBroker: false,
|
|
17152
17286
|
fromCache: response.fromCache,
|
|
17153
17287
|
});
|
|
17154
17288
|
return response;
|
|
@@ -17326,8 +17460,16 @@ class StandardController {
|
|
|
17326
17460
|
/**
|
|
17327
17461
|
* Acquire a token from native device (e.g. WAM)
|
|
17328
17462
|
* @param request
|
|
17463
|
+
* @param apiId
|
|
17464
|
+
* @param accountId
|
|
17465
|
+
* @param cacheLookupPolicy
|
|
17329
17466
|
*/
|
|
17330
17467
|
async acquireTokenNative(request, apiId, accountId, cacheLookupPolicy) {
|
|
17468
|
+
/*
|
|
17469
|
+
* Callers always normalize correlationId onto the request before delegating
|
|
17470
|
+
* here, so it is guaranteed defined and is the single id used to key this
|
|
17471
|
+
* flow's telemetry.
|
|
17472
|
+
*/
|
|
17331
17473
|
const correlationId = this.getRequestCorrelationId(request);
|
|
17332
17474
|
this.logger.trace("0b9y3p", correlationId);
|
|
17333
17475
|
if (!this.platformAuthProvider) {
|
|
@@ -17581,6 +17723,7 @@ class StandardController {
|
|
|
17581
17723
|
.then((result) => {
|
|
17582
17724
|
atsMeasurement.end({
|
|
17583
17725
|
success: true,
|
|
17726
|
+
isNativeBroker: result.fromPlatformBroker ?? false,
|
|
17584
17727
|
fromCache: result.fromCache,
|
|
17585
17728
|
accessTokenSize: result.accessToken.length,
|
|
17586
17729
|
idTokenSize: result.idToken.length,
|
|
@@ -17717,7 +17860,7 @@ class StandardController {
|
|
|
17717
17860
|
if (request.correlationId) {
|
|
17718
17861
|
this.performanceClient.addFields({
|
|
17719
17862
|
fromCache: response.fromCache,
|
|
17720
|
-
isNativeBroker: response.fromPlatformBroker,
|
|
17863
|
+
isNativeBroker: response.fromPlatformBroker ?? false,
|
|
17721
17864
|
}, request.correlationId);
|
|
17722
17865
|
}
|
|
17723
17866
|
return response;
|
|
@@ -17743,10 +17886,6 @@ class StandardController {
|
|
|
17743
17886
|
this.logger.verbose("0sczo4", silentRequest.correlationId);
|
|
17744
17887
|
this.performanceClient.addFields({ isPlatformBrokerRequest: true }, silentRequest.correlationId);
|
|
17745
17888
|
return this.acquireTokenNative(silentRequest, ApiId.acquireTokenSilent_silentFlow, silentRequest.account.nativeAccountId, cacheLookupPolicy).catch(async (e) => {
|
|
17746
|
-
this.performanceClient.addFields({
|
|
17747
|
-
brokerErrorName: e.name,
|
|
17748
|
-
brokerErrorCode: e.errorCode,
|
|
17749
|
-
}, silentRequest.correlationId);
|
|
17750
17889
|
// If native token acquisition fails for availability reasons fallback to web flow
|
|
17751
17890
|
if (e instanceof NativeAuthError && isFatalNativeAuthError(e)) {
|
|
17752
17891
|
this.logger.verbose("07rkmb", silentRequest.correlationId);
|