@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.17.
|
|
1
|
+
/*! @azure/msal-browser v5.17.3 2026-07-29 */
|
|
2
2
|
'use strict';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.msalCustomAuth = {}));
|
|
7
7
|
})(this, (function (exports) { 'use strict';
|
|
8
8
|
|
|
9
|
-
/*! @azure/msal-common v16.11.
|
|
9
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
10
10
|
/*
|
|
11
11
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12
12
|
* Licensed under the MIT License.
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
const RESOURCE = "resource";
|
|
59
59
|
const CLI_DATA = "clidata";
|
|
60
60
|
|
|
61
|
-
/*! @azure/msal-common v16.11.
|
|
61
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
62
62
|
/*
|
|
63
63
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
64
64
|
* Licensed under the MIT License.
|
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
// Token renewal offset default in seconds
|
|
290
290
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
291
291
|
|
|
292
|
-
/*! @azure/msal-common v16.11.
|
|
292
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
293
293
|
/*
|
|
294
294
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
295
295
|
* Licensed under the MIT License.
|
|
@@ -318,7 +318,7 @@
|
|
|
318
318
|
return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage$1(code));
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
/*! @azure/msal-common v16.11.
|
|
321
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
322
322
|
|
|
323
323
|
/*
|
|
324
324
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -341,7 +341,7 @@
|
|
|
341
341
|
return new ClientAuthError(errorCode, correlationId, additionalMessage);
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
-
/*! @azure/msal-common v16.11.
|
|
344
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
345
345
|
/*
|
|
346
346
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
347
347
|
* Licensed under the MIT License.
|
|
@@ -378,7 +378,7 @@
|
|
|
378
378
|
const resourceParameterRequired = "resource_parameter_required";
|
|
379
379
|
const misplacedResourceParam = "misplaced_resource_parameter";
|
|
380
380
|
|
|
381
|
-
/*! @azure/msal-common v16.11.
|
|
381
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
382
382
|
|
|
383
383
|
/*
|
|
384
384
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -416,7 +416,7 @@
|
|
|
416
416
|
};
|
|
417
417
|
}
|
|
418
418
|
|
|
419
|
-
/*! @azure/msal-common v16.11.
|
|
419
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
420
420
|
|
|
421
421
|
/*
|
|
422
422
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -482,7 +482,7 @@
|
|
|
482
482
|
return matches[2];
|
|
483
483
|
}
|
|
484
484
|
|
|
485
|
-
/*! @azure/msal-common v16.11.
|
|
485
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
486
486
|
|
|
487
487
|
/*
|
|
488
488
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -570,7 +570,7 @@
|
|
|
570
570
|
return updatedAccountInfo;
|
|
571
571
|
}
|
|
572
572
|
|
|
573
|
-
/*! @azure/msal-common v16.11.
|
|
573
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
574
574
|
/*
|
|
575
575
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
576
576
|
* Licensed under the MIT License.
|
|
@@ -585,7 +585,7 @@
|
|
|
585
585
|
Ciam: 3,
|
|
586
586
|
};
|
|
587
587
|
|
|
588
|
-
/*! @azure/msal-common v16.11.
|
|
588
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
589
589
|
/*
|
|
590
590
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
591
591
|
* Licensed under the MIT License.
|
|
@@ -607,7 +607,7 @@
|
|
|
607
607
|
return null;
|
|
608
608
|
}
|
|
609
609
|
|
|
610
|
-
/*! @azure/msal-common v16.11.
|
|
610
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
611
611
|
/*
|
|
612
612
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
613
613
|
* Licensed under the MIT License.
|
|
@@ -631,7 +631,7 @@
|
|
|
631
631
|
EAR: "EAR",
|
|
632
632
|
};
|
|
633
633
|
|
|
634
|
-
/*! @azure/msal-common v16.11.
|
|
634
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
635
635
|
/**
|
|
636
636
|
* Returns the AccountInfo interface for this account.
|
|
637
637
|
* @internal
|
|
@@ -820,7 +820,7 @@
|
|
|
820
820
|
entity.hasOwnProperty("authorityType"));
|
|
821
821
|
}
|
|
822
822
|
|
|
823
|
-
/*! @azure/msal-common v16.11.
|
|
823
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
824
824
|
/*
|
|
825
825
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
826
826
|
* Licensed under the MIT License.
|
|
@@ -830,7 +830,7 @@
|
|
|
830
830
|
*/
|
|
831
831
|
const unexpectedError = "unexpected_error";
|
|
832
832
|
|
|
833
|
-
/*! @azure/msal-common v16.11.
|
|
833
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
834
834
|
|
|
835
835
|
/*
|
|
836
836
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -850,7 +850,7 @@
|
|
|
850
850
|
return new ClientConfigurationError(errorCode, correlationId);
|
|
851
851
|
}
|
|
852
852
|
|
|
853
|
-
/*! @azure/msal-common v16.11.
|
|
853
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
854
854
|
/*
|
|
855
855
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
856
856
|
* Licensed under the MIT License.
|
|
@@ -876,7 +876,7 @@
|
|
|
876
876
|
const invalidPlatformBrokerConfiguration = "invalid_platform_broker_configuration";
|
|
877
877
|
const issuerValidationFailed = "issuer_validation_failed";
|
|
878
878
|
|
|
879
|
-
/*! @azure/msal-common v16.11.
|
|
879
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
880
880
|
/*
|
|
881
881
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
882
882
|
* Licensed under the MIT License.
|
|
@@ -888,7 +888,7 @@
|
|
|
888
888
|
response.hasOwnProperty("jwks_uri"));
|
|
889
889
|
}
|
|
890
890
|
|
|
891
|
-
/*! @azure/msal-common v16.11.
|
|
891
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
892
892
|
/*
|
|
893
893
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
894
894
|
* Licensed under the MIT License.
|
|
@@ -968,7 +968,7 @@
|
|
|
968
968
|
}
|
|
969
969
|
}
|
|
970
970
|
|
|
971
|
-
/*! @azure/msal-common v16.11.
|
|
971
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
972
972
|
|
|
973
973
|
/*
|
|
974
974
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1126,7 +1126,7 @@
|
|
|
1126
1126
|
}
|
|
1127
1127
|
}
|
|
1128
1128
|
|
|
1129
|
-
/*! @azure/msal-common v16.11.
|
|
1129
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1130
1130
|
|
|
1131
1131
|
/*
|
|
1132
1132
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1292,7 +1292,7 @@
|
|
|
1292
1292
|
return null;
|
|
1293
1293
|
}
|
|
1294
1294
|
|
|
1295
|
-
/*! @azure/msal-common v16.11.
|
|
1295
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1296
1296
|
/*
|
|
1297
1297
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1298
1298
|
* Licensed under the MIT License.
|
|
@@ -1301,7 +1301,7 @@
|
|
|
1301
1301
|
// AzureCloudInstance is not specified.
|
|
1302
1302
|
None: "none"};
|
|
1303
1303
|
|
|
1304
|
-
/*! @azure/msal-common v16.11.
|
|
1304
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1305
1305
|
/*
|
|
1306
1306
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1307
1307
|
* Licensed under the MIT License.
|
|
@@ -1311,7 +1311,7 @@
|
|
|
1311
1311
|
response.hasOwnProperty("metadata"));
|
|
1312
1312
|
}
|
|
1313
1313
|
|
|
1314
|
-
/*! @azure/msal-common v16.11.
|
|
1314
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1315
1315
|
/*
|
|
1316
1316
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1317
1317
|
* Licensed under the MIT License.
|
|
@@ -1321,7 +1321,7 @@
|
|
|
1321
1321
|
response.hasOwnProperty("error_description"));
|
|
1322
1322
|
}
|
|
1323
1323
|
|
|
1324
|
-
/*! @azure/msal-common v16.11.
|
|
1324
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1325
1325
|
/*
|
|
1326
1326
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1327
1327
|
* Licensed under the MIT License.
|
|
@@ -1392,7 +1392,7 @@
|
|
|
1392
1392
|
const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
|
|
1393
1393
|
const SetUserData = "setUserData";
|
|
1394
1394
|
|
|
1395
|
-
/*! @azure/msal-common v16.11.
|
|
1395
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1396
1396
|
/*
|
|
1397
1397
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1398
1398
|
* Licensed under the MIT License.
|
|
@@ -1485,7 +1485,7 @@
|
|
|
1485
1485
|
};
|
|
1486
1486
|
};
|
|
1487
1487
|
|
|
1488
|
-
/*! @azure/msal-common v16.11.
|
|
1488
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1489
1489
|
|
|
1490
1490
|
/*
|
|
1491
1491
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1596,7 +1596,7 @@
|
|
|
1596
1596
|
},
|
|
1597
1597
|
};
|
|
1598
1598
|
|
|
1599
|
-
/*! @azure/msal-common v16.11.
|
|
1599
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1600
1600
|
/*
|
|
1601
1601
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1602
1602
|
* Licensed under the MIT License.
|
|
@@ -1661,7 +1661,7 @@
|
|
|
1661
1661
|
return cachedAtSec > nowSeconds();
|
|
1662
1662
|
}
|
|
1663
1663
|
|
|
1664
|
-
/*! @azure/msal-common v16.11.
|
|
1664
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1665
1665
|
|
|
1666
1666
|
/*
|
|
1667
1667
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1928,7 +1928,7 @@
|
|
|
1928
1928
|
return metadata.expiresAt <= nowSeconds();
|
|
1929
1929
|
}
|
|
1930
1930
|
|
|
1931
|
-
/*! @azure/msal-common v16.11.
|
|
1931
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
1932
1932
|
|
|
1933
1933
|
/*
|
|
1934
1934
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2898,7 +2898,7 @@
|
|
|
2898
2898
|
};
|
|
2899
2899
|
}
|
|
2900
2900
|
|
|
2901
|
-
/*! @azure/msal-common v16.11.
|
|
2901
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
2902
2902
|
|
|
2903
2903
|
/*
|
|
2904
2904
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2932,7 +2932,7 @@
|
|
|
2932
2932
|
}
|
|
2933
2933
|
}
|
|
2934
2934
|
|
|
2935
|
-
/*! @azure/msal-common v16.11.
|
|
2935
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
2936
2936
|
|
|
2937
2937
|
/*
|
|
2938
2938
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3128,7 +3128,7 @@
|
|
|
3128
3128
|
}
|
|
3129
3129
|
}
|
|
3130
3130
|
|
|
3131
|
-
/*! @azure/msal-common v16.11.
|
|
3131
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
3132
3132
|
|
|
3133
3133
|
/*
|
|
3134
3134
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3543,7 +3543,7 @@
|
|
|
3543
3543
|
}
|
|
3544
3544
|
}
|
|
3545
3545
|
|
|
3546
|
-
/*! @azure/msal-common v16.11.
|
|
3546
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
3547
3547
|
|
|
3548
3548
|
/*
|
|
3549
3549
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3665,12 +3665,16 @@
|
|
|
3665
3665
|
}
|
|
3666
3666
|
}
|
|
3667
3667
|
|
|
3668
|
-
/*! @azure/msal-common v16.11.
|
|
3668
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
3669
3669
|
|
|
3670
3670
|
/*
|
|
3671
3671
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3672
3672
|
* Licensed under the MIT License.
|
|
3673
3673
|
*/
|
|
3674
|
+
/**
|
|
3675
|
+
* Default crypto implementation used when a platform-specific implementation has
|
|
3676
|
+
* not been provided.
|
|
3677
|
+
*/
|
|
3674
3678
|
const DEFAULT_CRYPTO_IMPLEMENTATION = {
|
|
3675
3679
|
createNewGuid: () => {
|
|
3676
3680
|
throw createClientAuthError(methodNotImplemented, "");
|
|
@@ -3704,7 +3708,7 @@
|
|
|
3704
3708
|
},
|
|
3705
3709
|
};
|
|
3706
3710
|
|
|
3707
|
-
/*! @azure/msal-common v16.11.
|
|
3711
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
3708
3712
|
/*
|
|
3709
3713
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3710
3714
|
* Licensed under the MIT License.
|
|
@@ -3979,12 +3983,12 @@
|
|
|
3979
3983
|
}
|
|
3980
3984
|
}
|
|
3981
3985
|
|
|
3982
|
-
/*! @azure/msal-common v16.11.
|
|
3986
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
3983
3987
|
/* eslint-disable header/header */
|
|
3984
3988
|
const name$1 = "@azure/msal-common";
|
|
3985
|
-
const version$1 = "16.11.
|
|
3989
|
+
const version$1 = "16.11.3";
|
|
3986
3990
|
|
|
3987
|
-
/*! @azure/msal-common v16.11.
|
|
3991
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
3988
3992
|
/*
|
|
3989
3993
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3990
3994
|
* Licensed under the MIT License.
|
|
@@ -3992,7 +3996,7 @@
|
|
|
3992
3996
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
3993
3997
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
3994
3998
|
|
|
3995
|
-
/*! @azure/msal-common v16.11.
|
|
3999
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
3996
4000
|
|
|
3997
4001
|
/*
|
|
3998
4002
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4030,7 +4034,7 @@
|
|
|
4030
4034
|
}
|
|
4031
4035
|
}
|
|
4032
4036
|
|
|
4033
|
-
/*! @azure/msal-common v16.11.
|
|
4037
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
4034
4038
|
|
|
4035
4039
|
/*
|
|
4036
4040
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5177,7 +5181,7 @@
|
|
|
5177
5181
|
}
|
|
5178
5182
|
}
|
|
5179
5183
|
|
|
5180
|
-
/*! @azure/msal-common v16.11.
|
|
5184
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5181
5185
|
/*
|
|
5182
5186
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5183
5187
|
* Licensed under the MIT License.
|
|
@@ -5191,7 +5195,7 @@
|
|
|
5191
5195
|
const PerformanceEventStatus = {
|
|
5192
5196
|
InProgress: 1};
|
|
5193
5197
|
|
|
5194
|
-
/*! @azure/msal-common v16.11.
|
|
5198
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5195
5199
|
|
|
5196
5200
|
/*
|
|
5197
5201
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5249,7 +5253,7 @@
|
|
|
5249
5253
|
}
|
|
5250
5254
|
}
|
|
5251
5255
|
|
|
5252
|
-
/*! @azure/msal-common v16.11.
|
|
5256
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5253
5257
|
|
|
5254
5258
|
/*
|
|
5255
5259
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5345,7 +5349,7 @@
|
|
|
5345
5349
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
5346
5350
|
}
|
|
5347
5351
|
|
|
5348
|
-
/*! @azure/msal-common v16.11.
|
|
5352
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5349
5353
|
/*
|
|
5350
5354
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5351
5355
|
* Licensed under the MIT License.
|
|
@@ -5372,7 +5376,7 @@
|
|
|
5372
5376
|
}
|
|
5373
5377
|
}
|
|
5374
5378
|
|
|
5375
|
-
/*! @azure/msal-common v16.11.
|
|
5379
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5376
5380
|
|
|
5377
5381
|
/*
|
|
5378
5382
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5452,7 +5456,7 @@
|
|
|
5452
5456
|
}
|
|
5453
5457
|
}
|
|
5454
5458
|
|
|
5455
|
-
/*! @azure/msal-common v16.11.
|
|
5459
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5456
5460
|
/*
|
|
5457
5461
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5458
5462
|
* Licensed under the MIT License.
|
|
@@ -5503,7 +5507,7 @@
|
|
|
5503
5507
|
*/
|
|
5504
5508
|
const interruptedUser = "interrupted_user";
|
|
5505
5509
|
|
|
5506
|
-
/*! @azure/msal-common v16.11.
|
|
5510
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5507
5511
|
|
|
5508
5512
|
/*
|
|
5509
5513
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5570,7 +5574,7 @@
|
|
|
5570
5574
|
return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
|
|
5571
5575
|
}
|
|
5572
5576
|
|
|
5573
|
-
/*! @azure/msal-common v16.11.
|
|
5577
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5574
5578
|
|
|
5575
5579
|
/*
|
|
5576
5580
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5589,7 +5593,7 @@
|
|
|
5589
5593
|
}
|
|
5590
5594
|
}
|
|
5591
5595
|
|
|
5592
|
-
/*! @azure/msal-common v16.11.
|
|
5596
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5593
5597
|
|
|
5594
5598
|
/*
|
|
5595
5599
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5660,7 +5664,7 @@
|
|
|
5660
5664
|
}
|
|
5661
5665
|
}
|
|
5662
5666
|
|
|
5663
|
-
/*! @azure/msal-common v16.11.
|
|
5667
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
5664
5668
|
|
|
5665
5669
|
/*
|
|
5666
5670
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6011,7 +6015,7 @@
|
|
|
6011
6015
|
return baseAccount;
|
|
6012
6016
|
}
|
|
6013
6017
|
|
|
6014
|
-
/*! @azure/msal-common v16.11.
|
|
6018
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6015
6019
|
/*
|
|
6016
6020
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6017
6021
|
* Licensed under the MIT License.
|
|
@@ -6021,7 +6025,7 @@
|
|
|
6021
6025
|
UPN: "UPN",
|
|
6022
6026
|
};
|
|
6023
6027
|
|
|
6024
|
-
/*! @azure/msal-common v16.11.
|
|
6028
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6025
6029
|
/*
|
|
6026
6030
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6027
6031
|
* Licensed under the MIT License.
|
|
@@ -6040,7 +6044,7 @@
|
|
|
6040
6044
|
}
|
|
6041
6045
|
}
|
|
6042
6046
|
|
|
6043
|
-
/*! @azure/msal-common v16.11.
|
|
6047
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6044
6048
|
/*
|
|
6045
6049
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6046
6050
|
* Licensed under the MIT License.
|
|
@@ -6062,7 +6066,7 @@
|
|
|
6062
6066
|
};
|
|
6063
6067
|
}
|
|
6064
6068
|
|
|
6065
|
-
/*! @azure/msal-common v16.11.
|
|
6069
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6066
6070
|
|
|
6067
6071
|
/*
|
|
6068
6072
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6148,7 +6152,7 @@
|
|
|
6148
6152
|
}
|
|
6149
6153
|
}
|
|
6150
6154
|
|
|
6151
|
-
/*! @azure/msal-common v16.11.
|
|
6155
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6152
6156
|
|
|
6153
6157
|
/*
|
|
6154
6158
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6179,7 +6183,7 @@
|
|
|
6179
6183
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
6180
6184
|
}
|
|
6181
6185
|
|
|
6182
|
-
/*! @azure/msal-common v16.11.
|
|
6186
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6183
6187
|
|
|
6184
6188
|
/*
|
|
6185
6189
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6259,7 +6263,7 @@
|
|
|
6259
6263
|
ThrottlingUtils.preProcess(cacheManager, thumbprint, correlationId);
|
|
6260
6264
|
let response;
|
|
6261
6265
|
try {
|
|
6262
|
-
response = await invokeAsync((networkClient.sendPostRequestAsync.bind(networkClient)), NetworkClientSendPostRequestAsync, logger, performanceClient, correlationId)(tokenEndpoint, options);
|
|
6266
|
+
response = await invokeAsync((networkClient.sendPostRequestAsync.bind(networkClient)), NetworkClientSendPostRequestAsync, logger, performanceClient, correlationId)(tokenEndpoint, { ...options, correlationId, performanceClient });
|
|
6263
6267
|
const responseHeaders = response.headers || {};
|
|
6264
6268
|
performanceClient?.addFields({
|
|
6265
6269
|
refreshTokenSize: response.body.refresh_token?.length || 0,
|
|
@@ -6295,7 +6299,7 @@
|
|
|
6295
6299
|
return response;
|
|
6296
6300
|
}
|
|
6297
6301
|
|
|
6298
|
-
/*! @azure/msal-common v16.11.
|
|
6302
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6299
6303
|
|
|
6300
6304
|
/*
|
|
6301
6305
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6552,7 +6556,7 @@
|
|
|
6552
6556
|
}
|
|
6553
6557
|
}
|
|
6554
6558
|
|
|
6555
|
-
/*! @azure/msal-common v16.11.
|
|
6559
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6556
6560
|
|
|
6557
6561
|
/*
|
|
6558
6562
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6779,7 +6783,7 @@
|
|
|
6779
6783
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
6780
6784
|
}
|
|
6781
6785
|
|
|
6782
|
-
/*! @azure/msal-common v16.11.
|
|
6786
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6783
6787
|
|
|
6784
6788
|
/*
|
|
6785
6789
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6800,7 +6804,7 @@
|
|
|
6800
6804
|
return new JoseHeaderError(code, correlationId);
|
|
6801
6805
|
}
|
|
6802
6806
|
|
|
6803
|
-
/*! @azure/msal-common v16.11.
|
|
6807
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6804
6808
|
/*
|
|
6805
6809
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6806
6810
|
* Licensed under the MIT License.
|
|
@@ -6808,7 +6812,7 @@
|
|
|
6808
6812
|
const missingKidError = "missing_kid_error";
|
|
6809
6813
|
const missingAlgError = "missing_alg_error";
|
|
6810
6814
|
|
|
6811
|
-
/*! @azure/msal-common v16.11.
|
|
6815
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6812
6816
|
|
|
6813
6817
|
/*
|
|
6814
6818
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6848,7 +6852,7 @@
|
|
|
6848
6852
|
}
|
|
6849
6853
|
}
|
|
6850
6854
|
|
|
6851
|
-
/*! @azure/msal-common v16.11.
|
|
6855
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
6852
6856
|
|
|
6853
6857
|
/*
|
|
6854
6858
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7069,7 +7073,7 @@
|
|
|
7069
7073
|
}
|
|
7070
7074
|
}
|
|
7071
7075
|
|
|
7072
|
-
/*! @azure/msal-common v16.11.
|
|
7076
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
7073
7077
|
|
|
7074
7078
|
/*
|
|
7075
7079
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7362,7 +7366,7 @@
|
|
|
7362
7366
|
clearNativeBrokerErrorCode() { }
|
|
7363
7367
|
}
|
|
7364
7368
|
|
|
7365
|
-
/*! @azure/msal-common v16.11.
|
|
7369
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
7366
7370
|
|
|
7367
7371
|
/*
|
|
7368
7372
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7470,7 +7474,7 @@
|
|
|
7470
7474
|
}
|
|
7471
7475
|
}
|
|
7472
7476
|
|
|
7473
|
-
/*! @azure/msal-common v16.11.
|
|
7477
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
7474
7478
|
|
|
7475
7479
|
/*
|
|
7476
7480
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7486,7 +7490,7 @@
|
|
|
7486
7490
|
},
|
|
7487
7491
|
};
|
|
7488
7492
|
|
|
7489
|
-
/*! @azure/msal-common v16.11.
|
|
7493
|
+
/*! @azure/msal-common v16.11.3 2026-07-29 */
|
|
7490
7494
|
|
|
7491
7495
|
/*
|
|
7492
7496
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7914,7 +7918,7 @@
|
|
|
7914
7918
|
|
|
7915
7919
|
/* eslint-disable header/header */
|
|
7916
7920
|
const name = "@azure/msal-browser";
|
|
7917
|
-
const version = "5.17.
|
|
7921
|
+
const version = "5.17.3";
|
|
7918
7922
|
|
|
7919
7923
|
/*
|
|
7920
7924
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8585,6 +8589,7 @@
|
|
|
8585
8589
|
const getRequestFailed = "get_request_failed";
|
|
8586
8590
|
const failedToParseResponse = "failed_to_parse_response";
|
|
8587
8591
|
const cryptoKeyNotFound = "crypto_key_not_found";
|
|
8592
|
+
const invalidPublicJwk = "invalid_public_jwk";
|
|
8588
8593
|
const authCodeRequired = "auth_code_required";
|
|
8589
8594
|
const authCodeOrNativeAccountIdRequired = "auth_code_or_nativeAccountId_required";
|
|
8590
8595
|
const spaCodeAndNativeAccountIdPresent = "spa_code_and_nativeAccountId_present";
|
|
@@ -8906,6 +8911,12 @@
|
|
|
8906
8911
|
const HKDF = "HKDF";
|
|
8907
8912
|
// SHA-256 hashing algorithm
|
|
8908
8913
|
const S256_HASH_ALG = "SHA-256";
|
|
8914
|
+
const JSON_WEB_KEY_TYPE_EC = "EC";
|
|
8915
|
+
const JSON_WEB_KEY_TYPE_RSA = "RSA";
|
|
8916
|
+
const MISSING_JWK_KTY_SUBERROR = "missing_jwk_kty";
|
|
8917
|
+
const UNSUPPORTED_JWK_KTY_SUBERROR = "unsupported_jwk_kty";
|
|
8918
|
+
const MISSING_JWK_MEMBER_SUBERROR = "missing_jwk_member";
|
|
8919
|
+
const EMPTY_JWK_MEMBER_SUBERROR = "empty_jwk_member";
|
|
8909
8920
|
// MOD length for PoP tokens
|
|
8910
8921
|
const MODULUS_LENGTH = 2048;
|
|
8911
8922
|
// Public Exponent
|
|
@@ -8922,12 +8933,15 @@
|
|
|
8922
8933
|
const DERIVE_KEY = "deriveKey";
|
|
8923
8934
|
// Suberror
|
|
8924
8935
|
const SUBTLE_SUBERROR = "crypto_subtle_undefined";
|
|
8925
|
-
const
|
|
8936
|
+
const RSA_KEYGEN_ALGORITHM_OPTIONS = {
|
|
8926
8937
|
name: PKCS1_V15_KEYGEN_ALG,
|
|
8927
8938
|
hash: S256_HASH_ALG,
|
|
8928
8939
|
modulusLength: MODULUS_LENGTH,
|
|
8929
8940
|
publicExponent: PUBLIC_EXPONENT,
|
|
8930
8941
|
};
|
|
8942
|
+
const RSA_SIGN_ALGORITHM_OPTIONS = {
|
|
8943
|
+
name: PKCS1_V15_KEYGEN_ALG,
|
|
8944
|
+
};
|
|
8931
8945
|
/**
|
|
8932
8946
|
* Check whether browser crypto is available.
|
|
8933
8947
|
*/
|
|
@@ -9011,12 +9025,13 @@
|
|
|
9011
9025
|
return text;
|
|
9012
9026
|
}
|
|
9013
9027
|
/**
|
|
9014
|
-
* Generates a keypair based on
|
|
9028
|
+
* Generates a keypair based on the provided algorithm config.
|
|
9015
9029
|
* @param extractable
|
|
9016
9030
|
* @param usages
|
|
9031
|
+
* @param algorithm
|
|
9017
9032
|
*/
|
|
9018
|
-
async function generateKeyPair(extractable, usages) {
|
|
9019
|
-
return window.crypto.subtle.generateKey(
|
|
9033
|
+
async function generateKeyPair(extractable, usages, algorithm) {
|
|
9034
|
+
return window.crypto.subtle.generateKey(algorithm, extractable, usages);
|
|
9020
9035
|
}
|
|
9021
9036
|
/**
|
|
9022
9037
|
* Export key as Json Web Key (JWK)
|
|
@@ -9030,17 +9045,19 @@
|
|
|
9030
9045
|
* @param key
|
|
9031
9046
|
* @param extractable
|
|
9032
9047
|
* @param usages
|
|
9048
|
+
* @param algorithm
|
|
9033
9049
|
*/
|
|
9034
|
-
async function importJwk(key, extractable, usages) {
|
|
9035
|
-
return window.crypto.subtle.importKey(KEY_FORMAT_JWK, key,
|
|
9050
|
+
async function importJwk(key, extractable, usages, algorithm) {
|
|
9051
|
+
return window.crypto.subtle.importKey(KEY_FORMAT_JWK, key, algorithm, extractable, usages);
|
|
9036
9052
|
}
|
|
9037
9053
|
/**
|
|
9038
|
-
* Signs given data with given key
|
|
9054
|
+
* Signs given data with given key.
|
|
9039
9055
|
* @param key
|
|
9040
9056
|
* @param data
|
|
9057
|
+
* @param algorithm
|
|
9041
9058
|
*/
|
|
9042
|
-
async function sign(key, data) {
|
|
9043
|
-
return window.crypto.subtle.sign(
|
|
9059
|
+
async function sign(key, data, algorithm) {
|
|
9060
|
+
return window.crypto.subtle.sign(algorithm, key, data);
|
|
9044
9061
|
}
|
|
9045
9062
|
/**
|
|
9046
9063
|
* Generates Base64 encoded jwk used in the Encrypted Authorize Response (EAR) flow
|
|
@@ -9183,6 +9200,43 @@
|
|
|
9183
9200
|
const hashBuffer = await sha256Digest(plainText);
|
|
9184
9201
|
const hashBytes = new Uint8Array(hashBuffer);
|
|
9185
9202
|
return urlEncodeArr(hashBytes);
|
|
9203
|
+
}
|
|
9204
|
+
const JWK_THUMBPRINT_REQUIRED_MEMBERS = {
|
|
9205
|
+
[JSON_WEB_KEY_TYPE_EC]: ["crv", "kty", "x", "y"],
|
|
9206
|
+
[JSON_WEB_KEY_TYPE_RSA]: ["e", "kty", "n"],
|
|
9207
|
+
};
|
|
9208
|
+
function getJwkThumbprintMembers(publicJwk) {
|
|
9209
|
+
const kty = publicJwk.kty;
|
|
9210
|
+
if (typeof kty !== "string" || kty.length === 0) {
|
|
9211
|
+
throw createBrowserAuthError(invalidPublicJwk, "", MISSING_JWK_KTY_SUBERROR);
|
|
9212
|
+
}
|
|
9213
|
+
const requiredMembers = JWK_THUMBPRINT_REQUIRED_MEMBERS[kty];
|
|
9214
|
+
if (!requiredMembers) {
|
|
9215
|
+
throw createBrowserAuthError(invalidPublicJwk, "", UNSUPPORTED_JWK_KTY_SUBERROR);
|
|
9216
|
+
}
|
|
9217
|
+
return requiredMembers.reduce((thumbprintMembers, memberName) => {
|
|
9218
|
+
const memberValue = publicJwk[memberName];
|
|
9219
|
+
if (typeof memberValue !== "string") {
|
|
9220
|
+
throw createBrowserAuthError(invalidPublicJwk, "", MISSING_JWK_MEMBER_SUBERROR);
|
|
9221
|
+
}
|
|
9222
|
+
if (memberValue.length === 0) {
|
|
9223
|
+
throw createBrowserAuthError(invalidPublicJwk, "", EMPTY_JWK_MEMBER_SUBERROR);
|
|
9224
|
+
}
|
|
9225
|
+
thumbprintMembers[memberName] = memberValue;
|
|
9226
|
+
return thumbprintMembers;
|
|
9227
|
+
}, {});
|
|
9228
|
+
}
|
|
9229
|
+
/**
|
|
9230
|
+
* Computes an RFC 7638 JWK thumbprint for a public key.
|
|
9231
|
+
* The required members for the JWK key type are serialised in lexicographic order
|
|
9232
|
+
* and the SHA-256 digest is returned as a base64url string.
|
|
9233
|
+
* @internal
|
|
9234
|
+
*/
|
|
9235
|
+
async function computeJwkThumbprint(publicJwk) {
|
|
9236
|
+
const thumbprintMembers = getJwkThumbprintMembers(publicJwk);
|
|
9237
|
+
// RFC 7638 §3.3: use only required members, sorted lexicographically
|
|
9238
|
+
const thumbprintJson = JSON.stringify(thumbprintMembers, Object.keys(thumbprintMembers).sort());
|
|
9239
|
+
return hashString(thumbprintJson);
|
|
9186
9240
|
}
|
|
9187
9241
|
|
|
9188
9242
|
/*
|
|
@@ -14444,20 +14498,14 @@
|
|
|
14444
14498
|
async getPublicKeyThumbprint(request) {
|
|
14445
14499
|
const publicKeyThumbMeasurement = this.performanceClient?.startMeasurement(CryptoOptsGetPublicKeyThumbprint, request.correlationId);
|
|
14446
14500
|
// Generate Keypair
|
|
14447
|
-
const keyPair = await generateKeyPair(CryptoOps.EXTRACTABLE, CryptoOps.POP_KEY_USAGES);
|
|
14501
|
+
const keyPair = await generateKeyPair(CryptoOps.EXTRACTABLE, CryptoOps.POP_KEY_USAGES, RSA_KEYGEN_ALGORITHM_OPTIONS);
|
|
14448
14502
|
// Generate Thumbprint for Public Key
|
|
14449
14503
|
const publicKeyJwk = await exportJwk(keyPair.publicKey);
|
|
14450
|
-
const
|
|
14451
|
-
e: publicKeyJwk.e,
|
|
14452
|
-
kty: publicKeyJwk.kty,
|
|
14453
|
-
n: publicKeyJwk.n,
|
|
14454
|
-
};
|
|
14455
|
-
const publicJwkString = getSortedObjectString(pubKeyThumprintObj);
|
|
14456
|
-
const publicJwkHash = await this.hashString(publicJwkString);
|
|
14504
|
+
const publicJwkHash = await computeJwkThumbprint(publicKeyJwk);
|
|
14457
14505
|
// Generate Thumbprint for Private Key
|
|
14458
14506
|
const privateKeyJwk = await exportJwk(keyPair.privateKey);
|
|
14459
14507
|
// Re-import private key to make it unextractable
|
|
14460
|
-
const unextractablePrivateKey = await importJwk(privateKeyJwk, false, ["sign"]);
|
|
14508
|
+
const unextractablePrivateKey = await importJwk(privateKeyJwk, false, ["sign"], RSA_KEYGEN_ALGORITHM_OPTIONS);
|
|
14461
14509
|
// Store Keypair data in keystore
|
|
14462
14510
|
await this.cache.setItem(publicJwkHash, {
|
|
14463
14511
|
privateKey: unextractablePrivateKey,
|
|
@@ -14542,7 +14590,7 @@
|
|
|
14542
14590
|
// Sign token
|
|
14543
14591
|
const encoder = new TextEncoder();
|
|
14544
14592
|
const tokenBuffer = encoder.encode(tokenString);
|
|
14545
|
-
const signatureBuffer = await sign(cachedKeyPair.privateKey, tokenBuffer);
|
|
14593
|
+
const signatureBuffer = await sign(cachedKeyPair.privateKey, tokenBuffer, RSA_SIGN_ALGORITHM_OPTIONS);
|
|
14546
14594
|
const encodedSignature = urlEncodeArr(new Uint8Array(signatureBuffer));
|
|
14547
14595
|
const signedJwt = `${tokenString}.${encodedSignature}`;
|
|
14548
14596
|
if (signJwtMeasurement) {
|
|
@@ -17181,50 +17229,63 @@
|
|
|
17181
17229
|
const nativeATMeasurement = this.performanceClient.startMeasurement(NativeInteractionClientAcquireToken, this.correlationId);
|
|
17182
17230
|
const reqTimestamp = nowSeconds();
|
|
17183
17231
|
const serverTelemetryManager = initializeServerTelemetryManager(this.apiId, this.config.auth.clientId, this.correlationId, this.browserStorage, this.logger, undefined, this.config.system.serverTelemetryEnabled);
|
|
17232
|
+
// initialize native request (statically builds the request; does not contact the broker)
|
|
17233
|
+
let nativeRequest;
|
|
17184
17234
|
try {
|
|
17185
|
-
|
|
17186
|
-
|
|
17187
|
-
|
|
17188
|
-
|
|
17189
|
-
|
|
17190
|
-
|
|
17191
|
-
|
|
17235
|
+
nativeRequest = await this.initializePlatformRequest(request);
|
|
17236
|
+
}
|
|
17237
|
+
catch (e) {
|
|
17238
|
+
/*
|
|
17239
|
+
* Request initialization (e.g. PoP token generation or authority
|
|
17240
|
+
* resolution) failed before the broker was contacted, so end the
|
|
17241
|
+
* measurement here to avoid an orphaned sub-measurement.
|
|
17242
|
+
* Broker was never engaged, so this was not a native broker outcome.
|
|
17243
|
+
*/
|
|
17244
|
+
nativeATMeasurement.add({
|
|
17245
|
+
isNativeBroker: false,
|
|
17246
|
+
});
|
|
17247
|
+
nativeATMeasurement.end({
|
|
17248
|
+
success: false,
|
|
17249
|
+
}, e);
|
|
17250
|
+
throw e;
|
|
17251
|
+
}
|
|
17252
|
+
// check if the tokens can be retrieved from internal cache
|
|
17253
|
+
try {
|
|
17254
|
+
const result = await this.acquireTokensFromCache(this.accountId, nativeRequest);
|
|
17255
|
+
// Served from the native internal cache; token did not come directly from the broker
|
|
17256
|
+
nativeATMeasurement.add({
|
|
17257
|
+
isNativeBroker: false,
|
|
17258
|
+
});
|
|
17259
|
+
nativeATMeasurement.end({
|
|
17260
|
+
success: true,
|
|
17261
|
+
fromCache: true,
|
|
17262
|
+
});
|
|
17263
|
+
return result;
|
|
17264
|
+
}
|
|
17265
|
+
catch (e) {
|
|
17266
|
+
if (cacheLookupPolicy === CacheLookupPolicy.AccessToken) {
|
|
17267
|
+
this.logger.info("MSAL internal Cache does not contain tokens, return error as per cache policy", this.correlationId);
|
|
17268
|
+
nativeATMeasurement.add({
|
|
17192
17269
|
isNativeBroker: false,
|
|
17193
|
-
fromCache: true,
|
|
17194
17270
|
});
|
|
17195
|
-
return result;
|
|
17196
|
-
}
|
|
17197
|
-
catch (e) {
|
|
17198
|
-
if (cacheLookupPolicy === CacheLookupPolicy.AccessToken) {
|
|
17199
|
-
this.logger.info("MSAL internal Cache does not contain tokens, return error as per cache policy", this.correlationId);
|
|
17200
|
-
nativeATMeasurement.end({
|
|
17201
|
-
success: false,
|
|
17202
|
-
brokerErrorCode: "cache_request_failed",
|
|
17203
|
-
});
|
|
17204
|
-
throw e;
|
|
17205
|
-
}
|
|
17206
|
-
// continue with a native call for any and all errors
|
|
17207
|
-
this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call", this.correlationId);
|
|
17208
|
-
}
|
|
17209
|
-
const validatedResponse = await this.platformAuthProvider.sendMessage(nativeRequest);
|
|
17210
|
-
return await this.handleNativeResponse(validatedResponse, nativeRequest, reqTimestamp)
|
|
17211
|
-
.then((result) => {
|
|
17212
|
-
nativeATMeasurement.end({
|
|
17213
|
-
success: true,
|
|
17214
|
-
isNativeBroker: true,
|
|
17215
|
-
requestId: result.requestId,
|
|
17216
|
-
});
|
|
17217
|
-
serverTelemetryManager.clearNativeBrokerErrorCode();
|
|
17218
|
-
return result;
|
|
17219
|
-
})
|
|
17220
|
-
.catch((error) => {
|
|
17221
17271
|
nativeATMeasurement.end({
|
|
17222
17272
|
success: false,
|
|
17223
|
-
errorCode: error.errorCode,
|
|
17224
|
-
subErrorCode: error.subError,
|
|
17225
17273
|
});
|
|
17226
|
-
throw
|
|
17274
|
+
throw e;
|
|
17275
|
+
}
|
|
17276
|
+
// continue with a native call for any and all errors
|
|
17277
|
+
this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call", this.correlationId);
|
|
17278
|
+
}
|
|
17279
|
+
// dispatch the request to the broker
|
|
17280
|
+
try {
|
|
17281
|
+
const validatedResponse = await this.platformAuthProvider.sendMessage(nativeRequest);
|
|
17282
|
+
const result = await this.handleNativeResponse(validatedResponse, nativeRequest, reqTimestamp, request.storeInCache);
|
|
17283
|
+
nativeATMeasurement.end({
|
|
17284
|
+
success: true,
|
|
17285
|
+
requestId: result.requestId,
|
|
17227
17286
|
});
|
|
17287
|
+
serverTelemetryManager.clearNativeBrokerErrorCode();
|
|
17288
|
+
return result;
|
|
17228
17289
|
}
|
|
17229
17290
|
catch (e) {
|
|
17230
17291
|
if (e instanceof NativeAuthError) {
|
|
@@ -17232,10 +17293,29 @@
|
|
|
17232
17293
|
}
|
|
17233
17294
|
nativeATMeasurement.end({
|
|
17234
17295
|
success: false,
|
|
17235
|
-
});
|
|
17296
|
+
}, e);
|
|
17297
|
+
this.setBrokerErrorTelemetry(e);
|
|
17236
17298
|
throw e;
|
|
17237
17299
|
}
|
|
17238
17300
|
}
|
|
17301
|
+
/**
|
|
17302
|
+
* Records platform-broker error telemetry on the root event for the current
|
|
17303
|
+
* correlationId. `isNativeBroker` is set optimistically to true because the
|
|
17304
|
+
* broker was engaged; when the caller subsequently falls back to a web flow
|
|
17305
|
+
* that succeeds, the root success measurement overrides it to false via
|
|
17306
|
+
* `result.fromPlatformBroker`. Terminal broker errors (no fallback) retain
|
|
17307
|
+
* true. `brokerErrorName`/`brokerErrorCode` are recorded when the error is an `AuthError`.
|
|
17308
|
+
* @param error error thrown by the broker interaction
|
|
17309
|
+
*/
|
|
17310
|
+
setBrokerErrorTelemetry(error) {
|
|
17311
|
+
if (error instanceof AuthError) {
|
|
17312
|
+
this.performanceClient.addFields({
|
|
17313
|
+
isNativeBroker: true,
|
|
17314
|
+
brokerErrorName: error.name,
|
|
17315
|
+
brokerErrorCode: error.errorCode,
|
|
17316
|
+
}, this.correlationId);
|
|
17317
|
+
}
|
|
17318
|
+
}
|
|
17239
17319
|
/**
|
|
17240
17320
|
* Creates silent flow request
|
|
17241
17321
|
* @param request
|
|
@@ -17307,11 +17387,21 @@
|
|
|
17307
17387
|
const serverTelemetryManager = initializeServerTelemetryManager(this.apiId, this.config.auth.clientId, this.correlationId, this.browserStorage, this.logger, undefined, this.config.system.serverTelemetryEnabled);
|
|
17308
17388
|
serverTelemetryManager.setNativeBrokerErrorCode(e.errorCode);
|
|
17309
17389
|
if (isFatalNativeAuthError(e)) {
|
|
17390
|
+
/*
|
|
17391
|
+
* Fatal error on redirect initiate always falls back to a
|
|
17392
|
+
* regular web redirect, so this request did not complete
|
|
17393
|
+
* natively. Token telemetry for the eventual outcome lands
|
|
17394
|
+
* in handleRedirectPromise (phase 2).
|
|
17395
|
+
*/
|
|
17396
|
+
this.setBrokerErrorTelemetry(e);
|
|
17310
17397
|
throw e;
|
|
17311
17398
|
}
|
|
17312
17399
|
}
|
|
17313
17400
|
}
|
|
17314
|
-
this.browserStorage.setTemporaryCache(TemporaryCacheKeys.NATIVE_REQUEST, JSON.stringify(
|
|
17401
|
+
this.browserStorage.setTemporaryCache(TemporaryCacheKeys.NATIVE_REQUEST, JSON.stringify({
|
|
17402
|
+
...nativeRequest,
|
|
17403
|
+
storeInCache: request.storeInCache,
|
|
17404
|
+
}), true);
|
|
17315
17405
|
const navigationOptions = {
|
|
17316
17406
|
apiId: ApiId.acquireTokenRedirect,
|
|
17317
17407
|
timeout: this.config.system.redirectNavigationTimeout,
|
|
@@ -17341,7 +17431,11 @@
|
|
|
17341
17431
|
this.performanceClient?.addFields({ errorCode: "no_cached_request" }, this.correlationId);
|
|
17342
17432
|
return null;
|
|
17343
17433
|
}
|
|
17344
|
-
|
|
17434
|
+
/*
|
|
17435
|
+
* storeInCache is a client-side cache directive persisted alongside the cached
|
|
17436
|
+
* request (not a broker-contract parameter), so extract it here before resending.
|
|
17437
|
+
*/
|
|
17438
|
+
const { prompt, storeInCache, ...request } = cachedRequest;
|
|
17345
17439
|
if (prompt) {
|
|
17346
17440
|
this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window.", this.correlationId);
|
|
17347
17441
|
}
|
|
@@ -17350,13 +17444,13 @@
|
|
|
17350
17444
|
try {
|
|
17351
17445
|
this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.", this.correlationId);
|
|
17352
17446
|
const response = await this.platformAuthProvider.sendMessage(request);
|
|
17353
|
-
const authResult = await this.handleNativeResponse(response, request, reqTimestamp);
|
|
17447
|
+
const authResult = await this.handleNativeResponse(response, request, reqTimestamp, storeInCache);
|
|
17354
17448
|
const serverTelemetryManager = initializeServerTelemetryManager(this.apiId, this.config.auth.clientId, this.correlationId, this.browserStorage, this.logger, undefined, this.config.system.serverTelemetryEnabled);
|
|
17355
17449
|
serverTelemetryManager.clearNativeBrokerErrorCode();
|
|
17356
|
-
this.performanceClient?.addFields({ isNativeBroker: true }, this.correlationId);
|
|
17357
17450
|
return authResult;
|
|
17358
17451
|
}
|
|
17359
17452
|
catch (e) {
|
|
17453
|
+
this.setBrokerErrorTelemetry(e);
|
|
17360
17454
|
throw e;
|
|
17361
17455
|
}
|
|
17362
17456
|
}
|
|
@@ -17374,7 +17468,7 @@
|
|
|
17374
17468
|
* @param request
|
|
17375
17469
|
* @param reqTimestamp
|
|
17376
17470
|
*/
|
|
17377
|
-
async handleNativeResponse(response, request, reqTimestamp) {
|
|
17471
|
+
async handleNativeResponse(response, request, reqTimestamp, storeInCache) {
|
|
17378
17472
|
this.logger.trace("NativeInteractionClient - handleNativeResponse called.", this.correlationId);
|
|
17379
17473
|
// generate identifiers
|
|
17380
17474
|
const idTokenClaims = extractTokenClaims(response.id_token, base64Decode, this.correlationId);
|
|
@@ -17403,8 +17497,8 @@
|
|
|
17403
17497
|
const result = await this.generateAuthenticationResult(response, request, idTokenClaims, baseAccount, authority.canonicalAuthority, reqTimestamp);
|
|
17404
17498
|
// cache accounts and tokens in the appropriate storage
|
|
17405
17499
|
await this.cacheAccount(baseAccount, isKmsi(idTokenClaims));
|
|
17406
|
-
await this.cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, result.tenantId, reqTimestamp, authority.getPreferredCache() // environment
|
|
17407
|
-
);
|
|
17500
|
+
await this.cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, result.tenantId, reqTimestamp, authority.getPreferredCache(), // environment
|
|
17501
|
+
storeInCache);
|
|
17408
17502
|
return result;
|
|
17409
17503
|
}
|
|
17410
17504
|
/**
|
|
@@ -17525,7 +17619,9 @@
|
|
|
17525
17619
|
correlationId: this.correlationId,
|
|
17526
17620
|
state: response.state,
|
|
17527
17621
|
fromPlatformBroker: true,
|
|
17528
|
-
...(request.resource && {
|
|
17622
|
+
...(request.extraParameters?.resource && {
|
|
17623
|
+
resource: request.extraParameters.resource,
|
|
17624
|
+
}),
|
|
17529
17625
|
};
|
|
17530
17626
|
return result;
|
|
17531
17627
|
}
|
|
@@ -17549,7 +17645,7 @@
|
|
|
17549
17645
|
* @param tenantId
|
|
17550
17646
|
* @param reqTimestamp
|
|
17551
17647
|
*/
|
|
17552
|
-
async cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, tenantId, reqTimestamp, environment) {
|
|
17648
|
+
async cacheNativeTokens(response, request, homeAccountIdentifier, idTokenClaims, tenantId, reqTimestamp, environment, storeInCache) {
|
|
17553
17649
|
const cachedIdToken = createIdTokenEntity(homeAccountIdentifier, environment, response.id_token || "", request.clientId, idTokenClaims.tid || "");
|
|
17554
17650
|
// cache accessToken in inmemory storage
|
|
17555
17651
|
const expiresIn = request.tokenType === AuthenticationScheme.POP
|
|
@@ -17561,14 +17657,14 @@
|
|
|
17561
17657
|
const responseScopes = this.generateScopes(response.scope, request.scope);
|
|
17562
17658
|
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);
|
|
17563
17659
|
// save idtoken credential in configured browser storage
|
|
17564
|
-
if (!!cachedIdToken &&
|
|
17660
|
+
if (!!cachedIdToken && storeInCache?.idToken !== false) {
|
|
17565
17661
|
await this.browserStorage.setIdTokenCredential(cachedIdToken, this.correlationId, isKmsi(idTokenClaims));
|
|
17566
17662
|
}
|
|
17567
17663
|
// save access token credential in memory storage
|
|
17568
17664
|
const nativeCacheRecord = {
|
|
17569
17665
|
accessToken: cachedAccessToken,
|
|
17570
17666
|
};
|
|
17571
|
-
return this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, this.correlationId, isKmsi(idTokenClaims), this.apiId,
|
|
17667
|
+
return this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, this.correlationId, isKmsi(idTokenClaims), this.apiId, storeInCache);
|
|
17572
17668
|
}
|
|
17573
17669
|
getExpiresInValue(tokenType, expiresIn) {
|
|
17574
17670
|
return tokenType === AuthenticationScheme.POP
|
|
@@ -17640,13 +17736,12 @@
|
|
|
17640
17736
|
const configClaims = request.skipBrokerClaims && !!request.embeddedClientId
|
|
17641
17737
|
? undefined
|
|
17642
17738
|
: this.config.auth.clientCapabilities;
|
|
17643
|
-
// scopes are expected to be received by the native broker as "scope" and will be added to the request below.
|
|
17644
|
-
const { scopes, claims
|
|
17739
|
+
// 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.
|
|
17740
|
+
const { scopes, claims } = request;
|
|
17645
17741
|
const scopeSet = new ScopeSet(scopes || [], this.correlationId);
|
|
17646
17742
|
scopeSet.appendScopes(OIDC_DEFAULT_SCOPES);
|
|
17647
17743
|
const mergedClaims = buildMergedClaims(claims, configClaims?.length ? configClaims : undefined);
|
|
17648
17744
|
const validatedRequest = {
|
|
17649
|
-
...remainingProperties,
|
|
17650
17745
|
claims: mergedClaims,
|
|
17651
17746
|
accountId: this.accountId,
|
|
17652
17747
|
clientId: this.config.auth.clientId,
|
|
@@ -17655,19 +17750,28 @@
|
|
|
17655
17750
|
redirectUri: getRedirectUri(request.redirectUri, this.config.auth.redirectUri, this.logger, this.correlationId),
|
|
17656
17751
|
prompt: this.getPrompt(request.prompt),
|
|
17657
17752
|
correlationId: this.correlationId,
|
|
17753
|
+
isSts: false,
|
|
17658
17754
|
tokenType: request.authenticationScheme,
|
|
17659
17755
|
windowTitleSubstring: document.title,
|
|
17756
|
+
nonce: request.nonce,
|
|
17757
|
+
state: request.state,
|
|
17758
|
+
loginHint: request.loginHint,
|
|
17660
17759
|
extraParameters: {
|
|
17661
17760
|
...request.extraParameters,
|
|
17761
|
+
...(request.resource && { resource: request.resource }), // resource is set for MCP scenarios
|
|
17662
17762
|
},
|
|
17663
17763
|
extendedExpiryToken: false,
|
|
17664
17764
|
keyId: request.popKid,
|
|
17765
|
+
resourceRequestMethod: request.resourceRequestMethod,
|
|
17766
|
+
resourceRequestUri: request.resourceRequestUri,
|
|
17767
|
+
shrClaims: request.shrClaims,
|
|
17768
|
+
shrNonce: request.shrNonce,
|
|
17665
17769
|
};
|
|
17666
17770
|
// Check for PoP token requests: signPopToken should only be set to true if popKid is not set
|
|
17667
17771
|
if (validatedRequest.signPopToken && !!request.popKid) {
|
|
17668
17772
|
throw createBrowserAuthError(invalidPopTokenRequest, this.correlationId);
|
|
17669
17773
|
}
|
|
17670
|
-
this.handleExtraBrokerParams(validatedRequest);
|
|
17774
|
+
this.handleExtraBrokerParams(validatedRequest, request.embeddedClientId);
|
|
17671
17775
|
validatedRequest.extraParameters =
|
|
17672
17776
|
validatedRequest.extraParameters || {};
|
|
17673
17777
|
validatedRequest.extraParameters.telemetry =
|
|
@@ -17742,19 +17846,19 @@
|
|
|
17742
17846
|
* @param request {PlatformAuthRequest}
|
|
17743
17847
|
* @private
|
|
17744
17848
|
*/
|
|
17745
|
-
handleExtraBrokerParams(request) {
|
|
17849
|
+
handleExtraBrokerParams(request, embeddedClientId) {
|
|
17746
17850
|
const hasExtraBrokerParams = request.extraParameters &&
|
|
17747
17851
|
request.extraParameters.hasOwnProperty(BROKER_CLIENT_ID) &&
|
|
17748
17852
|
request.extraParameters.hasOwnProperty(BROKER_REDIRECT_URI) &&
|
|
17749
17853
|
request.extraParameters.hasOwnProperty(CLIENT_ID);
|
|
17750
|
-
if (!
|
|
17854
|
+
if (!embeddedClientId && !hasExtraBrokerParams) {
|
|
17751
17855
|
return;
|
|
17752
17856
|
}
|
|
17753
17857
|
let child_client_id = "";
|
|
17754
17858
|
const child_redirect_uri = request.redirectUri;
|
|
17755
|
-
if (
|
|
17859
|
+
if (embeddedClientId) {
|
|
17756
17860
|
request.redirectUri = this.config.auth.redirectUri;
|
|
17757
|
-
child_client_id =
|
|
17861
|
+
child_client_id = embeddedClientId;
|
|
17758
17862
|
}
|
|
17759
17863
|
else if (request.extraParameters) {
|
|
17760
17864
|
request.redirectUri =
|
|
@@ -17762,7 +17866,15 @@
|
|
|
17762
17866
|
child_client_id =
|
|
17763
17867
|
request.extraParameters[CLIENT_ID];
|
|
17764
17868
|
}
|
|
17869
|
+
const {
|
|
17870
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17871
|
+
[BROKER_CLIENT_ID]: _brkClientId,
|
|
17872
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17873
|
+
[BROKER_REDIRECT_URI]: _brkRedirectUri,
|
|
17874
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17875
|
+
[CLIENT_ID]: _clientId, ...remainingExtraParameters } = request.extraParameters || {};
|
|
17765
17876
|
request.extraParameters = {
|
|
17877
|
+
...remainingExtraParameters,
|
|
17766
17878
|
child_client_id,
|
|
17767
17879
|
child_redirect_uri,
|
|
17768
17880
|
};
|
|
@@ -18187,6 +18299,8 @@
|
|
|
18187
18299
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
18188
18300
|
* Licensed under the MIT License.
|
|
18189
18301
|
*/
|
|
18302
|
+
const MAX_FETCH_POST_RETRIES = 1;
|
|
18303
|
+
const RETRY_DELAY_MS = 100;
|
|
18190
18304
|
/**
|
|
18191
18305
|
* 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
|
|
18192
18306
|
*/
|
|
@@ -18235,21 +18349,40 @@
|
|
|
18235
18349
|
async sendPostRequestAsync(url, options) {
|
|
18236
18350
|
const reqBody = (options && options.body) || "";
|
|
18237
18351
|
const reqHeaders = getFetchHeaders(options);
|
|
18352
|
+
const correlationId = options?.correlationId;
|
|
18353
|
+
const performanceClient = options?.performanceClient;
|
|
18238
18354
|
let response;
|
|
18239
|
-
let
|
|
18240
|
-
let
|
|
18241
|
-
|
|
18242
|
-
|
|
18243
|
-
|
|
18244
|
-
|
|
18245
|
-
|
|
18246
|
-
|
|
18355
|
+
let lastError;
|
|
18356
|
+
for (let attempt = 1; attempt <= MAX_FETCH_POST_RETRIES + 1; attempt++) {
|
|
18357
|
+
try {
|
|
18358
|
+
response = await fetch(url, {
|
|
18359
|
+
method: HTTP_REQUEST_TYPE.POST,
|
|
18360
|
+
headers: reqHeaders,
|
|
18361
|
+
body: reqBody,
|
|
18362
|
+
});
|
|
18363
|
+
break;
|
|
18364
|
+
}
|
|
18365
|
+
catch (e) {
|
|
18366
|
+
lastError = e;
|
|
18367
|
+
if (!shouldRetryPostFetchError(lastError, attempt)) {
|
|
18368
|
+
throw createNetworkError(createBrowserAuthError(window.navigator.onLine !== false
|
|
18369
|
+
? postRequestFailed
|
|
18370
|
+
: noNetworkConnectivity, correlationId || ""), undefined, undefined, lastError);
|
|
18371
|
+
}
|
|
18372
|
+
// Brief backoff before retry
|
|
18373
|
+
await new Promise((resolve) => setTimeout(resolve, RETRY_DELAY_MS));
|
|
18374
|
+
if (correlationId) {
|
|
18375
|
+
performanceClient?.incrementFields({ fetchRetryCount: 1 }, correlationId);
|
|
18376
|
+
}
|
|
18377
|
+
}
|
|
18247
18378
|
}
|
|
18248
|
-
|
|
18249
|
-
throw createNetworkError(createBrowserAuthError(window.navigator.onLine
|
|
18379
|
+
if (!response) {
|
|
18380
|
+
throw createNetworkError(createBrowserAuthError(window.navigator.onLine !== false
|
|
18250
18381
|
? postRequestFailed
|
|
18251
|
-
: noNetworkConnectivity, ""), undefined, undefined,
|
|
18382
|
+
: noNetworkConnectivity, correlationId || ""), undefined, undefined, lastError);
|
|
18252
18383
|
}
|
|
18384
|
+
let responseStatus = 0;
|
|
18385
|
+
let responseHeaders = {};
|
|
18253
18386
|
responseHeaders = getHeaderDict(response.headers);
|
|
18254
18387
|
try {
|
|
18255
18388
|
responseStatus = response.status;
|
|
@@ -18260,10 +18393,15 @@
|
|
|
18260
18393
|
};
|
|
18261
18394
|
}
|
|
18262
18395
|
catch (e) {
|
|
18263
|
-
throw createNetworkError(createBrowserAuthError(failedToParseResponse, ""), responseStatus, responseHeaders, e);
|
|
18396
|
+
throw createNetworkError(createBrowserAuthError(failedToParseResponse, correlationId || ""), responseStatus, responseHeaders, e);
|
|
18264
18397
|
}
|
|
18265
18398
|
}
|
|
18266
18399
|
}
|
|
18400
|
+
function shouldRetryPostFetchError(error, attempt) {
|
|
18401
|
+
return (attempt <= MAX_FETCH_POST_RETRIES &&
|
|
18402
|
+
window.navigator.onLine !== false &&
|
|
18403
|
+
error.name !== "AbortError");
|
|
18404
|
+
}
|
|
18267
18405
|
/**
|
|
18268
18406
|
* Get Fetch API Headers object from string map
|
|
18269
18407
|
* @param inputHeaders
|
|
@@ -18749,7 +18887,7 @@
|
|
|
18749
18887
|
}
|
|
18750
18888
|
initializePlatformDOMRequest(request) {
|
|
18751
18889
|
this.logger.trace(`'${this.platformAuthType}' - initializeNativeDOMRequest called`, request.correlationId);
|
|
18752
|
-
const { accountId, clientId, authority, scope, redirectUri, correlationId, state,
|
|
18890
|
+
const { accountId, clientId, authority, scope, redirectUri, correlationId, state, extraParameters, ...remainingProperties } = request;
|
|
18753
18891
|
const validExtraParameters = this.getDOMExtraParams(remainingProperties, correlationId);
|
|
18754
18892
|
const platformDOMRequest = {
|
|
18755
18893
|
accountId: accountId,
|
|
@@ -18765,8 +18903,6 @@
|
|
|
18765
18903
|
redirectUri: redirectUri,
|
|
18766
18904
|
scope: scope,
|
|
18767
18905
|
state: state,
|
|
18768
|
-
storeInCache: storeInCache,
|
|
18769
|
-
embeddedClientId: embeddedClientId,
|
|
18770
18906
|
};
|
|
18771
18907
|
return platformDOMRequest;
|
|
18772
18908
|
}
|
|
@@ -20521,6 +20657,7 @@
|
|
|
20521
20657
|
this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_START, correlationId, InteractionType.Redirect);
|
|
20522
20658
|
rootMeasurement = this.performanceClient.startMeasurement(AcquireTokenRedirect, correlationId);
|
|
20523
20659
|
this.logger.trace("handleRedirectPromise - acquiring token from native platform", correlationId);
|
|
20660
|
+
// Cached nativeAccountId routes directly to the broker (no /authorize call)
|
|
20524
20661
|
rootMeasurement.add({
|
|
20525
20662
|
isPlatformBrokerRequest: true,
|
|
20526
20663
|
});
|
|
@@ -20557,6 +20694,7 @@
|
|
|
20557
20694
|
}
|
|
20558
20695
|
rootMeasurement.end({
|
|
20559
20696
|
success: true,
|
|
20697
|
+
isNativeBroker: result.fromPlatformBroker ?? false,
|
|
20560
20698
|
}, undefined, result.account);
|
|
20561
20699
|
// Fire-and-forget SSO capability verification in background
|
|
20562
20700
|
this.verifySsoCapability(cachedRedirectRequest, InteractionType.Redirect);
|
|
@@ -20566,8 +20704,8 @@
|
|
|
20566
20704
|
* Instrument an event only if an error code is set. Otherwise, discard it when the redirect response
|
|
20567
20705
|
* is empty and the error code is missing.
|
|
20568
20706
|
*/
|
|
20569
|
-
if (rootMeasurement.event.errorCode) {
|
|
20570
|
-
rootMeasurement.end({ success: false }
|
|
20707
|
+
if (!!rootMeasurement.event.errorCode) {
|
|
20708
|
+
rootMeasurement.end({ success: false });
|
|
20571
20709
|
}
|
|
20572
20710
|
else {
|
|
20573
20711
|
rootMeasurement.discard();
|
|
@@ -20626,10 +20764,6 @@
|
|
|
20626
20764
|
this.canUsePlatformBroker(request)) {
|
|
20627
20765
|
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);
|
|
20628
20766
|
result = invokeAsync(nativeClient.acquireTokenRedirect.bind(nativeClient), NativeInteractionClientAcquireTokenRedirect, this.logger, this.performanceClient, correlationId)(request, atrMeasurement).catch((e) => {
|
|
20629
|
-
atrMeasurement.add({
|
|
20630
|
-
brokerErrorName: e.name,
|
|
20631
|
-
brokerErrorCode: e.errorCode,
|
|
20632
|
-
});
|
|
20633
20767
|
if (e instanceof NativeAuthError &&
|
|
20634
20768
|
isFatalNativeAuthError(e)) {
|
|
20635
20769
|
this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt platform broker calls
|
|
@@ -20698,6 +20832,7 @@
|
|
|
20698
20832
|
let result;
|
|
20699
20833
|
const pkce = this.getPreGeneratedPkceCodes(correlationId);
|
|
20700
20834
|
if (this.canUsePlatformBroker(request)) {
|
|
20835
|
+
// Cached nativeAccountId routes directly to the broker (no /authorize call)
|
|
20701
20836
|
atPopupMeasurement.add({
|
|
20702
20837
|
isPlatformBrokerRequest: true,
|
|
20703
20838
|
});
|
|
@@ -20708,15 +20843,11 @@
|
|
|
20708
20843
|
.then((response) => {
|
|
20709
20844
|
atPopupMeasurement.end({
|
|
20710
20845
|
success: true,
|
|
20711
|
-
isNativeBroker:
|
|
20846
|
+
isNativeBroker: response.fromPlatformBroker ?? false,
|
|
20712
20847
|
}, undefined, response.account);
|
|
20713
20848
|
return response;
|
|
20714
20849
|
})
|
|
20715
20850
|
.catch((e) => {
|
|
20716
|
-
atPopupMeasurement.add({
|
|
20717
|
-
brokerErrorName: e.name,
|
|
20718
|
-
brokerErrorCode: e.errorCode,
|
|
20719
|
-
});
|
|
20720
20851
|
if (e instanceof NativeAuthError &&
|
|
20721
20852
|
isFatalNativeAuthError(e)) {
|
|
20722
20853
|
this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt platform broker calls
|
|
@@ -20747,6 +20878,7 @@
|
|
|
20747
20878
|
}
|
|
20748
20879
|
atPopupMeasurement.end({
|
|
20749
20880
|
success: true,
|
|
20881
|
+
isNativeBroker: result.fromPlatformBroker ?? false,
|
|
20750
20882
|
accessTokenSize: result.accessToken.length,
|
|
20751
20883
|
idTokenSize: result.idToken.length,
|
|
20752
20884
|
}, undefined, result.account);
|
|
@@ -20940,14 +21072,11 @@
|
|
|
20940
21072
|
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, correlationId, InteractionType.Silent, validRequest);
|
|
20941
21073
|
let result;
|
|
20942
21074
|
if (this.canUsePlatformBroker(validRequest)) {
|
|
21075
|
+
// Cached nativeAccountId routes directly to the broker (no /authorize call)
|
|
20943
21076
|
this.ssoSilentMeasurement?.add({
|
|
20944
21077
|
isPlatformBrokerRequest: true,
|
|
20945
21078
|
});
|
|
20946
21079
|
result = this.acquireTokenNative(validRequest, ApiId.ssoSilent).catch((e) => {
|
|
20947
|
-
this.ssoSilentMeasurement?.add({
|
|
20948
|
-
brokerErrorName: e.name,
|
|
20949
|
-
brokerErrorCode: e.errorCode,
|
|
20950
|
-
});
|
|
20951
21080
|
// If native token acquisition fails for availability reasons fallback to standard flow
|
|
20952
21081
|
if (e instanceof NativeAuthError && isFatalNativeAuthError(e)) {
|
|
20953
21082
|
this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt platform broker calls
|
|
@@ -20970,7 +21099,7 @@
|
|
|
20970
21099
|
}
|
|
20971
21100
|
this.ssoSilentMeasurement?.end({
|
|
20972
21101
|
success: true,
|
|
20973
|
-
isNativeBroker: response.fromPlatformBroker,
|
|
21102
|
+
isNativeBroker: response.fromPlatformBroker ?? false,
|
|
20974
21103
|
accessTokenSize: response.accessToken.length,
|
|
20975
21104
|
idTokenSize: response.idToken.length,
|
|
20976
21105
|
}, undefined, response.account);
|
|
@@ -21023,6 +21152,7 @@
|
|
|
21023
21152
|
this.hybridAuthCodeResponses.delete(hybridAuthCode);
|
|
21024
21153
|
atbcMeasurement.end({
|
|
21025
21154
|
success: true,
|
|
21155
|
+
isNativeBroker: false,
|
|
21026
21156
|
accessTokenSize: result.accessToken.length,
|
|
21027
21157
|
idTokenSize: result.idToken.length,
|
|
21028
21158
|
}, undefined, result.account);
|
|
@@ -21053,10 +21183,6 @@
|
|
|
21053
21183
|
...request,
|
|
21054
21184
|
correlationId,
|
|
21055
21185
|
}, ApiId.acquireTokenByCode, request.nativeAccountId).catch((e) => {
|
|
21056
|
-
atbcMeasurement.add({
|
|
21057
|
-
brokerErrorName: e.name,
|
|
21058
|
-
brokerErrorCode: e.errorCode,
|
|
21059
|
-
});
|
|
21060
21186
|
// If native token acquisition fails for availability reasons fallback to standard flow
|
|
21061
21187
|
if (e instanceof NativeAuthError &&
|
|
21062
21188
|
isFatalNativeAuthError(e)) {
|
|
@@ -21066,6 +21192,7 @@
|
|
|
21066
21192
|
});
|
|
21067
21193
|
atbcMeasurement.end({
|
|
21068
21194
|
success: true,
|
|
21195
|
+
isNativeBroker: result.fromPlatformBroker ?? false,
|
|
21069
21196
|
}, undefined, result.account);
|
|
21070
21197
|
return result;
|
|
21071
21198
|
}
|
|
@@ -21106,6 +21233,7 @@
|
|
|
21106
21233
|
.then((response) => {
|
|
21107
21234
|
this.acquireTokenByCodeAsyncMeasurement?.end({
|
|
21108
21235
|
success: true,
|
|
21236
|
+
isNativeBroker: false,
|
|
21109
21237
|
fromCache: response.fromCache,
|
|
21110
21238
|
});
|
|
21111
21239
|
return response;
|
|
@@ -21283,8 +21411,16 @@
|
|
|
21283
21411
|
/**
|
|
21284
21412
|
* Acquire a token from native device (e.g. WAM)
|
|
21285
21413
|
* @param request
|
|
21414
|
+
* @param apiId
|
|
21415
|
+
* @param accountId
|
|
21416
|
+
* @param cacheLookupPolicy
|
|
21286
21417
|
*/
|
|
21287
21418
|
async acquireTokenNative(request, apiId, accountId, cacheLookupPolicy) {
|
|
21419
|
+
/*
|
|
21420
|
+
* Callers always normalize correlationId onto the request before delegating
|
|
21421
|
+
* here, so it is guaranteed defined and is the single id used to key this
|
|
21422
|
+
* flow's telemetry.
|
|
21423
|
+
*/
|
|
21288
21424
|
const correlationId = this.getRequestCorrelationId(request);
|
|
21289
21425
|
this.logger.trace("acquireTokenNative called", correlationId);
|
|
21290
21426
|
if (!this.platformAuthProvider) {
|
|
@@ -21538,6 +21674,7 @@
|
|
|
21538
21674
|
.then((result) => {
|
|
21539
21675
|
atsMeasurement.end({
|
|
21540
21676
|
success: true,
|
|
21677
|
+
isNativeBroker: result.fromPlatformBroker ?? false,
|
|
21541
21678
|
fromCache: result.fromCache,
|
|
21542
21679
|
accessTokenSize: result.accessToken.length,
|
|
21543
21680
|
idTokenSize: result.idToken.length,
|
|
@@ -21674,7 +21811,7 @@
|
|
|
21674
21811
|
if (request.correlationId) {
|
|
21675
21812
|
this.performanceClient.addFields({
|
|
21676
21813
|
fromCache: response.fromCache,
|
|
21677
|
-
isNativeBroker: response.fromPlatformBroker,
|
|
21814
|
+
isNativeBroker: response.fromPlatformBroker ?? false,
|
|
21678
21815
|
}, request.correlationId);
|
|
21679
21816
|
}
|
|
21680
21817
|
return response;
|
|
@@ -21700,10 +21837,6 @@
|
|
|
21700
21837
|
this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform", silentRequest.correlationId);
|
|
21701
21838
|
this.performanceClient.addFields({ isPlatformBrokerRequest: true }, silentRequest.correlationId);
|
|
21702
21839
|
return this.acquireTokenNative(silentRequest, ApiId.acquireTokenSilent_silentFlow, silentRequest.account.nativeAccountId, cacheLookupPolicy).catch(async (e) => {
|
|
21703
|
-
this.performanceClient.addFields({
|
|
21704
|
-
brokerErrorName: e.name,
|
|
21705
|
-
brokerErrorCode: e.errorCode,
|
|
21706
|
-
}, silentRequest.correlationId);
|
|
21707
21840
|
// If native token acquisition fails for availability reasons fallback to web flow
|
|
21708
21841
|
if (e instanceof NativeAuthError && isFatalNativeAuthError(e)) {
|
|
21709
21842
|
this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow", silentRequest.correlationId);
|