@azure/msal-browser 5.0.2 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +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.d.ts +2 -2
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.mjs +15 -10
- package/dist/cache/BrowserCacheManager.mjs.map +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.d.ts.map +1 -1
- package/dist/cache/TokenCache.mjs +24 -18
- package/dist/cache/TokenCache.mjs.map +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +12 -12
- package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
- package/dist/controllers/StandardController.d.ts.map +1 -1
- package/dist/controllers/StandardController.mjs +36 -36
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/custom-auth-path/app/PublicClientApplication.mjs +1 -1
- package/dist/custom-auth-path/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/custom-auth-path/broker/nativeBroker/PlatformAuthDOMHandler.mjs +1 -1
- package/dist/custom-auth-path/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
- package/dist/custom-auth-path/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
- package/dist/custom-auth-path/cache/AccountManager.mjs +1 -1
- package/dist/custom-auth-path/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/custom-auth-path/cache/BrowserCacheManager.d.ts +2 -2
- package/dist/custom-auth-path/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/custom-auth-path/cache/BrowserCacheManager.mjs +15 -10
- package/dist/custom-auth-path/cache/BrowserCacheManager.mjs.map +1 -1
- package/dist/custom-auth-path/cache/CacheHelpers.mjs +1 -1
- package/dist/custom-auth-path/cache/CacheKeys.mjs +1 -1
- package/dist/custom-auth-path/cache/CookieStorage.mjs +1 -1
- package/dist/custom-auth-path/cache/DatabaseStorage.mjs +1 -1
- package/dist/custom-auth-path/cache/EncryptedData.mjs +1 -1
- package/dist/custom-auth-path/cache/LocalStorage.mjs +1 -1
- package/dist/custom-auth-path/cache/MemoryStorage.mjs +1 -1
- package/dist/custom-auth-path/cache/SessionStorage.mjs +1 -1
- package/dist/custom-auth-path/cache/TokenCache.d.ts.map +1 -1
- package/dist/custom-auth-path/config/Configuration.mjs +1 -1
- package/dist/custom-auth-path/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/dist/custom-auth-path/controllers/StandardController.d.ts.map +1 -1
- package/dist/custom-auth-path/controllers/StandardController.mjs +36 -36
- package/dist/custom-auth-path/controllers/StandardController.mjs.map +1 -1
- package/dist/custom-auth-path/crypto/BrowserCrypto.mjs +1 -1
- package/dist/custom-auth-path/crypto/CryptoOps.mjs +1 -1
- package/dist/custom-auth-path/crypto/PkceGenerator.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/dist/custom-auth-path/custom_auth/CustomAuthConstants.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/CustomAuthPublicClientApplication.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/controller/CustomAuthStandardController.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/CustomAuthAuthority.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/CustomAuthError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/HttpError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/ParsedUrlError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/UnexpectedError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts +1 -1
- package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts.map +1 -1
- package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +3 -3
- package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs.map +1 -1
- package/dist/custom-auth-path/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/interaction_client/jit/JitClient.d.ts.map +1 -1
- package/dist/custom-auth-path/custom_auth/core/interaction_client/jit/JitClient.mjs +3 -3
- package/dist/custom-auth-path/custom_auth/core/interaction_client/jit/JitClient.mjs.map +1 -1
- package/dist/custom-auth-path/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/interaction_client/mfa/MfaClient.d.ts.map +1 -1
- package/dist/custom-auth-path/custom_auth/core/interaction_client/mfa/MfaClient.mjs +3 -3
- package/dist/custom-auth-path/custom_auth/core/interaction_client/mfa/MfaClient.mjs.map +1 -1
- package/dist/custom-auth-path/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/core/utils/UrlUtils.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.d.ts.map +1 -1
- package/dist/custom-auth-path/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +2 -2
- package/dist/custom-auth-path/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs.map +1 -1
- package/dist/custom-auth-path/custom_auth/index.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/SignInClient.d.ts.map +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/SignInClient.mjs +7 -7
- package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/SignInClient.mjs.map +1 -1
- package/dist/custom-auth-path/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
- package/dist/custom-auth-path/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
- package/dist/custom-auth-path/encode/Base64Decode.mjs +1 -1
- package/dist/custom-auth-path/encode/Base64Encode.mjs +1 -1
- package/dist/custom-auth-path/error/BrowserAuthError.mjs +1 -1
- package/dist/custom-auth-path/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/error/BrowserConfigurationAuthError.mjs +1 -1
- package/dist/custom-auth-path/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/error/NativeAuthError.mjs +1 -1
- package/dist/custom-auth-path/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/event/EventHandler.d.ts +1 -1
- package/dist/custom-auth-path/event/EventHandler.d.ts.map +1 -1
- package/dist/custom-auth-path/event/EventHandler.mjs +3 -2
- package/dist/custom-auth-path/event/EventHandler.mjs.map +1 -1
- package/dist/custom-auth-path/event/EventMessage.d.ts +1 -0
- package/dist/custom-auth-path/event/EventMessage.d.ts.map +1 -1
- package/dist/custom-auth-path/event/EventType.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/dist/custom-auth-path/interaction_client/PlatformAuthInteractionClient.mjs +3 -3
- package/dist/custom-auth-path/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
- package/dist/custom-auth-path/interaction_client/PopupClient.d.ts.map +1 -1
- package/dist/custom-auth-path/interaction_client/PopupClient.mjs +9 -9
- package/dist/custom-auth-path/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/custom-auth-path/interaction_client/RedirectClient.d.ts.map +1 -1
- package/dist/custom-auth-path/interaction_client/RedirectClient.mjs +8 -8
- package/dist/custom-auth-path/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/custom-auth-path/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
- package/dist/custom-auth-path/interaction_client/SilentAuthCodeClient.mjs +2 -2
- package/dist/custom-auth-path/interaction_client/SilentAuthCodeClient.mjs.map +1 -1
- package/dist/custom-auth-path/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/SilentIframeClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/SilentRefreshClient.d.ts.map +1 -1
- package/dist/custom-auth-path/interaction_client/SilentRefreshClient.mjs +2 -2
- package/dist/custom-auth-path/interaction_client/SilentRefreshClient.mjs.map +1 -1
- package/dist/custom-auth-path/interaction_client/StandardInteractionClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_handler/InteractionHandler.d.ts +3 -2
- package/dist/custom-auth-path/interaction_handler/InteractionHandler.d.ts.map +1 -1
- package/dist/custom-auth-path/interaction_handler/InteractionHandler.mjs +5 -5
- package/dist/custom-auth-path/interaction_handler/InteractionHandler.mjs.map +1 -1
- package/dist/custom-auth-path/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/custom-auth-path/log-strings-mapping.json +2 -2
- package/dist/custom-auth-path/naa/mapping/NestedAppAuthAdapter.d.ts.map +1 -1
- package/dist/custom-auth-path/navigation/NavigationClient.mjs +1 -1
- package/dist/custom-auth-path/network/FetchClient.mjs +1 -1
- package/dist/custom-auth-path/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/custom-auth-path/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/custom-auth-path/packageMetadata.d.ts +1 -1
- package/dist/custom-auth-path/packageMetadata.mjs +2 -2
- package/dist/custom-auth-path/protocol/Authorize.d.ts.map +1 -1
- package/dist/custom-auth-path/protocol/Authorize.mjs +7 -3
- package/dist/custom-auth-path/protocol/Authorize.mjs.map +1 -1
- package/dist/custom-auth-path/request/RequestHelpers.mjs +1 -1
- package/dist/custom-auth-path/response/ResponseHandler.mjs +1 -1
- package/dist/custom-auth-path/telemetry/BrowserPerformanceEvents.mjs +1 -1
- package/dist/custom-auth-path/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
- package/dist/custom-auth-path/utils/BrowserConstants.d.ts +20 -0
- package/dist/custom-auth-path/utils/BrowserConstants.d.ts.map +1 -1
- package/dist/custom-auth-path/utils/BrowserConstants.mjs +27 -2
- package/dist/custom-auth-path/utils/BrowserConstants.mjs.map +1 -1
- package/dist/custom-auth-path/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/custom-auth-path/utils/BrowserUtils.mjs +1 -1
- package/dist/custom-auth-path/utils/Helpers.mjs +1 -1
- package/dist/custom-auth-path/utils/MsalFrameStatsUtils.mjs +1 -1
- package/dist/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts +1 -1
- package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts.map +1 -1
- package/dist/custom_auth/core/interaction_client/jit/JitClient.d.ts.map +1 -1
- package/dist/custom_auth/core/interaction_client/mfa/MfaClient.d.ts.map +1 -1
- package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.d.ts.map +1 -1
- package/dist/custom_auth/sign_in/interaction_client/SignInClient.d.ts.map +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 +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.d.ts +1 -1
- package/dist/event/EventHandler.d.ts.map +1 -1
- package/dist/event/EventHandler.mjs +3 -2
- package/dist/event/EventHandler.mjs.map +1 -1
- package/dist/event/EventMessage.d.ts +1 -0
- package/dist/event/EventMessage.d.ts.map +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventMessage.mjs.map +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.d.ts.map +1 -1
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs +3 -3
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.d.ts.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +9 -9
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +8 -8
- package/dist/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +2 -2
- package/dist/interaction_client/SilentAuthCodeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +1 -1
- package/dist/interaction_client/SilentRefreshClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +2 -2
- package/dist/interaction_client/SilentRefreshClient.mjs.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
- package/dist/interaction_handler/InteractionHandler.d.ts +3 -2
- package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +5 -5
- package/dist/interaction_handler/InteractionHandler.mjs.map +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/log-strings-mapping.json +4 -4
- 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.d.ts.map +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +25 -8
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs.map +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/protocol/Authorize.d.ts.map +1 -1
- package/dist/protocol/Authorize.mjs +7 -3
- package/dist/protocol/Authorize.mjs.map +1 -1
- package/dist/redirect-bridge/cache/BrowserCacheManager.d.ts +2 -2
- package/dist/redirect-bridge/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/redirect-bridge/cache/CacheKeys.mjs +1 -1
- package/dist/redirect-bridge/cache/TokenCache.d.ts.map +1 -1
- package/dist/redirect-bridge/config/Configuration.mjs +1 -1
- package/dist/redirect-bridge/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/dist/redirect-bridge/controllers/StandardController.d.ts.map +1 -1
- package/dist/redirect-bridge/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/dist/redirect-bridge/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts +1 -1
- package/dist/redirect-bridge/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts.map +1 -1
- package/dist/redirect-bridge/custom_auth/core/interaction_client/jit/JitClient.d.ts.map +1 -1
- package/dist/redirect-bridge/custom_auth/core/interaction_client/mfa/MfaClient.d.ts.map +1 -1
- package/dist/redirect-bridge/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.d.ts.map +1 -1
- package/dist/redirect-bridge/custom_auth/sign_in/interaction_client/SignInClient.d.ts.map +1 -1
- package/dist/redirect-bridge/encode/Base64Decode.mjs +1 -1
- package/dist/redirect-bridge/error/BrowserAuthError.mjs +1 -1
- package/dist/redirect-bridge/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/redirect-bridge/event/EventHandler.d.ts +1 -1
- package/dist/redirect-bridge/event/EventHandler.d.ts.map +1 -1
- package/dist/redirect-bridge/event/EventMessage.d.ts +1 -0
- package/dist/redirect-bridge/event/EventMessage.d.ts.map +1 -1
- package/dist/redirect-bridge/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/dist/redirect-bridge/interaction_client/PopupClient.d.ts.map +1 -1
- package/dist/redirect-bridge/interaction_client/RedirectClient.d.ts.map +1 -1
- package/dist/redirect-bridge/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
- package/dist/redirect-bridge/interaction_client/SilentRefreshClient.d.ts.map +1 -1
- package/dist/redirect-bridge/interaction_handler/InteractionHandler.d.ts +3 -2
- package/dist/redirect-bridge/interaction_handler/InteractionHandler.d.ts.map +1 -1
- package/dist/redirect-bridge/naa/mapping/NestedAppAuthAdapter.d.ts.map +1 -1
- package/dist/redirect-bridge/navigation/NavigationClient.mjs +1 -1
- package/dist/redirect-bridge/packageMetadata.d.ts +1 -1
- package/dist/redirect-bridge/protocol/Authorize.d.ts.map +1 -1
- package/dist/redirect-bridge/redirect_bridge/index.mjs +1 -1
- package/dist/redirect-bridge/utils/BrowserConstants.d.ts +20 -0
- package/dist/redirect-bridge/utils/BrowserConstants.d.ts.map +1 -1
- package/dist/redirect-bridge/utils/BrowserConstants.mjs +2 -1
- package/dist/redirect-bridge/utils/BrowserConstants.mjs.map +1 -1
- package/dist/redirect-bridge/utils/BrowserUtils.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.d.ts +20 -0
- package/dist/utils/BrowserConstants.d.ts.map +1 -1
- package/dist/utils/BrowserConstants.mjs +27 -2
- package/dist/utils/BrowserConstants.mjs.map +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 +234 -164
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/types/cache/BrowserCacheManager.d.ts +2 -2
- package/lib/custom-auth-path/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/lib/custom-auth-path/types/cache/TokenCache.d.ts.map +1 -1
- package/lib/custom-auth-path/types/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/lib/custom-auth-path/types/controllers/StandardController.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/lib/custom-auth-path/types/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts +1 -1
- package/lib/custom-auth-path/types/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/core/interaction_client/jit/JitClient.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/core/interaction_client/mfa/MfaClient.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.d.ts.map +1 -1
- package/lib/custom-auth-path/types/custom_auth/sign_in/interaction_client/SignInClient.d.ts.map +1 -1
- package/lib/custom-auth-path/types/event/EventHandler.d.ts +1 -1
- package/lib/custom-auth-path/types/event/EventHandler.d.ts.map +1 -1
- package/lib/custom-auth-path/types/event/EventMessage.d.ts +1 -0
- package/lib/custom-auth-path/types/event/EventMessage.d.ts.map +1 -1
- package/lib/custom-auth-path/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/lib/custom-auth-path/types/interaction_client/PopupClient.d.ts.map +1 -1
- package/lib/custom-auth-path/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/lib/custom-auth-path/types/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
- package/lib/custom-auth-path/types/interaction_client/SilentRefreshClient.d.ts.map +1 -1
- package/lib/custom-auth-path/types/interaction_handler/InteractionHandler.d.ts +3 -2
- package/lib/custom-auth-path/types/interaction_handler/InteractionHandler.d.ts.map +1 -1
- package/lib/custom-auth-path/types/naa/mapping/NestedAppAuthAdapter.d.ts.map +1 -1
- package/lib/custom-auth-path/types/packageMetadata.d.ts +1 -1
- package/lib/custom-auth-path/types/protocol/Authorize.d.ts.map +1 -1
- package/lib/custom-auth-path/types/utils/BrowserConstants.d.ts +20 -0
- package/lib/custom-auth-path/types/utils/BrowserConstants.d.ts.map +1 -1
- package/lib/log-strings-mapping.json +4 -4
- package/lib/msal-browser.cjs +280 -188
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +280 -188
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +2 -2
- package/lib/redirect-bridge/msal-redirect-bridge.js +11 -10
- package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
- package/lib/types/cache/BrowserCacheManager.d.ts +2 -2
- package/lib/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/lib/types/cache/TokenCache.d.ts.map +1 -1
- package/lib/types/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/lib/types/controllers/StandardController.d.ts.map +1 -1
- package/lib/types/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/lib/types/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts +1 -1
- package/lib/types/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.d.ts.map +1 -1
- package/lib/types/custom_auth/core/interaction_client/jit/JitClient.d.ts.map +1 -1
- package/lib/types/custom_auth/core/interaction_client/mfa/MfaClient.d.ts.map +1 -1
- package/lib/types/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.d.ts.map +1 -1
- package/lib/types/custom_auth/sign_in/interaction_client/SignInClient.d.ts.map +1 -1
- package/lib/types/event/EventHandler.d.ts +1 -1
- package/lib/types/event/EventHandler.d.ts.map +1 -1
- package/lib/types/event/EventMessage.d.ts +1 -0
- package/lib/types/event/EventMessage.d.ts.map +1 -1
- package/lib/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/lib/types/interaction_client/PopupClient.d.ts.map +1 -1
- package/lib/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/lib/types/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
- package/lib/types/interaction_client/SilentRefreshClient.d.ts.map +1 -1
- package/lib/types/interaction_handler/InteractionHandler.d.ts +3 -2
- package/lib/types/interaction_handler/InteractionHandler.d.ts.map +1 -1
- package/lib/types/naa/mapping/NestedAppAuthAdapter.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/lib/types/protocol/Authorize.d.ts.map +1 -1
- package/lib/types/utils/BrowserConstants.d.ts +20 -0
- package/lib/types/utils/BrowserConstants.d.ts.map +1 -1
- package/package.json +5 -3
- package/src/cache/BrowserCacheManager.ts +26 -7
- package/src/cache/TokenCache.ts +47 -31
- package/src/controllers/NestedAppAuthController.ts +12 -1
- package/src/controllers/StandardController.ts +48 -18
- package/src/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.ts +4 -2
- package/src/custom_auth/core/interaction_client/jit/JitClient.ts +2 -1
- package/src/custom_auth/core/interaction_client/mfa/MfaClient.ts +2 -1
- package/src/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.ts +2 -1
- package/src/custom_auth/sign_in/interaction_client/SignInClient.ts +10 -5
- package/src/event/EventHandler.ts +2 -0
- package/src/event/EventMessage.ts +1 -0
- package/src/interaction_client/PlatformAuthInteractionClient.ts +3 -1
- package/src/interaction_client/PopupClient.ts +8 -0
- package/src/interaction_client/RedirectClient.ts +7 -0
- package/src/interaction_client/SilentAuthCodeClient.ts +1 -0
- package/src/interaction_client/SilentRefreshClient.ts +7 -5
- package/src/interaction_handler/InteractionHandler.ts +10 -3
- package/src/naa/mapping/NestedAppAuthAdapter.ts +30 -6
- package/src/packageMetadata.ts +1 -1
- package/src/protocol/Authorize.ts +15 -1
- package/src/utils/BrowserConstants.ts +27 -0
package/lib/msal-browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.0
|
|
1
|
+
/*! @azure/msal-browser v5.2.0 2026-02-10 */
|
|
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.msal = {}));
|
|
7
7
|
})(this, (function (exports) { 'use strict';
|
|
8
8
|
|
|
9
|
-
/*! @azure/msal-common v16.0.
|
|
9
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
10
10
|
/*
|
|
11
11
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12
12
|
* Licensed under the MIT License.
|
|
@@ -238,7 +238,7 @@
|
|
|
238
238
|
// Token renewal offset default in seconds
|
|
239
239
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
240
240
|
|
|
241
|
-
/*! @azure/msal-common v16.0.
|
|
241
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
242
242
|
/*
|
|
243
243
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
244
244
|
* Licensed under the MIT License.
|
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
const EAR_JWK = "ear_jwk";
|
|
289
289
|
const EAR_JWE_CRYPTO = "ear_jwe_crypto";
|
|
290
290
|
|
|
291
|
-
/*! @azure/msal-common v16.0.
|
|
291
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
292
292
|
/*
|
|
293
293
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
294
294
|
* Licensed under the MIT License.
|
|
@@ -319,7 +319,7 @@
|
|
|
319
319
|
return new AuthError(code, additionalMessage || getDefaultErrorMessage$1(code));
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
-
/*! @azure/msal-common v16.0.
|
|
322
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
323
323
|
|
|
324
324
|
/*
|
|
325
325
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -339,7 +339,7 @@
|
|
|
339
339
|
return new ClientConfigurationError(errorCode);
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
-
/*! @azure/msal-common v16.0.
|
|
342
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
343
343
|
/*
|
|
344
344
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
345
345
|
* Licensed under the MIT License.
|
|
@@ -436,7 +436,7 @@
|
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
438
|
|
|
439
|
-
/*! @azure/msal-common v16.0.
|
|
439
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
440
440
|
|
|
441
441
|
/*
|
|
442
442
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -459,7 +459,7 @@
|
|
|
459
459
|
return new ClientAuthError(errorCode, additionalMessage);
|
|
460
460
|
}
|
|
461
461
|
|
|
462
|
-
/*! @azure/msal-common v16.0.
|
|
462
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
463
463
|
/*
|
|
464
464
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
465
465
|
* Licensed under the MIT License.
|
|
@@ -513,7 +513,7 @@
|
|
|
513
513
|
urlParseError: urlParseError
|
|
514
514
|
});
|
|
515
515
|
|
|
516
|
-
/*! @azure/msal-common v16.0.
|
|
516
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
517
517
|
/*
|
|
518
518
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
519
519
|
* Licensed under the MIT License.
|
|
@@ -597,7 +597,7 @@
|
|
|
597
597
|
userCanceled: userCanceled
|
|
598
598
|
});
|
|
599
599
|
|
|
600
|
-
/*! @azure/msal-common v16.0.
|
|
600
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
601
601
|
|
|
602
602
|
/*
|
|
603
603
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -792,7 +792,7 @@
|
|
|
792
792
|
}
|
|
793
793
|
}
|
|
794
794
|
|
|
795
|
-
/*! @azure/msal-common v16.0.
|
|
795
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
796
796
|
|
|
797
797
|
/*
|
|
798
798
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1159,7 +1159,7 @@
|
|
|
1159
1159
|
parameters.set(EAR_JWE_CRYPTO, jweCryptoB64Encoded);
|
|
1160
1160
|
}
|
|
1161
1161
|
|
|
1162
|
-
/*! @azure/msal-common v16.0.
|
|
1162
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
1163
1163
|
|
|
1164
1164
|
/*
|
|
1165
1165
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1268,7 +1268,7 @@
|
|
|
1268
1268
|
}
|
|
1269
1269
|
}
|
|
1270
1270
|
|
|
1271
|
-
/*! @azure/msal-common v16.0.
|
|
1271
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
1272
1272
|
|
|
1273
1273
|
/*
|
|
1274
1274
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1307,7 +1307,7 @@
|
|
|
1307
1307
|
},
|
|
1308
1308
|
};
|
|
1309
1309
|
|
|
1310
|
-
/*! @azure/msal-common v16.0.
|
|
1310
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
1311
1311
|
/*
|
|
1312
1312
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1313
1313
|
* Licensed under the MIT License.
|
|
@@ -1582,12 +1582,12 @@
|
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
1584
|
|
|
1585
|
-
/*! @azure/msal-common v16.0.
|
|
1585
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
1586
1586
|
/* eslint-disable header/header */
|
|
1587
1587
|
const name$1 = "@azure/msal-common";
|
|
1588
|
-
const version$1 = "16.0.
|
|
1588
|
+
const version$1 = "16.0.4";
|
|
1589
1589
|
|
|
1590
|
-
/*! @azure/msal-common v16.0.
|
|
1590
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
1591
1591
|
/*
|
|
1592
1592
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1593
1593
|
* Licensed under the MIT License.
|
|
@@ -1607,7 +1607,7 @@
|
|
|
1607
1607
|
AzureUsGovernment: "https://login.microsoftonline.us",
|
|
1608
1608
|
};
|
|
1609
1609
|
|
|
1610
|
-
/*! @azure/msal-common v16.0.
|
|
1610
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
1611
1611
|
/*
|
|
1612
1612
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1613
1613
|
* Licensed under the MIT License.
|
|
@@ -1689,7 +1689,7 @@
|
|
|
1689
1689
|
return updatedAccountInfo;
|
|
1690
1690
|
}
|
|
1691
1691
|
|
|
1692
|
-
/*! @azure/msal-common v16.0.
|
|
1692
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
1693
1693
|
|
|
1694
1694
|
/*
|
|
1695
1695
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1769,7 +1769,7 @@
|
|
|
1769
1769
|
}
|
|
1770
1770
|
}
|
|
1771
1771
|
|
|
1772
|
-
/*! @azure/msal-common v16.0.
|
|
1772
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
1773
1773
|
|
|
1774
1774
|
/*
|
|
1775
1775
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1926,7 +1926,7 @@
|
|
|
1926
1926
|
}
|
|
1927
1927
|
}
|
|
1928
1928
|
|
|
1929
|
-
/*! @azure/msal-common v16.0.
|
|
1929
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
1930
1930
|
|
|
1931
1931
|
/*
|
|
1932
1932
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1997,6 +1997,21 @@
|
|
|
1997
1997
|
preferred_cache: "login-us.microsoftonline.com",
|
|
1998
1998
|
aliases: ["login-us.microsoftonline.com"],
|
|
1999
1999
|
},
|
|
2000
|
+
{
|
|
2001
|
+
preferred_network: "login.sovcloud-identity.fr",
|
|
2002
|
+
preferred_cache: "login.sovcloud-identity.fr",
|
|
2003
|
+
aliases: ["login.sovcloud-identity.fr"],
|
|
2004
|
+
},
|
|
2005
|
+
{
|
|
2006
|
+
preferred_network: "login.sovcloud-identity.de",
|
|
2007
|
+
preferred_cache: "login.sovcloud-identity.de",
|
|
2008
|
+
aliases: ["login.sovcloud-identity.de"],
|
|
2009
|
+
},
|
|
2010
|
+
{
|
|
2011
|
+
preferred_network: "login.sovcloud-identity.sg",
|
|
2012
|
+
preferred_cache: "login.sovcloud-identity.sg",
|
|
2013
|
+
aliases: ["login.sovcloud-identity.sg"],
|
|
2014
|
+
},
|
|
2000
2015
|
],
|
|
2001
2016
|
},
|
|
2002
2017
|
};
|
|
@@ -2068,7 +2083,7 @@
|
|
|
2068
2083
|
return null;
|
|
2069
2084
|
}
|
|
2070
2085
|
|
|
2071
|
-
/*! @azure/msal-common v16.0.
|
|
2086
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
2072
2087
|
/*
|
|
2073
2088
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2074
2089
|
* Licensed under the MIT License.
|
|
@@ -2076,7 +2091,7 @@
|
|
|
2076
2091
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
2077
2092
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
2078
2093
|
|
|
2079
|
-
/*! @azure/msal-common v16.0.
|
|
2094
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
2080
2095
|
|
|
2081
2096
|
/*
|
|
2082
2097
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2114,7 +2129,7 @@
|
|
|
2114
2129
|
}
|
|
2115
2130
|
}
|
|
2116
2131
|
|
|
2117
|
-
/*! @azure/msal-common v16.0.
|
|
2132
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
2118
2133
|
|
|
2119
2134
|
/*
|
|
2120
2135
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2152,7 +2167,7 @@
|
|
|
2152
2167
|
};
|
|
2153
2168
|
}
|
|
2154
2169
|
|
|
2155
|
-
/*! @azure/msal-common v16.0.
|
|
2170
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
2156
2171
|
/*
|
|
2157
2172
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2158
2173
|
* Licensed under the MIT License.
|
|
@@ -2167,7 +2182,7 @@
|
|
|
2167
2182
|
Ciam: 3,
|
|
2168
2183
|
};
|
|
2169
2184
|
|
|
2170
|
-
/*! @azure/msal-common v16.0.
|
|
2185
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
2171
2186
|
/*
|
|
2172
2187
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2173
2188
|
* Licensed under the MIT License.
|
|
@@ -2189,7 +2204,7 @@
|
|
|
2189
2204
|
return null;
|
|
2190
2205
|
}
|
|
2191
2206
|
|
|
2192
|
-
/*! @azure/msal-common v16.0.
|
|
2207
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
2193
2208
|
/*
|
|
2194
2209
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2195
2210
|
* Licensed under the MIT License.
|
|
@@ -2213,11 +2228,18 @@
|
|
|
2213
2228
|
EAR: "EAR",
|
|
2214
2229
|
};
|
|
2215
2230
|
|
|
2216
|
-
/*! @azure/msal-common v16.0.
|
|
2231
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
2217
2232
|
/**
|
|
2218
2233
|
* Returns the AccountInfo interface for this account.
|
|
2219
2234
|
*/
|
|
2220
2235
|
function getAccountInfo(accountEntity) {
|
|
2236
|
+
const tenantProfiles = accountEntity.tenantProfiles || [];
|
|
2237
|
+
// Ensure at least the home tenant profile exists
|
|
2238
|
+
if (tenantProfiles.length === 0 &&
|
|
2239
|
+
accountEntity.realm &&
|
|
2240
|
+
accountEntity.localAccountId) {
|
|
2241
|
+
tenantProfiles.push(buildTenantProfile(accountEntity.homeAccountId, accountEntity.localAccountId, accountEntity.realm));
|
|
2242
|
+
}
|
|
2221
2243
|
return {
|
|
2222
2244
|
homeAccountId: accountEntity.homeAccountId,
|
|
2223
2245
|
environment: accountEntity.environment,
|
|
@@ -2229,7 +2251,7 @@
|
|
|
2229
2251
|
nativeAccountId: accountEntity.nativeAccountId,
|
|
2230
2252
|
authorityType: accountEntity.authorityType,
|
|
2231
2253
|
// Deserialize tenant profiles array into a Map
|
|
2232
|
-
tenantProfiles: new Map(
|
|
2254
|
+
tenantProfiles: new Map(tenantProfiles.map((tenantProfile) => {
|
|
2233
2255
|
return [tenantProfile.tenantId, tenantProfile];
|
|
2234
2256
|
})),
|
|
2235
2257
|
dataBoundary: accountEntity.dataBoundary,
|
|
@@ -2318,6 +2340,14 @@
|
|
|
2318
2340
|
* @returns
|
|
2319
2341
|
*/
|
|
2320
2342
|
function createAccountEntityFromAccountInfo(accountInfo, cloudGraphHostName, msGraphHost) {
|
|
2343
|
+
// Serialize tenant profiles map into an array
|
|
2344
|
+
const tenantProfiles = Array.from(accountInfo.tenantProfiles?.values() || []);
|
|
2345
|
+
// Ensure at least the home tenant profile exists
|
|
2346
|
+
if (tenantProfiles.length === 0 &&
|
|
2347
|
+
accountInfo.tenantId &&
|
|
2348
|
+
accountInfo.localAccountId) {
|
|
2349
|
+
tenantProfiles.push(buildTenantProfile(accountInfo.homeAccountId, accountInfo.localAccountId, accountInfo.tenantId, accountInfo.idTokenClaims));
|
|
2350
|
+
}
|
|
2321
2351
|
return {
|
|
2322
2352
|
authorityType: accountInfo.authorityType || CACHE_ACCOUNT_TYPE_GENERIC,
|
|
2323
2353
|
homeAccountId: accountInfo.homeAccountId,
|
|
@@ -2330,7 +2360,7 @@
|
|
|
2330
2360
|
name: accountInfo.name,
|
|
2331
2361
|
cloudGraphHostName: cloudGraphHostName,
|
|
2332
2362
|
msGraphHost: msGraphHost,
|
|
2333
|
-
tenantProfiles:
|
|
2363
|
+
tenantProfiles: tenantProfiles,
|
|
2334
2364
|
dataBoundary: accountInfo.dataBoundary,
|
|
2335
2365
|
};
|
|
2336
2366
|
}
|
|
@@ -2373,7 +2403,7 @@
|
|
|
2373
2403
|
entity.hasOwnProperty("authorityType"));
|
|
2374
2404
|
}
|
|
2375
2405
|
|
|
2376
|
-
/*! @azure/msal-common v16.0.
|
|
2406
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
2377
2407
|
|
|
2378
2408
|
/*
|
|
2379
2409
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2539,13 +2569,13 @@
|
|
|
2539
2569
|
* @param storeInCache {?StoreInCache}
|
|
2540
2570
|
* @param correlationId {?string} correlation id
|
|
2541
2571
|
*/
|
|
2542
|
-
async saveCacheRecord(cacheRecord, correlationId, kmsi, storeInCache) {
|
|
2572
|
+
async saveCacheRecord(cacheRecord, correlationId, kmsi, apiId, storeInCache) {
|
|
2543
2573
|
if (!cacheRecord) {
|
|
2544
2574
|
throw createClientAuthError(invalidCacheRecord);
|
|
2545
2575
|
}
|
|
2546
2576
|
try {
|
|
2547
2577
|
if (!!cacheRecord.account) {
|
|
2548
|
-
await this.setAccount(cacheRecord.account, correlationId, kmsi);
|
|
2578
|
+
await this.setAccount(cacheRecord.account, correlationId, kmsi, apiId);
|
|
2549
2579
|
}
|
|
2550
2580
|
if (!!cacheRecord.idToken && storeInCache?.idToken !== false) {
|
|
2551
2581
|
await this.setIdTokenCredential(cacheRecord.idToken, correlationId, kmsi);
|
|
@@ -3470,7 +3500,7 @@
|
|
|
3470
3500
|
}
|
|
3471
3501
|
}
|
|
3472
3502
|
|
|
3473
|
-
/*! @azure/msal-common v16.0.
|
|
3503
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
3474
3504
|
/*
|
|
3475
3505
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3476
3506
|
* Licensed under the MIT License.
|
|
@@ -3511,7 +3541,7 @@
|
|
|
3511
3541
|
"upgradedCacheCount",
|
|
3512
3542
|
]);
|
|
3513
3543
|
|
|
3514
|
-
/*! @azure/msal-common v16.0.
|
|
3544
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
3515
3545
|
|
|
3516
3546
|
/*
|
|
3517
3547
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3566,7 +3596,7 @@
|
|
|
3566
3596
|
}
|
|
3567
3597
|
}
|
|
3568
3598
|
|
|
3569
|
-
/*! @azure/msal-common v16.0.
|
|
3599
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
3570
3600
|
|
|
3571
3601
|
/*
|
|
3572
3602
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3660,7 +3690,7 @@
|
|
|
3660
3690
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
3661
3691
|
}
|
|
3662
3692
|
|
|
3663
|
-
/*! @azure/msal-common v16.0.
|
|
3693
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
3664
3694
|
|
|
3665
3695
|
/*
|
|
3666
3696
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3679,7 +3709,7 @@
|
|
|
3679
3709
|
}
|
|
3680
3710
|
}
|
|
3681
3711
|
|
|
3682
|
-
/*! @azure/msal-common v16.0.
|
|
3712
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
3683
3713
|
/*
|
|
3684
3714
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3685
3715
|
* Licensed under the MIT License.
|
|
@@ -3707,7 +3737,7 @@
|
|
|
3707
3737
|
uxNotAllowed: uxNotAllowed
|
|
3708
3738
|
});
|
|
3709
3739
|
|
|
3710
|
-
/*! @azure/msal-common v16.0.
|
|
3740
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
3711
3741
|
|
|
3712
3742
|
/*
|
|
3713
3743
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3773,7 +3803,7 @@
|
|
|
3773
3803
|
return new InteractionRequiredAuthError(errorCode, errorMessage);
|
|
3774
3804
|
}
|
|
3775
3805
|
|
|
3776
|
-
/*! @azure/msal-common v16.0.
|
|
3806
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
3777
3807
|
|
|
3778
3808
|
/*
|
|
3779
3809
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3841,7 +3871,7 @@
|
|
|
3841
3871
|
}
|
|
3842
3872
|
}
|
|
3843
3873
|
|
|
3844
|
-
/*! @azure/msal-common v16.0.
|
|
3874
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
3845
3875
|
/*
|
|
3846
3876
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3847
3877
|
* Licensed under the MIT License.
|
|
@@ -3906,7 +3936,7 @@
|
|
|
3906
3936
|
return cachedAtSec > nowSeconds();
|
|
3907
3937
|
}
|
|
3908
3938
|
|
|
3909
|
-
/*! @azure/msal-common v16.0.
|
|
3939
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
3910
3940
|
/*
|
|
3911
3941
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3912
3942
|
* Licensed under the MIT License.
|
|
@@ -3977,7 +4007,7 @@
|
|
|
3977
4007
|
const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
|
|
3978
4008
|
const SetUserData = "setUserData";
|
|
3979
4009
|
|
|
3980
|
-
/*! @azure/msal-common v16.0.
|
|
4010
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
3981
4011
|
/*
|
|
3982
4012
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3983
4013
|
* Licensed under the MIT License.
|
|
@@ -4072,7 +4102,7 @@
|
|
|
4072
4102
|
};
|
|
4073
4103
|
};
|
|
4074
4104
|
|
|
4075
|
-
/*! @azure/msal-common v16.0.
|
|
4105
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
4076
4106
|
|
|
4077
4107
|
/*
|
|
4078
4108
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4152,7 +4182,7 @@
|
|
|
4152
4182
|
}
|
|
4153
4183
|
}
|
|
4154
4184
|
|
|
4155
|
-
/*! @azure/msal-common v16.0.
|
|
4185
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
4156
4186
|
/*
|
|
4157
4187
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4158
4188
|
* Licensed under the MIT License.
|
|
@@ -4179,7 +4209,7 @@
|
|
|
4179
4209
|
}
|
|
4180
4210
|
}
|
|
4181
4211
|
|
|
4182
|
-
/*! @azure/msal-common v16.0.
|
|
4212
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
4183
4213
|
|
|
4184
4214
|
/*
|
|
4185
4215
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4438,7 +4468,7 @@
|
|
|
4438
4468
|
return metadata.expiresAt <= nowSeconds();
|
|
4439
4469
|
}
|
|
4440
4470
|
|
|
4441
|
-
/*! @azure/msal-common v16.0.
|
|
4471
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
4442
4472
|
|
|
4443
4473
|
/*
|
|
4444
4474
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4505,7 +4535,7 @@
|
|
|
4505
4535
|
* @param serverTokenResponse
|
|
4506
4536
|
* @param authority
|
|
4507
4537
|
*/
|
|
4508
|
-
async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) {
|
|
4538
|
+
async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, apiId, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) {
|
|
4509
4539
|
// create an idToken object (not entity)
|
|
4510
4540
|
let idTokenClaims;
|
|
4511
4541
|
if (serverTokenResponse.id_token) {
|
|
@@ -4552,14 +4582,19 @@
|
|
|
4552
4582
|
if (handlingRefreshTokenResponse &&
|
|
4553
4583
|
!forceCacheRefreshTokenResponse &&
|
|
4554
4584
|
cacheRecord.account) {
|
|
4555
|
-
const
|
|
4556
|
-
|
|
4557
|
-
|
|
4585
|
+
const cachedAccounts = this.cacheStorage.getAllAccounts({
|
|
4586
|
+
homeAccountId: cacheRecord.account.homeAccountId,
|
|
4587
|
+
environment: cacheRecord.account.environment,
|
|
4588
|
+
}, request.correlationId);
|
|
4589
|
+
if (cachedAccounts.length < 1) {
|
|
4558
4590
|
this.logger.warning("1gmt66", request.correlationId);
|
|
4591
|
+
this.performanceClient?.addFields({
|
|
4592
|
+
acntLoggedOut: true,
|
|
4593
|
+
}, request.correlationId);
|
|
4559
4594
|
return await ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, this.performanceClient, idTokenClaims, requestStateObj, undefined, serverRequestId);
|
|
4560
4595
|
}
|
|
4561
4596
|
}
|
|
4562
|
-
await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, isKmsi(idTokenClaims || {}), request.storeInCache);
|
|
4597
|
+
await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, isKmsi(idTokenClaims || {}), apiId, request.storeInCache);
|
|
4563
4598
|
}
|
|
4564
4599
|
finally {
|
|
4565
4600
|
if (this.persistencePlugin &&
|
|
@@ -4769,7 +4804,7 @@
|
|
|
4769
4804
|
return baseAccount;
|
|
4770
4805
|
}
|
|
4771
4806
|
|
|
4772
|
-
/*! @azure/msal-common v16.0.
|
|
4807
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
4773
4808
|
/*
|
|
4774
4809
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4775
4810
|
* Licensed under the MIT License.
|
|
@@ -4779,7 +4814,7 @@
|
|
|
4779
4814
|
UPN: "UPN",
|
|
4780
4815
|
};
|
|
4781
4816
|
|
|
4782
|
-
/*! @azure/msal-common v16.0.
|
|
4817
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
4783
4818
|
/*
|
|
4784
4819
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4785
4820
|
* Licensed under the MIT License.
|
|
@@ -4797,7 +4832,7 @@
|
|
|
4797
4832
|
}
|
|
4798
4833
|
}
|
|
4799
4834
|
|
|
4800
|
-
/*! @azure/msal-common v16.0.
|
|
4835
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
4801
4836
|
/*
|
|
4802
4837
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4803
4838
|
* Licensed under the MIT License.
|
|
@@ -4818,7 +4853,7 @@
|
|
|
4818
4853
|
};
|
|
4819
4854
|
}
|
|
4820
4855
|
|
|
4821
|
-
/*! @azure/msal-common v16.0.
|
|
4856
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
4822
4857
|
|
|
4823
4858
|
/*
|
|
4824
4859
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4904,7 +4939,7 @@
|
|
|
4904
4939
|
}
|
|
4905
4940
|
}
|
|
4906
4941
|
|
|
4907
|
-
/*! @azure/msal-common v16.0.
|
|
4942
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
4908
4943
|
|
|
4909
4944
|
/*
|
|
4910
4945
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4935,7 +4970,7 @@
|
|
|
4935
4970
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
4936
4971
|
}
|
|
4937
4972
|
|
|
4938
|
-
/*! @azure/msal-common v16.0.
|
|
4973
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
4939
4974
|
|
|
4940
4975
|
/*
|
|
4941
4976
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5049,7 +5084,7 @@
|
|
|
5049
5084
|
return response;
|
|
5050
5085
|
}
|
|
5051
5086
|
|
|
5052
|
-
/*! @azure/msal-common v16.0.
|
|
5087
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
5053
5088
|
/*
|
|
5054
5089
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5055
5090
|
* Licensed under the MIT License.
|
|
@@ -5061,7 +5096,7 @@
|
|
|
5061
5096
|
response.hasOwnProperty("jwks_uri"));
|
|
5062
5097
|
}
|
|
5063
5098
|
|
|
5064
|
-
/*! @azure/msal-common v16.0.
|
|
5099
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
5065
5100
|
/*
|
|
5066
5101
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5067
5102
|
* Licensed under the MIT License.
|
|
@@ -5071,7 +5106,7 @@
|
|
|
5071
5106
|
response.hasOwnProperty("metadata"));
|
|
5072
5107
|
}
|
|
5073
5108
|
|
|
5074
|
-
/*! @azure/msal-common v16.0.
|
|
5109
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
5075
5110
|
/*
|
|
5076
5111
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5077
5112
|
* Licensed under the MIT License.
|
|
@@ -5081,7 +5116,7 @@
|
|
|
5081
5116
|
response.hasOwnProperty("error_description"));
|
|
5082
5117
|
}
|
|
5083
5118
|
|
|
5084
|
-
/*! @azure/msal-common v16.0.
|
|
5119
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
5085
5120
|
|
|
5086
5121
|
/*
|
|
5087
5122
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5186,7 +5221,7 @@
|
|
|
5186
5221
|
},
|
|
5187
5222
|
};
|
|
5188
5223
|
|
|
5189
|
-
/*! @azure/msal-common v16.0.
|
|
5224
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
5190
5225
|
|
|
5191
5226
|
/*
|
|
5192
5227
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6006,7 +6041,7 @@
|
|
|
6006
6041
|
};
|
|
6007
6042
|
}
|
|
6008
6043
|
|
|
6009
|
-
/*! @azure/msal-common v16.0.
|
|
6044
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
6010
6045
|
|
|
6011
6046
|
/*
|
|
6012
6047
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6040,7 +6075,7 @@
|
|
|
6040
6075
|
}
|
|
6041
6076
|
}
|
|
6042
6077
|
|
|
6043
|
-
/*! @azure/msal-common v16.0.
|
|
6078
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
6044
6079
|
|
|
6045
6080
|
/*
|
|
6046
6081
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6078,7 +6113,7 @@
|
|
|
6078
6113
|
* authorization_code_grant
|
|
6079
6114
|
* @param request
|
|
6080
6115
|
*/
|
|
6081
|
-
async acquireToken(request, authCodePayload) {
|
|
6116
|
+
async acquireToken(request, apiId, authCodePayload) {
|
|
6082
6117
|
if (!request.code) {
|
|
6083
6118
|
throw createClientAuthError(requestCannotBeMade);
|
|
6084
6119
|
}
|
|
@@ -6093,7 +6128,7 @@
|
|
|
6093
6128
|
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
|
|
6094
6129
|
// Validate response. This function throws a server error if an error is returned by the server.
|
|
6095
6130
|
responseHandler.validateTokenResponse(response.body, request.correlationId);
|
|
6096
|
-
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, authCodePayload, undefined, undefined, undefined, requestId);
|
|
6131
|
+
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, apiId, authCodePayload, undefined, undefined, undefined, requestId);
|
|
6097
6132
|
}
|
|
6098
6133
|
/**
|
|
6099
6134
|
* Used to log out the current user, and redirect the user to the postLogoutRedirectUri.
|
|
@@ -6300,7 +6335,7 @@
|
|
|
6300
6335
|
}
|
|
6301
6336
|
}
|
|
6302
6337
|
|
|
6303
|
-
/*! @azure/msal-common v16.0.
|
|
6338
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
6304
6339
|
|
|
6305
6340
|
/*
|
|
6306
6341
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6330,20 +6365,20 @@
|
|
|
6330
6365
|
// set performance telemetry client
|
|
6331
6366
|
this.performanceClient = performanceClient;
|
|
6332
6367
|
}
|
|
6333
|
-
async acquireToken(request) {
|
|
6368
|
+
async acquireToken(request, apiId) {
|
|
6334
6369
|
const reqTimestamp = nowSeconds();
|
|
6335
6370
|
const response = await invokeAsync(this.executeTokenRequest.bind(this), RefreshTokenClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(request, this.authority);
|
|
6336
6371
|
// Retrieve requestId from response headers
|
|
6337
6372
|
const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
|
|
6338
6373
|
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin);
|
|
6339
6374
|
responseHandler.validateTokenResponse(response.body, request.correlationId);
|
|
6340
|
-
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, undefined, undefined, true, request.forceCache, requestId);
|
|
6375
|
+
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, apiId, undefined, undefined, true, request.forceCache, requestId);
|
|
6341
6376
|
}
|
|
6342
6377
|
/**
|
|
6343
6378
|
* Gets cached refresh token and attaches to request, then calls acquireToken API
|
|
6344
6379
|
* @param request
|
|
6345
6380
|
*/
|
|
6346
|
-
async acquireTokenByRefreshToken(request) {
|
|
6381
|
+
async acquireTokenByRefreshToken(request, apiId) {
|
|
6347
6382
|
// Cannot renew token if no request object is given.
|
|
6348
6383
|
if (!request) {
|
|
6349
6384
|
throw createClientConfigurationError(tokenRequestEmpty);
|
|
@@ -6357,7 +6392,7 @@
|
|
|
6357
6392
|
// if the app is part of the family, retrive a Family refresh token if present and make a refreshTokenRequest
|
|
6358
6393
|
if (isFOCI) {
|
|
6359
6394
|
try {
|
|
6360
|
-
return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true);
|
|
6395
|
+
return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true, apiId);
|
|
6361
6396
|
}
|
|
6362
6397
|
catch (e) {
|
|
6363
6398
|
const noFamilyRTInCache = e instanceof InteractionRequiredAuthError &&
|
|
@@ -6368,7 +6403,7 @@
|
|
|
6368
6403
|
e.subError === CLIENT_MISMATCH_ERROR;
|
|
6369
6404
|
// if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART)
|
|
6370
6405
|
if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) {
|
|
6371
|
-
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);
|
|
6406
|
+
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false, apiId);
|
|
6372
6407
|
// throw in all other cases
|
|
6373
6408
|
}
|
|
6374
6409
|
else {
|
|
@@ -6377,13 +6412,13 @@
|
|
|
6377
6412
|
}
|
|
6378
6413
|
}
|
|
6379
6414
|
// fall back to application refresh token acquisition
|
|
6380
|
-
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);
|
|
6415
|
+
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false, apiId);
|
|
6381
6416
|
}
|
|
6382
6417
|
/**
|
|
6383
6418
|
* makes a network call to acquire tokens by exchanging RefreshToken available in userCache; throws if refresh token is not cached
|
|
6384
6419
|
* @param request
|
|
6385
6420
|
*/
|
|
6386
|
-
async acquireTokenWithCachedRefreshToken(request, foci) {
|
|
6421
|
+
async acquireTokenWithCachedRefreshToken(request, foci, apiId) {
|
|
6387
6422
|
// fetches family RT or application RT based on FOCI value
|
|
6388
6423
|
const refreshToken = invoke(this.cacheManager.getRefreshToken.bind(this.cacheManager), CacheManagerGetRefreshToken, this.logger, this.performanceClient, request.correlationId)(request.account, foci, request.correlationId, undefined);
|
|
6389
6424
|
if (!refreshToken) {
|
|
@@ -6412,7 +6447,7 @@
|
|
|
6412
6447
|
},
|
|
6413
6448
|
};
|
|
6414
6449
|
try {
|
|
6415
|
-
return await invokeAsync(this.acquireToken.bind(this), RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest);
|
|
6450
|
+
return await invokeAsync(this.acquireToken.bind(this), RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest, apiId);
|
|
6416
6451
|
}
|
|
6417
6452
|
catch (e) {
|
|
6418
6453
|
if (e instanceof InteractionRequiredAuthError) {
|
|
@@ -6525,7 +6560,7 @@
|
|
|
6525
6560
|
}
|
|
6526
6561
|
}
|
|
6527
6562
|
|
|
6528
|
-
/*! @azure/msal-common v16.0.
|
|
6563
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
6529
6564
|
|
|
6530
6565
|
/*
|
|
6531
6566
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6634,7 +6669,7 @@
|
|
|
6634
6669
|
}
|
|
6635
6670
|
}
|
|
6636
6671
|
|
|
6637
|
-
/*! @azure/msal-common v16.0.
|
|
6672
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
6638
6673
|
|
|
6639
6674
|
/*
|
|
6640
6675
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6649,7 +6684,7 @@
|
|
|
6649
6684
|
},
|
|
6650
6685
|
};
|
|
6651
6686
|
|
|
6652
|
-
/*! @azure/msal-common v16.0.
|
|
6687
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
6653
6688
|
|
|
6654
6689
|
/*
|
|
6655
6690
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6873,7 +6908,7 @@
|
|
|
6873
6908
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
6874
6909
|
}
|
|
6875
6910
|
|
|
6876
|
-
/*! @azure/msal-common v16.0.
|
|
6911
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
6877
6912
|
|
|
6878
6913
|
/*
|
|
6879
6914
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6931,7 +6966,7 @@
|
|
|
6931
6966
|
}
|
|
6932
6967
|
}
|
|
6933
6968
|
|
|
6934
|
-
/*! @azure/msal-common v16.0.
|
|
6969
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
6935
6970
|
/*
|
|
6936
6971
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6937
6972
|
* Licensed under the MIT License.
|
|
@@ -6948,7 +6983,7 @@
|
|
|
6948
6983
|
unexpectedError: unexpectedError
|
|
6949
6984
|
});
|
|
6950
6985
|
|
|
6951
|
-
/*! @azure/msal-common v16.0.
|
|
6986
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
6952
6987
|
|
|
6953
6988
|
/*
|
|
6954
6989
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7209,7 +7244,7 @@
|
|
|
7209
7244
|
}
|
|
7210
7245
|
}
|
|
7211
7246
|
|
|
7212
|
-
/*! @azure/msal-common v16.0.
|
|
7247
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
7213
7248
|
|
|
7214
7249
|
/*
|
|
7215
7250
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7230,7 +7265,7 @@
|
|
|
7230
7265
|
return new JoseHeaderError(code);
|
|
7231
7266
|
}
|
|
7232
7267
|
|
|
7233
|
-
/*! @azure/msal-common v16.0.
|
|
7268
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
7234
7269
|
/*
|
|
7235
7270
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7236
7271
|
* Licensed under the MIT License.
|
|
@@ -7238,7 +7273,7 @@
|
|
|
7238
7273
|
const missingKidError = "missing_kid_error";
|
|
7239
7274
|
const missingAlgError = "missing_alg_error";
|
|
7240
7275
|
|
|
7241
|
-
/*! @azure/msal-common v16.0.
|
|
7276
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
7242
7277
|
|
|
7243
7278
|
/*
|
|
7244
7279
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7278,7 +7313,7 @@
|
|
|
7278
7313
|
}
|
|
7279
7314
|
}
|
|
7280
7315
|
|
|
7281
|
-
/*! @azure/msal-common v16.0.
|
|
7316
|
+
/*! @azure/msal-common v16.0.4 2026-02-10 */
|
|
7282
7317
|
|
|
7283
7318
|
/*
|
|
7284
7319
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7977,6 +8012,7 @@
|
|
|
7977
8012
|
* Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs
|
|
7978
8013
|
* 0-99 Silent Flow
|
|
7979
8014
|
* 800-899 Auth Code Flow
|
|
8015
|
+
* 900-999 Misc
|
|
7980
8016
|
*/
|
|
7981
8017
|
const ApiId = {
|
|
7982
8018
|
acquireTokenRedirect: 861,
|
|
@@ -7988,6 +8024,30 @@
|
|
|
7988
8024
|
acquireTokenSilent_silentFlow: 61,
|
|
7989
8025
|
logout: 961,
|
|
7990
8026
|
logoutPopup: 962,
|
|
8027
|
+
hydrateCache: 963,
|
|
8028
|
+
loadExternalTokens: 964,
|
|
8029
|
+
};
|
|
8030
|
+
/**
|
|
8031
|
+
* API Names for Telemetry purposes.
|
|
8032
|
+
*/
|
|
8033
|
+
const ApiName = {
|
|
8034
|
+
861: "acquireTokenRedirect",
|
|
8035
|
+
862: "acquireTokenPopup",
|
|
8036
|
+
863: "ssoSilent",
|
|
8037
|
+
864: "acquireTokenSilent_authCode",
|
|
8038
|
+
865: "handleRedirectPromise",
|
|
8039
|
+
866: "acquireTokenByCode",
|
|
8040
|
+
61: "acquireTokenSilent_silentFlow",
|
|
8041
|
+
961: "logout",
|
|
8042
|
+
962: "logoutPopup",
|
|
8043
|
+
963: "hydrateCache",
|
|
8044
|
+
964: "loadExternalTokens",
|
|
8045
|
+
};
|
|
8046
|
+
const apiIdToName = (id) => {
|
|
8047
|
+
if (typeof id === "number" && id in ApiName) {
|
|
8048
|
+
return ApiName[id];
|
|
8049
|
+
}
|
|
8050
|
+
return "unknown";
|
|
7991
8051
|
};
|
|
7992
8052
|
/*
|
|
7993
8053
|
* Interaction type of the API - used for state and telemetry
|
|
@@ -10079,7 +10139,7 @@
|
|
|
10079
10139
|
|
|
10080
10140
|
/* eslint-disable header/header */
|
|
10081
10141
|
const name = "@azure/msal-browser";
|
|
10082
|
-
const version = "5.0
|
|
10142
|
+
const version = "5.2.0";
|
|
10083
10143
|
|
|
10084
10144
|
/*
|
|
10085
10145
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -10651,17 +10711,22 @@
|
|
|
10651
10711
|
!isAccountEntity(parsedAccount)) {
|
|
10652
10712
|
return null;
|
|
10653
10713
|
}
|
|
10654
|
-
|
|
10714
|
+
const account = CacheManager.toObject({}, parsedAccount);
|
|
10715
|
+
this.performanceClient.addFields({
|
|
10716
|
+
accountCachedBy: apiIdToName(account.cachedByApiId),
|
|
10717
|
+
}, correlationId);
|
|
10718
|
+
return account;
|
|
10655
10719
|
}
|
|
10656
10720
|
/**
|
|
10657
10721
|
* set account entity in the platform cache
|
|
10658
10722
|
* @param account
|
|
10659
10723
|
*/
|
|
10660
|
-
async setAccount(account, correlationId, kmsi) {
|
|
10724
|
+
async setAccount(account, correlationId, kmsi, apiId) {
|
|
10661
10725
|
this.logger.trace("1bz3wr", correlationId);
|
|
10662
10726
|
const key = this.generateAccountKey(getAccountInfo(account));
|
|
10663
10727
|
const timestamp = Date.now().toString();
|
|
10664
10728
|
account.lastUpdatedAt = timestamp;
|
|
10729
|
+
account.cachedByApiId = apiId;
|
|
10665
10730
|
await this.setUserData(key, JSON.stringify(account), correlationId, timestamp, kmsi);
|
|
10666
10731
|
this.addAccountKeyToMap(key, correlationId);
|
|
10667
10732
|
this.performanceClient.addFields({ kmsi: kmsi }, correlationId);
|
|
@@ -11087,7 +11152,7 @@
|
|
|
11087
11152
|
this.logger.verbose("1bp5z5", correlationId);
|
|
11088
11153
|
this.browserStorage.removeItem(activeAccountKey);
|
|
11089
11154
|
}
|
|
11090
|
-
this.eventHandler.emitEvent(EventType.ACTIVE_ACCOUNT_CHANGED);
|
|
11155
|
+
this.eventHandler.emitEvent(EventType.ACTIVE_ACCOUNT_CHANGED, correlationId);
|
|
11091
11156
|
}
|
|
11092
11157
|
/**
|
|
11093
11158
|
* fetch throttling entity from the platform cache
|
|
@@ -11372,7 +11437,7 @@
|
|
|
11372
11437
|
* @param request
|
|
11373
11438
|
*/
|
|
11374
11439
|
async hydrateCache(result, request) {
|
|
11375
|
-
const idTokenEntity = createIdTokenEntity(result.account
|
|
11440
|
+
const idTokenEntity = createIdTokenEntity(result.account.homeAccountId, result.account.environment, result.idToken, this.clientId, result.tenantId);
|
|
11376
11441
|
/**
|
|
11377
11442
|
* meta data for cache stores time in seconds from epoch
|
|
11378
11443
|
* AuthenticationResult returns expiresOn and extExpiresOn in milliseconds (as a Date object which is in ms)
|
|
@@ -11380,7 +11445,7 @@
|
|
|
11380
11445
|
*
|
|
11381
11446
|
* The next MSAL VFuture should map these both to same value if possible
|
|
11382
11447
|
*/
|
|
11383
|
-
const accessTokenEntity = createAccessTokenEntity(result.account
|
|
11448
|
+
const accessTokenEntity = createAccessTokenEntity(result.account.homeAccountId, result.account.environment, result.accessToken, this.clientId, result.tenantId, result.scopes.join(" "),
|
|
11384
11449
|
// Access token expiresOn stored in seconds, converting from AuthenticationResult expiresOn stored as Date
|
|
11385
11450
|
result.expiresOn
|
|
11386
11451
|
? toSecondsFromDate(result.expiresOn)
|
|
@@ -11393,7 +11458,7 @@
|
|
|
11393
11458
|
idToken: idTokenEntity,
|
|
11394
11459
|
accessToken: accessTokenEntity,
|
|
11395
11460
|
};
|
|
11396
|
-
return this.saveCacheRecord(cacheRecord, result.correlationId, isKmsi(extractTokenClaims(result.idToken, base64Decode)));
|
|
11461
|
+
return this.saveCacheRecord(cacheRecord, result.correlationId, isKmsi(extractTokenClaims(result.idToken, base64Decode)), ApiId.hydrateCache);
|
|
11397
11462
|
}
|
|
11398
11463
|
/**
|
|
11399
11464
|
* saves a cache record
|
|
@@ -11401,9 +11466,9 @@
|
|
|
11401
11466
|
* @param storeInCache {?StoreInCache}
|
|
11402
11467
|
* @param correlationId {?string} correlation id
|
|
11403
11468
|
*/
|
|
11404
|
-
async saveCacheRecord(cacheRecord, correlationId, kmsi, storeInCache) {
|
|
11469
|
+
async saveCacheRecord(cacheRecord, correlationId, kmsi, apiId, storeInCache) {
|
|
11405
11470
|
try {
|
|
11406
|
-
await super.saveCacheRecord(cacheRecord, correlationId, kmsi, storeInCache);
|
|
11471
|
+
await super.saveCacheRecord(cacheRecord, correlationId, kmsi, apiId, storeInCache);
|
|
11407
11472
|
}
|
|
11408
11473
|
catch (e) {
|
|
11409
11474
|
if (e instanceof CacheError &&
|
|
@@ -11550,12 +11615,13 @@
|
|
|
11550
11615
|
* @param payload
|
|
11551
11616
|
* @param error
|
|
11552
11617
|
*/
|
|
11553
|
-
emitEvent(eventType, interactionType, payload, error) {
|
|
11618
|
+
emitEvent(eventType, correlationId, interactionType, payload, error) {
|
|
11554
11619
|
const message = {
|
|
11555
11620
|
eventType: eventType,
|
|
11556
11621
|
interactionType: interactionType || null,
|
|
11557
11622
|
payload: payload || null,
|
|
11558
11623
|
error: error || null,
|
|
11624
|
+
correlationId: correlationId,
|
|
11559
11625
|
timestamp: Date.now(),
|
|
11560
11626
|
};
|
|
11561
11627
|
switch (eventType) {
|
|
@@ -12087,7 +12153,7 @@
|
|
|
12087
12153
|
* Function to handle response parameters from hash.
|
|
12088
12154
|
* @param locationHash
|
|
12089
12155
|
*/
|
|
12090
|
-
async handleCodeResponse(response, request) {
|
|
12156
|
+
async handleCodeResponse(response, request, apiId) {
|
|
12091
12157
|
let authCodeResponse;
|
|
12092
12158
|
try {
|
|
12093
12159
|
authCodeResponse = getAuthorizationCodePayload(response, request.state);
|
|
@@ -12102,7 +12168,7 @@
|
|
|
12102
12168
|
throw e;
|
|
12103
12169
|
}
|
|
12104
12170
|
}
|
|
12105
|
-
return invokeAsync(this.handleCodeResponseFromServer.bind(this), HandleCodeResponseFromServer, this.logger, this.performanceClient, request.correlationId)(authCodeResponse, request);
|
|
12171
|
+
return invokeAsync(this.handleCodeResponseFromServer.bind(this), HandleCodeResponseFromServer, this.logger, this.performanceClient, request.correlationId)(authCodeResponse, request, apiId);
|
|
12106
12172
|
}
|
|
12107
12173
|
/**
|
|
12108
12174
|
* Process auth code response from AAD
|
|
@@ -12111,7 +12177,7 @@
|
|
|
12111
12177
|
* @param validateNonce
|
|
12112
12178
|
* @returns
|
|
12113
12179
|
*/
|
|
12114
|
-
async handleCodeResponseFromServer(authCodeResponse, request, validateNonce = true) {
|
|
12180
|
+
async handleCodeResponseFromServer(authCodeResponse, request, apiId, validateNonce = true) {
|
|
12115
12181
|
this.logger.trace("0mf2hb", request.correlationId);
|
|
12116
12182
|
// Assign code to request
|
|
12117
12183
|
this.authCodeRequest.code = authCodeResponse.code;
|
|
@@ -12132,7 +12198,7 @@
|
|
|
12132
12198
|
}
|
|
12133
12199
|
}
|
|
12134
12200
|
// Acquire token with retrieved code.
|
|
12135
|
-
const tokenResponse = (await invokeAsync(this.authModule.acquireToken.bind(this.authModule), AuthClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(this.authCodeRequest, authCodeResponse));
|
|
12201
|
+
const tokenResponse = (await invokeAsync(this.authModule.acquireToken.bind(this.authModule), AuthClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(this.authCodeRequest, apiId, authCodeResponse));
|
|
12136
12202
|
return tokenResponse;
|
|
12137
12203
|
}
|
|
12138
12204
|
/**
|
|
@@ -12666,7 +12732,7 @@
|
|
|
12666
12732
|
*/
|
|
12667
12733
|
async cacheAccount(accountEntity, kmsi) {
|
|
12668
12734
|
// Store the account info and hence `nativeAccountId` in browser cache
|
|
12669
|
-
await this.browserStorage.setAccount(accountEntity, this.correlationId, kmsi);
|
|
12735
|
+
await this.browserStorage.setAccount(accountEntity, this.correlationId, kmsi, this.apiId);
|
|
12670
12736
|
// Remove any existing cached tokens for this account in browser storage
|
|
12671
12737
|
this.browserStorage.removeAccountContext(getAccountInfo(accountEntity), this.correlationId);
|
|
12672
12738
|
}
|
|
@@ -12695,7 +12761,7 @@
|
|
|
12695
12761
|
idToken: cachedIdToken,
|
|
12696
12762
|
accessToken: cachedAccessToken,
|
|
12697
12763
|
};
|
|
12698
|
-
return this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, this.correlationId, isKmsi(idTokenClaims), request.storeInCache);
|
|
12764
|
+
return this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, this.correlationId, isKmsi(idTokenClaims), this.apiId, request.storeInCache);
|
|
12699
12765
|
}
|
|
12700
12766
|
getExpiresInValue(tokenType, expiresIn) {
|
|
12701
12767
|
return tokenType === AuthenticationScheme$1.POP
|
|
@@ -12980,6 +13046,8 @@
|
|
|
12980
13046
|
});
|
|
12981
13047
|
const queryParams = new Map();
|
|
12982
13048
|
addExtraParameters(queryParams, request.extraQueryParameters || {});
|
|
13049
|
+
// Add correlationId to query params so gateway can propagate it to IDPs
|
|
13050
|
+
addCorrelationId(queryParams, request.correlationId);
|
|
12983
13051
|
const url = getAuthorizeUrl(authority, queryParams);
|
|
12984
13052
|
return createForm(frame, url, parameters);
|
|
12985
13053
|
}
|
|
@@ -12997,6 +13065,8 @@
|
|
|
12997
13065
|
// Add extraQueryParameters to be appended to request URL
|
|
12998
13066
|
const queryParams = new Map();
|
|
12999
13067
|
addExtraParameters(queryParams, request.extraQueryParameters || {});
|
|
13068
|
+
// Add correlationId to query params so gateway can propagate it to IDPs
|
|
13069
|
+
addCorrelationId(queryParams, request.correlationId);
|
|
13000
13070
|
const url = getAuthorizeUrl(authority, queryParams);
|
|
13001
13071
|
return createForm(frame, url, parameters);
|
|
13002
13072
|
}
|
|
@@ -13074,7 +13144,7 @@
|
|
|
13074
13144
|
// Create popup interaction handler.
|
|
13075
13145
|
const interactionHandler = new InteractionHandler(authClient, browserStorage, authCodeRequest, logger, performanceClient);
|
|
13076
13146
|
// Handle response from hash string.
|
|
13077
|
-
const result = await invokeAsync(interactionHandler.handleCodeResponse.bind(interactionHandler), HandleCodeResponse, logger, performanceClient, request.correlationId)(response, request);
|
|
13147
|
+
const result = await invokeAsync(interactionHandler.handleCodeResponse.bind(interactionHandler), HandleCodeResponse, logger, performanceClient, request.correlationId)(response, request, apiId);
|
|
13078
13148
|
return result;
|
|
13079
13149
|
}
|
|
13080
13150
|
/**
|
|
@@ -13121,7 +13191,7 @@
|
|
|
13121
13191
|
cloud_instance_name: decryptedData.cloud_instance_name,
|
|
13122
13192
|
msgraph_host: decryptedData.msgraph_host,
|
|
13123
13193
|
};
|
|
13124
|
-
return (await invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), HandleServerTokenResponse, logger, performanceClient, request.correlationId)(decryptedData, authority, nowSeconds(), request, additionalData, undefined, undefined, undefined, undefined));
|
|
13194
|
+
return (await invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), HandleServerTokenResponse, logger, performanceClient, request.correlationId)(decryptedData, authority, nowSeconds(), request, apiId, additionalData, undefined, undefined, undefined, undefined));
|
|
13125
13195
|
}
|
|
13126
13196
|
|
|
13127
13197
|
/*
|
|
@@ -14084,7 +14154,7 @@
|
|
|
14084
14154
|
const navigateUrl = await invokeAsync(getAuthCodeRequestUrl, GetAuthCodeUrl, this.logger, this.performanceClient, correlationId)(this.config, authClient.authority, popupRequest, this.logger, this.performanceClient);
|
|
14085
14155
|
// Show the UI once the url has been created. Get the window handle for the popup.
|
|
14086
14156
|
const popupWindow = this.initiateAuthRequest(navigateUrl, popupParams);
|
|
14087
|
-
this.eventHandler.emitEvent(EventType.POPUP_OPENED, exports.InteractionType.Popup, { popupWindow }, null);
|
|
14157
|
+
this.eventHandler.emitEvent(EventType.POPUP_OPENED, correlationId, exports.InteractionType.Popup, { popupWindow }, null);
|
|
14088
14158
|
// Wait for the redirect bridge response
|
|
14089
14159
|
const responseString = await waitForBridgeResponse(this.config.system.popupBridgeTimeout, this.logger, this.browserCrypto, request);
|
|
14090
14160
|
const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
|
|
@@ -14161,7 +14231,7 @@
|
|
|
14161
14231
|
*/
|
|
14162
14232
|
async logoutPopupAsync(validRequest, popupParams, requestAuthority, mainWindowRedirectUri) {
|
|
14163
14233
|
this.logger.verbose("0b7yrk", this.correlationId);
|
|
14164
|
-
this.eventHandler.emitEvent(EventType.LOGOUT_START, exports.InteractionType.Popup, validRequest);
|
|
14234
|
+
this.eventHandler.emitEvent(EventType.LOGOUT_START, this.correlationId, exports.InteractionType.Popup, validRequest);
|
|
14165
14235
|
const serverTelemetryManager = initializeServerTelemetryManager(ApiId.logoutPopup, this.config.auth.clientId, this.correlationId, this.browserStorage, this.logger);
|
|
14166
14236
|
try {
|
|
14167
14237
|
// Clear cache on logout
|
|
@@ -14179,7 +14249,7 @@
|
|
|
14179
14249
|
if (validRequest.account?.homeAccountId &&
|
|
14180
14250
|
validRequest.postLogoutRedirectUri &&
|
|
14181
14251
|
authClient.authority.protocolMode === ProtocolMode.OIDC) {
|
|
14182
|
-
this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS, exports.InteractionType.Popup, validRequest);
|
|
14252
|
+
this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS, validRequest.correlationId, exports.InteractionType.Popup, validRequest);
|
|
14183
14253
|
if (mainWindowRedirectUri) {
|
|
14184
14254
|
const navigationOptions = {
|
|
14185
14255
|
apiId: ApiId.logoutPopup,
|
|
@@ -14195,10 +14265,10 @@
|
|
|
14195
14265
|
}
|
|
14196
14266
|
// Create logout string and navigate user window to logout.
|
|
14197
14267
|
const logoutUri = authClient.getLogoutUri(validRequest);
|
|
14198
|
-
this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS, exports.InteractionType.Popup, validRequest);
|
|
14268
|
+
this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS, validRequest.correlationId, exports.InteractionType.Popup, validRequest);
|
|
14199
14269
|
// Open the popup window to requestUrl.
|
|
14200
14270
|
const popupWindow = this.openPopup(logoutUri, popupParams);
|
|
14201
|
-
this.eventHandler.emitEvent(EventType.POPUP_OPENED, exports.InteractionType.Popup, { popupWindow }, null);
|
|
14271
|
+
this.eventHandler.emitEvent(EventType.POPUP_OPENED, validRequest.correlationId, exports.InteractionType.Popup, { popupWindow }, null);
|
|
14202
14272
|
await waitForBridgeResponse(this.config.system.popupBridgeTimeout, this.logger, this.browserCrypto, validRequest).catch(() => {
|
|
14203
14273
|
// Swallow any errors related to monitoring the window. Server logout is best effort
|
|
14204
14274
|
});
|
|
@@ -14224,11 +14294,11 @@
|
|
|
14224
14294
|
e.setCorrelationId(this.correlationId);
|
|
14225
14295
|
serverTelemetryManager.cacheFailedRequest(e);
|
|
14226
14296
|
}
|
|
14227
|
-
this.eventHandler.emitEvent(EventType.LOGOUT_FAILURE, exports.InteractionType.Popup, null, e);
|
|
14228
|
-
this.eventHandler.emitEvent(EventType.LOGOUT_END, exports.InteractionType.Popup);
|
|
14297
|
+
this.eventHandler.emitEvent(EventType.LOGOUT_FAILURE, this.correlationId, exports.InteractionType.Popup, null, e);
|
|
14298
|
+
this.eventHandler.emitEvent(EventType.LOGOUT_END, this.correlationId, exports.InteractionType.Popup);
|
|
14229
14299
|
throw e;
|
|
14230
14300
|
}
|
|
14231
|
-
this.eventHandler.emitEvent(EventType.LOGOUT_END, exports.InteractionType.Popup);
|
|
14301
|
+
this.eventHandler.emitEvent(EventType.LOGOUT_END, this.correlationId, exports.InteractionType.Popup);
|
|
14232
14302
|
}
|
|
14233
14303
|
/**
|
|
14234
14304
|
* Opens a popup window with given request Url.
|
|
@@ -14391,7 +14461,7 @@
|
|
|
14391
14461
|
if (event.persisted) {
|
|
14392
14462
|
this.logger.verbose("0udvtt", this.correlationId);
|
|
14393
14463
|
this.browserStorage.resetRequestCache(this.correlationId);
|
|
14394
|
-
this.eventHandler.emitEvent(EventType.RESTORE_FROM_BFCACHE, exports.InteractionType.Redirect);
|
|
14464
|
+
this.eventHandler.emitEvent(EventType.RESTORE_FROM_BFCACHE, this.correlationId, exports.InteractionType.Redirect);
|
|
14395
14465
|
}
|
|
14396
14466
|
};
|
|
14397
14467
|
const redirectStartPage = this.getRedirectStartPage(request.redirectStartPage);
|
|
@@ -14708,7 +14778,7 @@
|
|
|
14708
14778
|
const validLogoutRequest = this.initializeLogoutRequest(logoutRequest);
|
|
14709
14779
|
const serverTelemetryManager = initializeServerTelemetryManager(ApiId.logout, this.config.auth.clientId, this.correlationId, this.browserStorage, this.logger);
|
|
14710
14780
|
try {
|
|
14711
|
-
this.eventHandler.emitEvent(EventType.LOGOUT_START, exports.InteractionType.Redirect, logoutRequest);
|
|
14781
|
+
this.eventHandler.emitEvent(EventType.LOGOUT_START, this.correlationId, exports.InteractionType.Redirect, logoutRequest);
|
|
14712
14782
|
// Clear cache on logout
|
|
14713
14783
|
await clearCacheOnLogout(this.browserStorage, this.browserCrypto, this.logger, this.correlationId, validLogoutRequest.account);
|
|
14714
14784
|
const navigationOptions = {
|
|
@@ -14728,7 +14798,7 @@
|
|
|
14728
14798
|
}
|
|
14729
14799
|
catch {
|
|
14730
14800
|
if (validLogoutRequest.account?.homeAccountId) {
|
|
14731
|
-
this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS, exports.InteractionType.Redirect, validLogoutRequest);
|
|
14801
|
+
this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS, this.correlationId, exports.InteractionType.Redirect, validLogoutRequest);
|
|
14732
14802
|
return;
|
|
14733
14803
|
}
|
|
14734
14804
|
}
|
|
@@ -14736,7 +14806,7 @@
|
|
|
14736
14806
|
// Create logout string and navigate user window to logout.
|
|
14737
14807
|
const logoutUri = authClient.getLogoutUri(validLogoutRequest);
|
|
14738
14808
|
if (validLogoutRequest.account?.homeAccountId) {
|
|
14739
|
-
this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS, exports.InteractionType.Redirect, validLogoutRequest);
|
|
14809
|
+
this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS, this.correlationId, exports.InteractionType.Redirect, validLogoutRequest);
|
|
14740
14810
|
}
|
|
14741
14811
|
// Check if onRedirectNavigate is implemented, and invoke it if so
|
|
14742
14812
|
const onRedirectNavigate = this.config.auth.onRedirectNavigate;
|
|
@@ -14771,11 +14841,11 @@
|
|
|
14771
14841
|
e.setCorrelationId(this.correlationId);
|
|
14772
14842
|
serverTelemetryManager.cacheFailedRequest(e);
|
|
14773
14843
|
}
|
|
14774
|
-
this.eventHandler.emitEvent(EventType.LOGOUT_FAILURE, exports.InteractionType.Redirect, null, e);
|
|
14775
|
-
this.eventHandler.emitEvent(EventType.LOGOUT_END, exports.InteractionType.Redirect);
|
|
14844
|
+
this.eventHandler.emitEvent(EventType.LOGOUT_FAILURE, this.correlationId, exports.InteractionType.Redirect, null, e);
|
|
14845
|
+
this.eventHandler.emitEvent(EventType.LOGOUT_END, this.correlationId, exports.InteractionType.Redirect);
|
|
14776
14846
|
throw e;
|
|
14777
14847
|
}
|
|
14778
|
-
this.eventHandler.emitEvent(EventType.LOGOUT_END, exports.InteractionType.Redirect);
|
|
14848
|
+
this.eventHandler.emitEvent(EventType.LOGOUT_END, this.correlationId, exports.InteractionType.Redirect);
|
|
14779
14849
|
}
|
|
14780
14850
|
/**
|
|
14781
14851
|
* Use to get the redirectStartPage either from request or use current window
|
|
@@ -15029,7 +15099,7 @@
|
|
|
15029
15099
|
account: silentRequest.account,
|
|
15030
15100
|
});
|
|
15031
15101
|
// Send request to renew token. Auth module will throw errors if token cannot be renewed.
|
|
15032
|
-
return invokeAsync(refreshTokenClient.acquireTokenByRefreshToken.bind(refreshTokenClient), RefreshTokenClientAcquireTokenByRefreshToken, this.logger, this.performanceClient, request.correlationId)(silentRequest).catch((e) => {
|
|
15102
|
+
return invokeAsync(refreshTokenClient.acquireTokenByRefreshToken.bind(refreshTokenClient), RefreshTokenClientAcquireTokenByRefreshToken, this.logger, this.performanceClient, request.correlationId)(silentRequest, ApiId.acquireTokenSilent_silentFlow).catch((e) => {
|
|
15033
15103
|
e.setCorrelationId(this.correlationId);
|
|
15034
15104
|
serverTelemetryManager.cacheFailedRequest(e);
|
|
15035
15105
|
throw e;
|
|
@@ -15126,7 +15196,7 @@
|
|
|
15126
15196
|
msgraph_host: request.msGraphHost,
|
|
15127
15197
|
cloud_graph_host_name: request.cloudGraphHostName,
|
|
15128
15198
|
cloud_instance_host_name: request.cloudInstanceHostName,
|
|
15129
|
-
}, silentRequest, false);
|
|
15199
|
+
}, silentRequest, this.apiId, false);
|
|
15130
15200
|
}
|
|
15131
15201
|
catch (e) {
|
|
15132
15202
|
if (e instanceof AuthError) {
|
|
@@ -15266,23 +15336,22 @@
|
|
|
15266
15336
|
if (!this.isBrowserEnvironment) {
|
|
15267
15337
|
this.logger.info("19fvpi", correlationId);
|
|
15268
15338
|
this.initialized = true;
|
|
15269
|
-
this.eventHandler.emitEvent(EventType.INITIALIZE_END);
|
|
15339
|
+
this.eventHandler.emitEvent(EventType.INITIALIZE_END, correlationId);
|
|
15270
15340
|
return;
|
|
15271
15341
|
}
|
|
15272
|
-
const initCorrelationId = request?.correlationId || this.getRequestCorrelationId();
|
|
15273
15342
|
const allowPlatformBroker = this.config.system.allowPlatformBroker;
|
|
15274
|
-
const initMeasurement = this.performanceClient.startMeasurement(InitializeClientApplication,
|
|
15275
|
-
this.eventHandler.emitEvent(EventType.INITIALIZE_START);
|
|
15343
|
+
const initMeasurement = this.performanceClient.startMeasurement(InitializeClientApplication, correlationId);
|
|
15344
|
+
this.eventHandler.emitEvent(EventType.INITIALIZE_START, correlationId);
|
|
15276
15345
|
// Broker applications are initialized twice, so we avoid double-counting it
|
|
15277
|
-
this.logMultipleInstances(initMeasurement,
|
|
15278
|
-
await invokeAsync(this.browserStorage.initialize.bind(this.browserStorage), InitializeCache, this.logger, this.performanceClient,
|
|
15346
|
+
this.logMultipleInstances(initMeasurement, correlationId);
|
|
15347
|
+
await invokeAsync(this.browserStorage.initialize.bind(this.browserStorage), InitializeCache, this.logger, this.performanceClient, correlationId)(correlationId);
|
|
15279
15348
|
if (allowPlatformBroker) {
|
|
15280
15349
|
try {
|
|
15281
15350
|
// check if platform authentication is available via DOM or browser extension and create relevant handlers
|
|
15282
|
-
this.platformAuthProvider = await getPlatformAuthProvider(this.logger, this.performanceClient,
|
|
15351
|
+
this.platformAuthProvider = await getPlatformAuthProvider(this.logger, this.performanceClient, correlationId, this.config.system.nativeBrokerHandshakeTimeout);
|
|
15283
15352
|
}
|
|
15284
15353
|
catch (e) {
|
|
15285
|
-
this.logger.verbose(e,
|
|
15354
|
+
this.logger.verbose(e, correlationId);
|
|
15286
15355
|
}
|
|
15287
15356
|
}
|
|
15288
15357
|
if (this.config.cache.cacheLocation ===
|
|
@@ -15290,9 +15359,9 @@
|
|
|
15290
15359
|
this.eventHandler.subscribeCrossTab();
|
|
15291
15360
|
}
|
|
15292
15361
|
!this.config.system.navigatePopups &&
|
|
15293
|
-
(await this.preGeneratePkceCodes(
|
|
15362
|
+
(await this.preGeneratePkceCodes(correlationId));
|
|
15294
15363
|
this.initialized = true;
|
|
15295
|
-
this.eventHandler.emitEvent(EventType.INITIALIZE_END);
|
|
15364
|
+
this.eventHandler.emitEvent(EventType.INITIALIZE_END, correlationId);
|
|
15296
15365
|
initMeasurement.end({
|
|
15297
15366
|
allowPlatformBroker: allowPlatformBroker,
|
|
15298
15367
|
success: true,
|
|
@@ -15354,11 +15423,11 @@
|
|
|
15354
15423
|
this.platformAuthProvider &&
|
|
15355
15424
|
!options?.hash;
|
|
15356
15425
|
let rootMeasurement;
|
|
15357
|
-
this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_START, exports.InteractionType.Redirect);
|
|
15358
15426
|
let redirectResponse;
|
|
15359
15427
|
try {
|
|
15360
15428
|
if (useNative && this.platformAuthProvider) {
|
|
15361
15429
|
const correlationId = platformBrokerRequest?.correlationId || "";
|
|
15430
|
+
this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_START, correlationId, exports.InteractionType.Redirect);
|
|
15362
15431
|
rootMeasurement = this.performanceClient.startMeasurement(AcquireTokenRedirect, correlationId);
|
|
15363
15432
|
this.logger.trace("12v7is", correlationId);
|
|
15364
15433
|
const nativeClient = new PlatformAuthInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.handleRedirectPromise, this.performanceClient, this.platformAuthProvider, platformBrokerRequest.accountId, this.nativeInternalStorage, platformBrokerRequest.correlationId);
|
|
@@ -15367,6 +15436,7 @@
|
|
|
15367
15436
|
else {
|
|
15368
15437
|
const [standardRequest, codeVerifier] = this.browserStorage.getCachedRequest("");
|
|
15369
15438
|
const correlationId = standardRequest.correlationId;
|
|
15439
|
+
this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_START, correlationId, exports.InteractionType.Redirect);
|
|
15370
15440
|
// Reset rootMeasurement now that we have correlationId
|
|
15371
15441
|
rootMeasurement = this.performanceClient.startMeasurement(AcquireTokenRedirect, correlationId);
|
|
15372
15442
|
this.logger.trace("0znzs5", correlationId);
|
|
@@ -15382,12 +15452,12 @@
|
|
|
15382
15452
|
.then((result) => {
|
|
15383
15453
|
if (result) {
|
|
15384
15454
|
this.browserStorage.resetRequestCache(result.correlationId);
|
|
15385
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, exports.InteractionType.Redirect, result);
|
|
15455
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, result.correlationId, exports.InteractionType.Redirect, result);
|
|
15386
15456
|
this.logger.verbose("0ui8f5", result.correlationId);
|
|
15387
15457
|
// Emit login event if number of accounts change
|
|
15388
15458
|
const isLoggingIn = loggedInAccounts.length < this.getAllAccounts().length;
|
|
15389
15459
|
if (isLoggingIn) {
|
|
15390
|
-
this.eventHandler.emitEvent(EventType.LOGIN_SUCCESS, exports.InteractionType.Redirect, result.account);
|
|
15460
|
+
this.eventHandler.emitEvent(EventType.LOGIN_SUCCESS, result.correlationId, exports.InteractionType.Redirect, result.account);
|
|
15391
15461
|
this.logger.verbose("16im3l", result.correlationId);
|
|
15392
15462
|
}
|
|
15393
15463
|
rootMeasurement.end({
|
|
@@ -15406,14 +15476,14 @@
|
|
|
15406
15476
|
rootMeasurement.discard();
|
|
15407
15477
|
}
|
|
15408
15478
|
}
|
|
15409
|
-
this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_END, exports.InteractionType.Redirect);
|
|
15479
|
+
this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_END, rootMeasurement.event.correlationId, exports.InteractionType.Redirect);
|
|
15410
15480
|
return result;
|
|
15411
15481
|
})
|
|
15412
15482
|
.catch((e) => {
|
|
15413
15483
|
this.browserStorage.resetRequestCache(rootMeasurement.event.correlationId);
|
|
15414
15484
|
const eventError = e;
|
|
15415
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, exports.InteractionType.Redirect, null, eventError);
|
|
15416
|
-
this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_END, exports.InteractionType.Redirect);
|
|
15485
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, rootMeasurement.event.correlationId, exports.InteractionType.Redirect, null, eventError);
|
|
15486
|
+
this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_END, rootMeasurement.event.correlationId, exports.InteractionType.Redirect);
|
|
15417
15487
|
rootMeasurement.end({
|
|
15418
15488
|
success: false,
|
|
15419
15489
|
}, eventError);
|
|
@@ -15452,7 +15522,7 @@
|
|
|
15452
15522
|
try {
|
|
15453
15523
|
redirectPreflightCheck(this.initialized, this.config);
|
|
15454
15524
|
this.browserStorage.setInteractionInProgress(true, INTERACTION_TYPE.SIGNIN);
|
|
15455
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, exports.InteractionType.Redirect, request);
|
|
15525
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, correlationId, exports.InteractionType.Redirect, request);
|
|
15456
15526
|
let result;
|
|
15457
15527
|
if (this.platformAuthProvider &&
|
|
15458
15528
|
this.canUsePlatformBroker(request)) {
|
|
@@ -15494,7 +15564,7 @@
|
|
|
15494
15564
|
else {
|
|
15495
15565
|
atrMeasurement.end({ success: false }, e, request.account);
|
|
15496
15566
|
}
|
|
15497
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, exports.InteractionType.Redirect, null, e);
|
|
15567
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, correlationId, exports.InteractionType.Redirect, null, e);
|
|
15498
15568
|
throw e;
|
|
15499
15569
|
}
|
|
15500
15570
|
}
|
|
@@ -15524,7 +15594,7 @@
|
|
|
15524
15594
|
}
|
|
15525
15595
|
// If logged in, emit acquire token events
|
|
15526
15596
|
const loggedInAccounts = this.getAllAccounts();
|
|
15527
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, exports.InteractionType.Popup, request);
|
|
15597
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, correlationId, exports.InteractionType.Popup, request);
|
|
15528
15598
|
let result;
|
|
15529
15599
|
const pkce = this.getPreGeneratedPkceCodes(correlationId);
|
|
15530
15600
|
if (this.canUsePlatformBroker(request)) {
|
|
@@ -15564,9 +15634,9 @@
|
|
|
15564
15634
|
* If logged in, emit acquire token events
|
|
15565
15635
|
*/
|
|
15566
15636
|
const isLoggingIn = loggedInAccounts.length < this.getAllAccounts().length;
|
|
15567
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, exports.InteractionType.Popup, result);
|
|
15637
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, correlationId, exports.InteractionType.Popup, result);
|
|
15568
15638
|
if (isLoggingIn) {
|
|
15569
|
-
this.eventHandler.emitEvent(EventType.LOGIN_SUCCESS, exports.InteractionType.Popup, result.account);
|
|
15639
|
+
this.eventHandler.emitEvent(EventType.LOGIN_SUCCESS, correlationId, exports.InteractionType.Popup, result.account);
|
|
15570
15640
|
}
|
|
15571
15641
|
atPopupMeasurement.end({
|
|
15572
15642
|
success: true,
|
|
@@ -15576,7 +15646,7 @@
|
|
|
15576
15646
|
return result;
|
|
15577
15647
|
})
|
|
15578
15648
|
.catch((e) => {
|
|
15579
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, exports.InteractionType.Popup, null, e);
|
|
15649
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, correlationId, exports.InteractionType.Popup, null, e);
|
|
15580
15650
|
atPopupMeasurement.end({
|
|
15581
15651
|
success: false,
|
|
15582
15652
|
}, e, request.account);
|
|
@@ -15636,7 +15706,7 @@
|
|
|
15636
15706
|
document.addEventListener("visibilitychange", this.trackPageVisibilityWithMeasurement);
|
|
15637
15707
|
const loggedInAccounts = this.getAllAccounts();
|
|
15638
15708
|
this.logger.verbose("0w1b45", correlationId);
|
|
15639
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, exports.InteractionType.Silent, validRequest);
|
|
15709
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, correlationId, exports.InteractionType.Silent, validRequest);
|
|
15640
15710
|
let result;
|
|
15641
15711
|
if (this.canUsePlatformBroker(validRequest)) {
|
|
15642
15712
|
result = this.acquireTokenNative(validRequest, ApiId.ssoSilent).catch((e) => {
|
|
@@ -15656,9 +15726,9 @@
|
|
|
15656
15726
|
return result
|
|
15657
15727
|
.then((response) => {
|
|
15658
15728
|
const isLoggingIn = loggedInAccounts.length < this.getAllAccounts().length;
|
|
15659
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, exports.InteractionType.Silent, response);
|
|
15729
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, correlationId, exports.InteractionType.Silent, response);
|
|
15660
15730
|
if (isLoggingIn) {
|
|
15661
|
-
this.eventHandler.emitEvent(EventType.LOGIN_SUCCESS, exports.InteractionType.Silent, response.account);
|
|
15731
|
+
this.eventHandler.emitEvent(EventType.LOGIN_SUCCESS, correlationId, exports.InteractionType.Silent, response.account);
|
|
15662
15732
|
}
|
|
15663
15733
|
this.ssoSilentMeasurement?.end({
|
|
15664
15734
|
success: true,
|
|
@@ -15669,7 +15739,7 @@
|
|
|
15669
15739
|
return response;
|
|
15670
15740
|
})
|
|
15671
15741
|
.catch((e) => {
|
|
15672
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, exports.InteractionType.Silent, null, e);
|
|
15742
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, correlationId, exports.InteractionType.Silent, null, e);
|
|
15673
15743
|
this.ssoSilentMeasurement?.end({
|
|
15674
15744
|
success: false,
|
|
15675
15745
|
}, e, request.account);
|
|
@@ -15694,7 +15764,7 @@
|
|
|
15694
15764
|
this.logger.trace("0ch6ga", correlationId);
|
|
15695
15765
|
const atbcMeasurement = this.performanceClient.startMeasurement(AcquireTokenByCode, correlationId);
|
|
15696
15766
|
preflightCheck(this.initialized, atbcMeasurement);
|
|
15697
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, exports.InteractionType.Silent, request);
|
|
15767
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, correlationId, exports.InteractionType.Silent, request);
|
|
15698
15768
|
atbcMeasurement.add({ scenarioId: request.scenarioId });
|
|
15699
15769
|
try {
|
|
15700
15770
|
if (request.code && request.nativeAccountId) {
|
|
@@ -15711,7 +15781,7 @@
|
|
|
15711
15781
|
correlationId,
|
|
15712
15782
|
})
|
|
15713
15783
|
.then((result) => {
|
|
15714
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, exports.InteractionType.Silent, result);
|
|
15784
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, correlationId, exports.InteractionType.Silent, result);
|
|
15715
15785
|
this.hybridAuthCodeResponses.delete(hybridAuthCode);
|
|
15716
15786
|
atbcMeasurement.end({
|
|
15717
15787
|
success: true,
|
|
@@ -15723,7 +15793,7 @@
|
|
|
15723
15793
|
})
|
|
15724
15794
|
.catch((error) => {
|
|
15725
15795
|
this.hybridAuthCodeResponses.delete(hybridAuthCode);
|
|
15726
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, exports.InteractionType.Silent, null, error);
|
|
15796
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, correlationId, exports.InteractionType.Silent, null, error);
|
|
15727
15797
|
atbcMeasurement.end({
|
|
15728
15798
|
success: false,
|
|
15729
15799
|
}, error);
|
|
@@ -15764,7 +15834,7 @@
|
|
|
15764
15834
|
}
|
|
15765
15835
|
}
|
|
15766
15836
|
catch (e) {
|
|
15767
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, exports.InteractionType.Silent, null, e);
|
|
15837
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, correlationId, exports.InteractionType.Silent, null, e);
|
|
15768
15838
|
atbcMeasurement.end({
|
|
15769
15839
|
success: false,
|
|
15770
15840
|
}, e);
|
|
@@ -15939,7 +16009,7 @@
|
|
|
15939
16009
|
this.logger.verbose("16jycr", result.correlationId);
|
|
15940
16010
|
// Account gets saved to browser storage regardless of native or not
|
|
15941
16011
|
const accountEntity = createAccountEntityFromAccountInfo(result.account, result.cloudGraphHostName, result.msGraphHost);
|
|
15942
|
-
await this.browserStorage.setAccount(accountEntity, result.correlationId, isKmsi(result.idTokenClaims));
|
|
16012
|
+
await this.browserStorage.setAccount(accountEntity, result.correlationId, isKmsi(result.idTokenClaims), ApiId.hydrateCache);
|
|
15943
16013
|
if (result.fromPlatformBroker) {
|
|
15944
16014
|
this.logger.verbose("1fxyu8", result.correlationId);
|
|
15945
16015
|
// Tokens from native broker are stored in-memory
|
|
@@ -16266,7 +16336,7 @@
|
|
|
16266
16336
|
*/
|
|
16267
16337
|
async acquireTokenSilentAsync(request, account) {
|
|
16268
16338
|
const trackPageVisibility = () => this.trackPageVisibility(request.correlationId);
|
|
16269
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, exports.InteractionType.Silent, request);
|
|
16339
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, request.correlationId, exports.InteractionType.Silent, request);
|
|
16270
16340
|
if (request.correlationId) {
|
|
16271
16341
|
this.performanceClient.incrementFields({ visibilityChangeCount: 0 }, request.correlationId);
|
|
16272
16342
|
}
|
|
@@ -16334,7 +16404,7 @@
|
|
|
16334
16404
|
});
|
|
16335
16405
|
return result
|
|
16336
16406
|
.then((response) => {
|
|
16337
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, exports.InteractionType.Silent, response);
|
|
16407
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, request.correlationId, exports.InteractionType.Silent, response);
|
|
16338
16408
|
if (request.correlationId) {
|
|
16339
16409
|
this.performanceClient.addFields({
|
|
16340
16410
|
fromCache: response.fromCache,
|
|
@@ -16344,7 +16414,7 @@
|
|
|
16344
16414
|
return response;
|
|
16345
16415
|
})
|
|
16346
16416
|
.catch((tokenRenewalError) => {
|
|
16347
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, exports.InteractionType.Silent, null, tokenRenewalError);
|
|
16417
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, request.correlationId, exports.InteractionType.Silent, null, tokenRenewalError);
|
|
16348
16418
|
throw tokenRenewalError;
|
|
16349
16419
|
})
|
|
16350
16420
|
.finally(() => {
|
|
@@ -16383,7 +16453,7 @@
|
|
|
16383
16453
|
if (cacheLookupPolicy === CacheLookupPolicy.AccessToken) {
|
|
16384
16454
|
throw cacheError;
|
|
16385
16455
|
}
|
|
16386
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_NETWORK_START, exports.InteractionType.Silent, silentRequest);
|
|
16456
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_NETWORK_START, silentRequest.correlationId, exports.InteractionType.Silent, silentRequest);
|
|
16387
16457
|
return invokeAsync(this.acquireTokenByRefreshToken.bind(this), AcquireTokenByRefreshToken, this.logger, this.performanceClient, silentRequest.correlationId)(silentRequest, cacheLookupPolicy);
|
|
16388
16458
|
});
|
|
16389
16459
|
}
|
|
@@ -16713,19 +16783,36 @@
|
|
|
16713
16783
|
effectiveIdTokenClaims?.oid ||
|
|
16714
16784
|
effectiveIdTokenClaims?.sub ||
|
|
16715
16785
|
"";
|
|
16716
|
-
|
|
16717
|
-
|
|
16718
|
-
|
|
16719
|
-
|
|
16786
|
+
/*
|
|
16787
|
+
* In B2C scenarios tid may not be present, use getTenantIdFromIdTokenClaims
|
|
16788
|
+
* which handles tid, tfp (modern B2C), and acr (legacy B2C) claims
|
|
16789
|
+
*/
|
|
16790
|
+
const tenantId = fromAccount.tenantId ||
|
|
16791
|
+
getTenantIdFromIdTokenClaims(effectiveIdTokenClaims) ||
|
|
16720
16792
|
"";
|
|
16721
|
-
const
|
|
16793
|
+
const homeAccountId = fromAccount.homeAccountId || `${localAccountId}.${tenantId}`;
|
|
16794
|
+
// Validate environment - required field
|
|
16795
|
+
const environment = fromAccount.environment;
|
|
16796
|
+
if (!environment) {
|
|
16797
|
+
throw createClientAuthError(invalidCacheEnvironment);
|
|
16798
|
+
}
|
|
16799
|
+
/*
|
|
16800
|
+
* In B2C scenarios the emails claim is used instead of preferred_username and it is an array.
|
|
16801
|
+
* In most cases it will contain a single email. This field should not be relied upon if a custom
|
|
16802
|
+
* policy is configured to return more than 1 email.
|
|
16803
|
+
*/
|
|
16804
|
+
const preferredUsername = effectiveIdTokenClaims?.preferred_username ||
|
|
16805
|
+
effectiveIdTokenClaims?.upn;
|
|
16806
|
+
const email = effectiveIdTokenClaims?.emails?.[0] || null;
|
|
16807
|
+
const username = fromAccount.username || preferredUsername || email || "";
|
|
16808
|
+
const name = fromAccount.name || effectiveIdTokenClaims?.name || "";
|
|
16722
16809
|
const loginHint = fromAccount.loginHint || effectiveIdTokenClaims?.login_hint;
|
|
16723
16810
|
const tenantProfiles = new Map();
|
|
16724
16811
|
const tenantProfile = buildTenantProfile(homeAccountId, localAccountId, tenantId, effectiveIdTokenClaims);
|
|
16725
16812
|
tenantProfiles.set(tenantId, tenantProfile);
|
|
16726
16813
|
const account = {
|
|
16727
16814
|
homeAccountId,
|
|
16728
|
-
environment
|
|
16815
|
+
environment,
|
|
16729
16816
|
tenantId,
|
|
16730
16817
|
username,
|
|
16731
16818
|
localAccountId,
|
|
@@ -16896,7 +16983,7 @@
|
|
|
16896
16983
|
async acquireTokenInteractive(request) {
|
|
16897
16984
|
const validRequest = this.ensureValidRequest(request);
|
|
16898
16985
|
const correlationId = validRequest.correlationId || createNewGuid();
|
|
16899
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, exports.InteractionType.Popup, validRequest);
|
|
16986
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, correlationId, exports.InteractionType.Popup, validRequest);
|
|
16900
16987
|
const atPopupMeasurement = this.performanceClient.startMeasurement(AcquireTokenPopup, correlationId);
|
|
16901
16988
|
atPopupMeasurement.add({ nestedAppAuthRequest: true });
|
|
16902
16989
|
try {
|
|
@@ -16920,7 +17007,7 @@
|
|
|
16920
17007
|
environment: result.account.environment,
|
|
16921
17008
|
tenantId: result.account.tenantId,
|
|
16922
17009
|
};
|
|
16923
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, exports.InteractionType.Popup, result);
|
|
17010
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, correlationId, exports.InteractionType.Popup, result);
|
|
16924
17011
|
atPopupMeasurement.add({
|
|
16925
17012
|
accessTokenSize: result.accessToken.length,
|
|
16926
17013
|
idTokenSize: result.idToken.length,
|
|
@@ -16935,7 +17022,7 @@
|
|
|
16935
17022
|
const error = e instanceof AuthError
|
|
16936
17023
|
? e
|
|
16937
17024
|
: this.nestedAppAuthAdapter.fromBridgeError(e);
|
|
16938
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, exports.InteractionType.Popup, null, e);
|
|
17025
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, correlationId, exports.InteractionType.Popup, null, e);
|
|
16939
17026
|
atPopupMeasurement.end({
|
|
16940
17027
|
success: false,
|
|
16941
17028
|
}, e, request.account);
|
|
@@ -16950,11 +17037,11 @@
|
|
|
16950
17037
|
async acquireTokenSilentInternal(request) {
|
|
16951
17038
|
const validRequest = this.ensureValidRequest(request);
|
|
16952
17039
|
const correlationId = validRequest.correlationId || createNewGuid();
|
|
16953
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, exports.InteractionType.Silent, validRequest);
|
|
17040
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, correlationId, exports.InteractionType.Silent, validRequest);
|
|
16954
17041
|
// Look for tokens in the cache first
|
|
16955
17042
|
const result = await this.acquireTokenFromCache(validRequest);
|
|
16956
17043
|
if (result) {
|
|
16957
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, exports.InteractionType.Silent, result);
|
|
17044
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, correlationId, exports.InteractionType.Silent, result);
|
|
16958
17045
|
return result;
|
|
16959
17046
|
}
|
|
16960
17047
|
// proceed with acquiring tokens via the host
|
|
@@ -16985,7 +17072,7 @@
|
|
|
16985
17072
|
environment: result.account.environment,
|
|
16986
17073
|
tenantId: result.account.tenantId,
|
|
16987
17074
|
};
|
|
16988
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, exports.InteractionType.Silent, result);
|
|
17075
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, correlationId, exports.InteractionType.Silent, result);
|
|
16989
17076
|
ssoSilentMeasurement?.add({
|
|
16990
17077
|
accessTokenSize: result.accessToken.length,
|
|
16991
17078
|
idTokenSize: result.idToken.length,
|
|
@@ -17000,7 +17087,7 @@
|
|
|
17000
17087
|
const error = e instanceof AuthError
|
|
17001
17088
|
? e
|
|
17002
17089
|
: this.nestedAppAuthAdapter.fromBridgeError(e);
|
|
17003
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, exports.InteractionType.Silent, null, e);
|
|
17090
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, correlationId, exports.InteractionType.Silent, null, e);
|
|
17004
17091
|
ssoSilentMeasurement?.end({
|
|
17005
17092
|
success: false,
|
|
17006
17093
|
}, e, request.account);
|
|
@@ -17043,7 +17130,7 @@
|
|
|
17043
17130
|
return null;
|
|
17044
17131
|
}
|
|
17045
17132
|
if (result) {
|
|
17046
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, exports.InteractionType.Silent, result);
|
|
17133
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, correlationId, exports.InteractionType.Silent, result);
|
|
17047
17134
|
atsMeasurement.add({
|
|
17048
17135
|
accessTokenSize: result.accessToken.length,
|
|
17049
17136
|
idTokenSize: result.idToken.length,
|
|
@@ -17054,7 +17141,7 @@
|
|
|
17054
17141
|
return result;
|
|
17055
17142
|
}
|
|
17056
17143
|
this.logger.warning("1yb4fi", correlationId);
|
|
17057
|
-
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, exports.InteractionType.Silent, null);
|
|
17144
|
+
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, correlationId, exports.InteractionType.Silent, null);
|
|
17058
17145
|
atsMeasurement.end({
|
|
17059
17146
|
success: false,
|
|
17060
17147
|
}, undefined, request.account);
|
|
@@ -17270,7 +17357,7 @@
|
|
|
17270
17357
|
async hydrateCache(result, request) {
|
|
17271
17358
|
this.logger.verbose("16jycr", result.correlationId);
|
|
17272
17359
|
const accountEntity = createAccountEntityFromAccountInfo(result.account, result.cloudGraphHostName, result.msGraphHost);
|
|
17273
|
-
await this.browserStorage.setAccount(accountEntity, result.correlationId, isKmsi(result.idTokenClaims));
|
|
17360
|
+
await this.browserStorage.setAccount(accountEntity, result.correlationId, isKmsi(result.idTokenClaims), ApiId.hydrateCache);
|
|
17274
17361
|
return this.browserStorage.hydrateCache(result, request);
|
|
17275
17362
|
}
|
|
17276
17363
|
}
|
|
@@ -17917,20 +18004,19 @@
|
|
|
17917
18004
|
const logger = new Logger(browserConfig.system.loggerOptions || {});
|
|
17918
18005
|
const cryptoOps = new CryptoOps(logger, browserConfig.telemetry.client);
|
|
17919
18006
|
const storage = new BrowserCacheManager(browserConfig.auth.clientId, browserConfig.cache, cryptoOps, logger, browserConfig.telemetry.client, new EventHandler(logger), buildStaticAuthorityOptions(browserConfig.auth));
|
|
17920
|
-
const
|
|
17921
|
-
|
|
17922
|
-
|
|
17923
|
-
const cacheRecordAccount = await invokeAsync(loadAccount, LoadAccount, logger, performanceClient, correlationId)(request, options.clientInfo || response.client_info || "", correlationId, storage, logger, cryptoOps, idTokenClaims, authority);
|
|
18007
|
+
const authorityString = request.authority || browserConfig.auth.authority;
|
|
18008
|
+
const authority = await createDiscoveredInstance(Authority.generateAuthority(authorityString, request.azureCloudOptions), browserConfig.system.networkClient, storage, authorityOptions, logger, correlationId, performanceClient);
|
|
18009
|
+
const cacheRecordAccount = await invokeAsync(loadAccount, LoadAccount, logger, performanceClient, correlationId)(request, options.clientInfo || response.client_info || "", correlationId, storage, logger, cryptoOps, authority, idTokenClaims);
|
|
17924
18010
|
const idToken = await invokeAsync(loadIdToken, LoadIdToken, logger, performanceClient, correlationId)(response, cacheRecordAccount.homeAccountId, cacheRecordAccount.environment, cacheRecordAccount.realm, kmsi, correlationId, storage, logger, config.auth.clientId);
|
|
17925
18011
|
const accessToken = await invokeAsync(loadAccessToken, LoadAccessToken, logger, performanceClient, correlationId)(request, response, cacheRecordAccount.homeAccountId, cacheRecordAccount.environment, cacheRecordAccount.realm, kmsi, options, correlationId, storage, logger, config.auth.clientId);
|
|
17926
|
-
const refreshToken = await invokeAsync(loadRefreshToken, LoadRefreshToken, logger, performanceClient, correlationId)(response, cacheRecordAccount.homeAccountId, cacheRecordAccount.environment, kmsi, correlationId, storage, logger, config.auth.clientId);
|
|
18012
|
+
const refreshToken = await invokeAsync(loadRefreshToken, LoadRefreshToken, logger, performanceClient, correlationId)(response, cacheRecordAccount.homeAccountId, cacheRecordAccount.environment, kmsi, correlationId, storage, logger, config.auth.clientId, performanceClient);
|
|
17927
18013
|
rootMeasurement.end({ success: true }, undefined, getAccountInfo(cacheRecordAccount));
|
|
17928
18014
|
return generateAuthenticationResult(request, {
|
|
17929
18015
|
account: cacheRecordAccount,
|
|
17930
18016
|
idToken,
|
|
17931
18017
|
accessToken,
|
|
17932
18018
|
refreshToken,
|
|
17933
|
-
},
|
|
18019
|
+
}, authority, idTokenClaims);
|
|
17934
18020
|
}
|
|
17935
18021
|
catch (error) {
|
|
17936
18022
|
rootMeasurement.end({ success: false }, error);
|
|
@@ -17946,23 +18032,23 @@
|
|
|
17946
18032
|
* @param requestHomeAccountId
|
|
17947
18033
|
* @returns `AccountEntity`
|
|
17948
18034
|
*/
|
|
17949
|
-
async function loadAccount(request, clientInfo, correlationId, storage, logger, cryptoObj,
|
|
18035
|
+
async function loadAccount(request, clientInfo, correlationId, storage, logger, cryptoObj, authority, idTokenClaims) {
|
|
17950
18036
|
logger.verbose("0ke46k", correlationId);
|
|
17951
18037
|
if (request.account) {
|
|
17952
18038
|
const accountEntity = createAccountEntityFromAccountInfo(request.account);
|
|
17953
|
-
await storage.setAccount(accountEntity, correlationId, isKmsi(idTokenClaims || {}));
|
|
18039
|
+
await storage.setAccount(accountEntity, correlationId, isKmsi(idTokenClaims || {}), ApiId.loadExternalTokens);
|
|
17954
18040
|
return accountEntity;
|
|
17955
18041
|
}
|
|
17956
|
-
else if (!
|
|
17957
|
-
logger.error("
|
|
18042
|
+
else if (!clientInfo && !idTokenClaims) {
|
|
18043
|
+
logger.error("0hzcn4", correlationId);
|
|
17958
18044
|
throw createBrowserAuthError(unableToLoadToken);
|
|
17959
18045
|
}
|
|
17960
18046
|
const homeAccountId = generateHomeAccountId(clientInfo, authority.authorityType, logger, cryptoObj, correlationId, idTokenClaims);
|
|
17961
18047
|
const claimsTenantId = idTokenClaims?.tid;
|
|
17962
|
-
const cachedAccount = buildAccountToCache(storage, authority, homeAccountId, base64Decode, correlationId, idTokenClaims, clientInfo, authority.
|
|
18048
|
+
const cachedAccount = buildAccountToCache(storage, authority, homeAccountId, base64Decode, correlationId, idTokenClaims, clientInfo, authority.getPreferredCache(), claimsTenantId, undefined, // authCodePayload
|
|
17963
18049
|
undefined, // nativeAccountId
|
|
17964
18050
|
logger);
|
|
17965
|
-
await storage.setAccount(cachedAccount, correlationId, isKmsi(idTokenClaims || {}));
|
|
18051
|
+
await storage.setAccount(cachedAccount, correlationId, isKmsi(idTokenClaims || {}), ApiId.loadExternalTokens);
|
|
17966
18052
|
return cachedAccount;
|
|
17967
18053
|
}
|
|
17968
18054
|
/**
|
|
@@ -18025,14 +18111,20 @@
|
|
|
18025
18111
|
* @param environment
|
|
18026
18112
|
* @returns `RefreshTokenEntity`
|
|
18027
18113
|
*/
|
|
18028
|
-
async function loadRefreshToken(response, homeAccountId, environment, kmsi, correlationId, storage, logger, clientId) {
|
|
18114
|
+
async function loadRefreshToken(response, homeAccountId, environment, kmsi, correlationId, storage, logger, clientId, performanceClient) {
|
|
18029
18115
|
if (!response.refresh_token) {
|
|
18030
18116
|
logger.verbose("1l7um5", correlationId);
|
|
18031
18117
|
return null;
|
|
18032
18118
|
}
|
|
18119
|
+
const expiresOn = response.refresh_token_expires_in
|
|
18120
|
+
? response.refresh_token_expires_in + nowSeconds()
|
|
18121
|
+
: undefined;
|
|
18122
|
+
performanceClient.addFields({
|
|
18123
|
+
extRtExpiresOnSeconds: expiresOn,
|
|
18124
|
+
}, correlationId);
|
|
18033
18125
|
logger.verbose("0qy8ev", correlationId);
|
|
18034
18126
|
const refreshTokenEntity = createRefreshTokenEntity(homeAccountId, environment, response.refresh_token, clientId, response.foci, undefined, // userAssertionHash
|
|
18035
|
-
|
|
18127
|
+
expiresOn);
|
|
18036
18128
|
await storage.setRefreshTokenCredential(refreshTokenEntity, correlationId, kmsi);
|
|
18037
18129
|
return refreshTokenEntity;
|
|
18038
18130
|
}
|
|
@@ -18044,7 +18136,7 @@
|
|
|
18044
18136
|
* @param authority
|
|
18045
18137
|
* @returns `AuthenticationResult`
|
|
18046
18138
|
*/
|
|
18047
|
-
function generateAuthenticationResult(request, cacheRecord,
|
|
18139
|
+
function generateAuthenticationResult(request, cacheRecord, authority, idTokenClaims) {
|
|
18048
18140
|
let accessToken = "";
|
|
18049
18141
|
let responseScopes = [];
|
|
18050
18142
|
let expiresOn = null;
|
|
@@ -18058,7 +18150,7 @@
|
|
|
18058
18150
|
}
|
|
18059
18151
|
const accountEntity = cacheRecord.account;
|
|
18060
18152
|
return {
|
|
18061
|
-
authority: authority
|
|
18153
|
+
authority: authority.canonicalAuthority,
|
|
18062
18154
|
uniqueId: cacheRecord.account.localAccountId,
|
|
18063
18155
|
tenantId: cacheRecord.account.realm,
|
|
18064
18156
|
scopes: responseScopes,
|