@azure/msal-browser 5.6.2 → 5.7.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/README.md +0 -1
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +2 -3
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthProvider.d.ts +1 -1
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +2 -2
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.mjs +1 -1
- package/dist/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/CacheKeys.d.ts +1 -0
- package/dist/cache/CacheKeys.d.ts.map +1 -1
- package/dist/cache/CacheKeys.mjs +3 -2
- package/dist/cache/CacheKeys.mjs.map +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 +9 -9
- package/dist/cache/TokenCache.mjs.map +1 -1
- package/dist/config/Configuration.d.ts +20 -1
- package/dist/config/Configuration.d.ts.map +1 -1
- package/dist/config/Configuration.mjs +10 -2
- package/dist/config/Configuration.mjs.map +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.d.ts +20 -2
- package/dist/controllers/StandardController.d.ts.map +1 -1
- package/dist/controllers/StandardController.mjs +204 -37
- 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 +2 -3
- package/dist/custom-auth-path/broker/nativeBroker/NativeStatusCodes.mjs.map +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.d.ts +1 -1
- package/dist/custom-auth-path/broker/nativeBroker/PlatformAuthProvider.mjs +2 -2
- 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.mjs +1 -1
- package/dist/custom-auth-path/cache/CacheHelpers.mjs +1 -1
- package/dist/custom-auth-path/cache/CacheKeys.d.ts +1 -0
- package/dist/custom-auth-path/cache/CacheKeys.d.ts.map +1 -1
- package/dist/custom-auth-path/cache/CacheKeys.mjs +3 -2
- package/dist/custom-auth-path/cache/CacheKeys.mjs.map +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.d.ts +20 -1
- package/dist/custom-auth-path/config/Configuration.d.ts.map +1 -1
- package/dist/custom-auth-path/config/Configuration.mjs +10 -2
- package/dist/custom-auth-path/config/Configuration.mjs.map +1 -1
- package/dist/custom-auth-path/controllers/StandardController.d.ts +20 -2
- package/dist/custom-auth-path/controllers/StandardController.d.ts.map +1 -1
- package/dist/custom-auth-path/controllers/StandardController.mjs +204 -37
- 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.mjs +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.mjs +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.mjs +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.mjs +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.mjs +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.d.ts.map +1 -1
- package/dist/custom-auth-path/error/NativeAuthError.mjs +3 -4
- package/dist/custom-auth-path/error/NativeAuthError.mjs.map +1 -1
- package/dist/custom-auth-path/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/custom-auth-path/event/EventHandler.mjs +1 -1
- package/dist/custom-auth-path/event/EventType.mjs +1 -1
- package/dist/custom-auth-path/index.d.ts +1 -1
- package/dist/custom-auth-path/index.d.ts.map +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 +12 -12
- package/dist/custom-auth-path/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/dist/custom-auth-path/interaction_client/PlatformAuthInteractionClient.mjs +39 -26
- 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 +6 -2
- 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 +6 -2
- package/dist/custom-auth-path/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/custom-auth-path/interaction_client/SilentAuthCodeClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/SilentIframeClient.d.ts +14 -0
- package/dist/custom-auth-path/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/dist/custom-auth-path/interaction_client/SilentIframeClient.mjs +47 -5
- package/dist/custom-auth-path/interaction_client/SilentIframeClient.mjs.map +1 -1
- package/dist/custom-auth-path/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/StandardInteractionClient.mjs +1 -1
- package/dist/custom-auth-path/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/custom-auth-path/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/custom-auth-path/log-strings-mapping.json +67 -15
- 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 +5 -1
- package/dist/custom-auth-path/protocol/Authorize.mjs.map +1 -1
- package/dist/custom-auth-path/redirect_bridge/index.d.ts.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/BrowserPerformanceClient.d.ts +1 -0
- package/dist/custom-auth-path/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
- package/dist/custom-auth-path/telemetry/BrowserPerformanceEvents.d.ts +6 -0
- package/dist/custom-auth-path/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
- package/dist/custom-auth-path/telemetry/BrowserPerformanceEvents.mjs +9 -3
- package/dist/custom-auth-path/telemetry/BrowserPerformanceEvents.mjs.map +1 -1
- package/dist/custom-auth-path/telemetry/BrowserRootPerformanceEvents.d.ts +6 -0
- package/dist/custom-auth-path/telemetry/BrowserRootPerformanceEvents.d.ts.map +1 -1
- package/dist/custom-auth-path/telemetry/BrowserRootPerformanceEvents.mjs +8 -3
- package/dist/custom-auth-path/telemetry/BrowserRootPerformanceEvents.mjs.map +1 -1
- package/dist/custom-auth-path/utils/BrowserConstants.mjs +1 -1
- package/dist/custom-auth-path/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/custom-auth-path/utils/BrowserUtils.d.ts +2 -2
- package/dist/custom-auth-path/utils/BrowserUtils.d.ts.map +1 -1
- package/dist/custom-auth-path/utils/BrowserUtils.mjs +27 -3
- package/dist/custom-auth-path/utils/BrowserUtils.mjs.map +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/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.d.ts.map +1 -1
- package/dist/error/NativeAuthError.mjs +3 -4
- package/dist/error/NativeAuthError.mjs.map +1 -1
- package/dist/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/error/NestedAppAuthError.mjs +1 -1
- package/dist/event/EventHandler.mjs +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +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 +12 -12
- package/dist/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs +39 -26
- 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 +6 -2
- 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 +6 -2
- package/dist/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/interaction_client/SilentIframeClient.d.ts +14 -0
- package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +47 -5
- package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/log-strings-mapping.json +75 -23
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/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 +5 -1
- package/dist/protocol/Authorize.mjs.map +1 -1
- package/dist/redirect-bridge/broker/nativeBroker/PlatformAuthProvider.d.ts +1 -1
- package/dist/redirect-bridge/cache/CacheKeys.d.ts +1 -0
- package/dist/redirect-bridge/cache/CacheKeys.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.d.ts +20 -1
- package/dist/redirect-bridge/config/Configuration.d.ts.map +1 -1
- package/dist/redirect-bridge/config/Configuration.mjs +1 -1
- package/dist/redirect-bridge/controllers/StandardController.d.ts +20 -2
- 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/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/error/NativeAuthError.d.ts.map +1 -1
- package/dist/redirect-bridge/index.d.ts +1 -1
- package/dist/redirect-bridge/index.d.ts.map +1 -1
- package/dist/redirect-bridge/interaction_client/PlatformAuthInteractionClient.d.ts +12 -12
- 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/SilentIframeClient.d.ts +14 -0
- package/dist/redirect-bridge/interaction_client/SilentIframeClient.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.d.ts.map +1 -1
- package/dist/redirect-bridge/redirect_bridge/index.mjs +11 -7
- package/dist/redirect-bridge/redirect_bridge/index.mjs.map +1 -1
- package/dist/redirect-bridge/telemetry/BrowserPerformanceClient.d.ts +1 -0
- package/dist/redirect-bridge/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
- package/dist/redirect-bridge/telemetry/BrowserPerformanceEvents.d.ts +6 -0
- package/dist/redirect-bridge/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
- package/dist/redirect-bridge/telemetry/BrowserRootPerformanceEvents.d.ts +6 -0
- package/dist/redirect-bridge/telemetry/BrowserRootPerformanceEvents.d.ts.map +1 -1
- package/dist/redirect-bridge/utils/BrowserConstants.mjs +7 -3
- package/dist/redirect-bridge/utils/BrowserConstants.mjs.map +1 -1
- package/dist/redirect-bridge/utils/BrowserUtils.d.ts +2 -2
- package/dist/redirect-bridge/utils/BrowserUtils.d.ts.map +1 -1
- package/dist/redirect-bridge/utils/BrowserUtils.mjs +1 -1
- package/dist/redirect-bridge/utils/BrowserUtils.mjs.map +1 -1
- package/dist/redirect_bridge/index.d.ts.map +1 -1
- package/dist/request/RequestHelpers.mjs +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceClient.d.ts +1 -0
- package/dist/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +6 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs.map +1 -1
- package/dist/telemetry/BrowserPerformanceEvents.d.ts +6 -0
- package/dist/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
- package/dist/telemetry/BrowserPerformanceEvents.mjs +9 -3
- package/dist/telemetry/BrowserPerformanceEvents.mjs.map +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/telemetry/BrowserRootPerformanceEvents.d.ts +6 -0
- package/dist/telemetry/BrowserRootPerformanceEvents.d.ts.map +1 -1
- package/dist/telemetry/BrowserRootPerformanceEvents.mjs +10 -3
- package/dist/telemetry/BrowserRootPerformanceEvents.mjs.map +1 -1
- package/dist/utils/BrowserConstants.mjs +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.d.ts +2 -2
- package/dist/utils/BrowserUtils.d.ts.map +1 -1
- package/dist/utils/BrowserUtils.mjs +27 -3
- package/dist/utils/BrowserUtils.mjs.map +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 +67 -15
- package/lib/custom-auth-path/msal-custom-auth.cjs +897 -617
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/types/broker/nativeBroker/PlatformAuthProvider.d.ts +1 -1
- package/lib/custom-auth-path/types/cache/CacheKeys.d.ts +1 -0
- package/lib/custom-auth-path/types/cache/CacheKeys.d.ts.map +1 -1
- package/lib/custom-auth-path/types/cache/TokenCache.d.ts.map +1 -1
- package/lib/custom-auth-path/types/config/Configuration.d.ts +20 -1
- package/lib/custom-auth-path/types/config/Configuration.d.ts.map +1 -1
- package/lib/custom-auth-path/types/controllers/StandardController.d.ts +20 -2
- 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/error/NativeAuthError.d.ts.map +1 -1
- package/lib/custom-auth-path/types/index.d.ts +1 -1
- package/lib/custom-auth-path/types/index.d.ts.map +1 -1
- package/lib/custom-auth-path/types/interaction_client/PlatformAuthInteractionClient.d.ts +12 -12
- 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/SilentIframeClient.d.ts +14 -0
- package/lib/custom-auth-path/types/interaction_client/SilentIframeClient.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/redirect_bridge/index.d.ts.map +1 -1
- package/lib/custom-auth-path/types/telemetry/BrowserPerformanceClient.d.ts +1 -0
- package/lib/custom-auth-path/types/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
- package/lib/custom-auth-path/types/telemetry/BrowserPerformanceEvents.d.ts +6 -0
- package/lib/custom-auth-path/types/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
- package/lib/custom-auth-path/types/telemetry/BrowserRootPerformanceEvents.d.ts +6 -0
- package/lib/custom-auth-path/types/telemetry/BrowserRootPerformanceEvents.d.ts.map +1 -1
- package/lib/custom-auth-path/types/utils/BrowserUtils.d.ts +2 -2
- package/lib/custom-auth-path/types/utils/BrowserUtils.d.ts.map +1 -1
- package/lib/log-strings-mapping.json +75 -23
- package/lib/msal-browser.cjs +1045 -755
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +1045 -755
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +2 -2
- package/lib/redirect-bridge/msal-redirect-bridge.js +24 -16
- package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.min.js +2 -2
- package/lib/types/broker/nativeBroker/PlatformAuthProvider.d.ts +1 -1
- package/lib/types/cache/CacheKeys.d.ts +1 -0
- package/lib/types/cache/CacheKeys.d.ts.map +1 -1
- package/lib/types/cache/TokenCache.d.ts.map +1 -1
- package/lib/types/config/Configuration.d.ts +20 -1
- package/lib/types/config/Configuration.d.ts.map +1 -1
- package/lib/types/controllers/StandardController.d.ts +20 -2
- package/lib/types/controllers/StandardController.d.ts.map +1 -1
- package/lib/types/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/lib/types/error/NativeAuthError.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/interaction_client/PlatformAuthInteractionClient.d.ts +12 -12
- 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/SilentIframeClient.d.ts +14 -0
- package/lib/types/interaction_client/SilentIframeClient.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/redirect_bridge/index.d.ts.map +1 -1
- package/lib/types/telemetry/BrowserPerformanceClient.d.ts +1 -0
- package/lib/types/telemetry/BrowserPerformanceClient.d.ts.map +1 -1
- package/lib/types/telemetry/BrowserPerformanceEvents.d.ts +6 -0
- package/lib/types/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
- package/lib/types/telemetry/BrowserRootPerformanceEvents.d.ts +6 -0
- package/lib/types/telemetry/BrowserRootPerformanceEvents.d.ts.map +1 -1
- package/lib/types/utils/BrowserUtils.d.ts +2 -2
- package/lib/types/utils/BrowserUtils.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/broker/nativeBroker/PlatformAuthProvider.ts +1 -1
- package/src/cache/CacheKeys.ts +1 -0
- package/src/cache/TokenCache.ts +27 -24
- package/src/config/Configuration.ts +30 -0
- package/src/controllers/StandardController.ts +316 -69
- package/src/error/NativeAuthError.ts +1 -2
- package/src/index.ts +1 -0
- package/src/interaction_client/PlatformAuthInteractionClient.ts +99 -76
- package/src/interaction_client/PopupClient.ts +10 -0
- package/src/interaction_client/RedirectClient.ts +10 -0
- package/src/interaction_client/SilentIframeClient.ts +127 -22
- package/src/packageMetadata.ts +1 -1
- package/src/protocol/Authorize.ts +8 -0
- package/src/redirect_bridge/index.ts +12 -5
- package/src/telemetry/BrowserPerformanceClient.ts +6 -0
- package/src/telemetry/BrowserPerformanceEvents.ts +9 -0
- package/src/telemetry/BrowserRootPerformanceEvents.ts +7 -0
- package/src/utils/BrowserUtils.ts +36 -4
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.7.0 2026-04-16 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { CryptoOps } from '../crypto/CryptoOps.mjs';
|
|
4
4
|
import { DEFAULT_CRYPTO_IMPLEMENTATION, buildStaticAuthorityOptions, invokeAsync, enforceResourceParameter, InteractionRequiredAuthError, createClientAuthError, ClientAuthErrorCodes, AccountEntityUtils, AuthToken, Constants, AuthError, getRequestThumbprint, InteractionRequiredAuthErrorCodes } from '@azure/msal-common/browser';
|
|
5
|
-
import { InitializeCache, HandleNativeRedirectPromiseMeasurement, HandleRedirectPromiseMeasurement, AcquireTokenByCodeAsync, SilentCacheClientAcquireToken, SilentRefreshClientAcquireToken, SilentIframeClientAcquireToken, AcquireTokenSilentAsync, InitializeSilentRequest, AcquireTokenBySilentIframe, AwaitConcurrentIframe, AcquireTokenFromCache, AcquireTokenByRefreshToken, GeneratePkceCodes } from '../telemetry/BrowserPerformanceEvents.mjs';
|
|
6
|
-
import { InitializeClientApplication, AcquireTokenRedirect, AcquireTokenPreRedirect, AcquireTokenPopup, SsoSilent, AcquireTokenByCode, AcquireTokenSilent } from '../telemetry/BrowserRootPerformanceEvents.mjs';
|
|
5
|
+
import { InitializeCache, HandleNativeRedirectPromiseMeasurement, HandleRedirectPromiseMeasurement, NativeInteractionClientAcquireTokenRedirect, AcquireTokenByCodeAsync, SilentCacheClientAcquireToken, SilentRefreshClientAcquireToken, SilentIframeClientAcquireToken, NativeInteractionClientAcquireToken, AcquireTokenSilentAsync, InitializeSilentRequest, AcquireTokenBySilentIframe, AwaitConcurrentIframe, AcquireTokenFromCache, AcquireTokenByRefreshToken, GeneratePkceCodes } from '../telemetry/BrowserPerformanceEvents.mjs';
|
|
6
|
+
import { InitializeClientApplication, AcquireTokenRedirect, AcquireTokenPreRedirect, AcquireTokenPopup, SsoCapable, SsoSilent, AcquireTokenByCode, AcquireTokenSilent } from '../telemetry/BrowserRootPerformanceEvents.mjs';
|
|
7
7
|
import { BrowserCacheManager, DEFAULT_BROWSER_CACHE_MANAGER } from '../cache/BrowserCacheManager.mjs';
|
|
8
|
+
import { SSO_CAPABLE } from '../cache/CacheKeys.mjs';
|
|
8
9
|
import { getAllAccounts, getAccount, setActiveAccount, getActiveAccount } from '../cache/AccountManager.mjs';
|
|
9
10
|
import { BrowserCacheLocation, INTERACTION_TYPE, InteractionType, ApiId, CacheLookupPolicy, DEFAULT_REQUEST, iFrameRenewalPolicies, BrowserConstants } from '../utils/BrowserConstants.mjs';
|
|
10
11
|
import { blockAPICallsBeforeInitialize, redirectPreflightCheck, preflightCheck as preflightCheck$1, blockNonBrowserEnvironment } from '../utils/BrowserUtils.mjs';
|
|
@@ -98,22 +99,32 @@ class StandardController {
|
|
|
98
99
|
this.nativeInternalStorage = new BrowserCacheManager(this.config.auth.clientId, nativeCacheOptions, this.browserCrypto, this.logger, this.performanceClient, this.eventHandler);
|
|
99
100
|
this.activeSilentTokenRequests = new Map();
|
|
100
101
|
// Register listener functions
|
|
101
|
-
this.
|
|
102
|
+
this.trackStateChange = this.trackStateChange.bind(this);
|
|
102
103
|
// Register listener functions
|
|
103
|
-
this.
|
|
104
|
-
this.
|
|
104
|
+
this.trackStateChangeWithMeasurement =
|
|
105
|
+
this.trackStateChangeWithMeasurement.bind(this);
|
|
105
106
|
}
|
|
106
107
|
static async createController(operatingContext, request) {
|
|
107
108
|
const controller = new StandardController(operatingContext);
|
|
108
109
|
await controller.initialize(request);
|
|
109
110
|
return controller;
|
|
110
111
|
}
|
|
111
|
-
|
|
112
|
+
trackStateChange(correlationId, event) {
|
|
112
113
|
if (!correlationId) {
|
|
113
114
|
return;
|
|
114
115
|
}
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
if (event.type === "visibilitychange") {
|
|
117
|
+
this.logger.info("16v6hv", correlationId);
|
|
118
|
+
this.performanceClient.incrementFields({ visibilityChangeCount: 1 }, correlationId);
|
|
119
|
+
}
|
|
120
|
+
else if (event.type === "online") {
|
|
121
|
+
this.logger.info("0zirfd", correlationId);
|
|
122
|
+
this.performanceClient.incrementFields({ onlineStatusChangeCount: 1 }, correlationId);
|
|
123
|
+
}
|
|
124
|
+
else if (event.type === "offline") {
|
|
125
|
+
this.logger.info("1xk9ef", correlationId);
|
|
126
|
+
this.performanceClient.incrementFields({ onlineStatusChangeCount: 1 }, correlationId);
|
|
127
|
+
}
|
|
117
128
|
}
|
|
118
129
|
/**
|
|
119
130
|
* Initializer function to perform async startup tasks such as connecting to WAM extension
|
|
@@ -213,22 +224,25 @@ class StandardController {
|
|
|
213
224
|
}
|
|
214
225
|
const loggedInAccounts = this.getAllAccounts();
|
|
215
226
|
const platformBrokerRequest = this.browserStorage.getCachedNativeRequest();
|
|
216
|
-
const useNative = platformBrokerRequest &&
|
|
217
|
-
this.platformAuthProvider &&
|
|
218
|
-
!options?.hash;
|
|
227
|
+
const useNative = platformBrokerRequest && !options?.hash;
|
|
219
228
|
let rootMeasurement;
|
|
220
229
|
let redirectResponse;
|
|
230
|
+
let cachedRedirectRequest;
|
|
221
231
|
try {
|
|
222
232
|
if (useNative && this.platformAuthProvider) {
|
|
223
233
|
const correlationId = platformBrokerRequest?.correlationId || "";
|
|
224
234
|
this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_START, correlationId, InteractionType.Redirect);
|
|
225
235
|
rootMeasurement = this.performanceClient.startMeasurement(AcquireTokenRedirect, correlationId);
|
|
226
236
|
this.logger.trace("12v7is", correlationId);
|
|
237
|
+
rootMeasurement.add({
|
|
238
|
+
isPlatformBrokerRequest: true,
|
|
239
|
+
});
|
|
227
240
|
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);
|
|
228
|
-
redirectResponse = invokeAsync(nativeClient.handleRedirectPromise.bind(nativeClient), HandleNativeRedirectPromiseMeasurement, this.logger, this.performanceClient, rootMeasurement.event.correlationId)(
|
|
241
|
+
redirectResponse = invokeAsync(nativeClient.handleRedirectPromise.bind(nativeClient), HandleNativeRedirectPromiseMeasurement, this.logger, this.performanceClient, rootMeasurement.event.correlationId)();
|
|
229
242
|
}
|
|
230
243
|
else {
|
|
231
244
|
const [standardRequest, codeVerifier] = this.browserStorage.getCachedRequest("");
|
|
245
|
+
cachedRedirectRequest = standardRequest;
|
|
232
246
|
const correlationId = standardRequest.correlationId;
|
|
233
247
|
this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_START, correlationId, InteractionType.Redirect);
|
|
234
248
|
// Reset rootMeasurement now that we have correlationId
|
|
@@ -257,6 +271,8 @@ class StandardController {
|
|
|
257
271
|
rootMeasurement.end({
|
|
258
272
|
success: true,
|
|
259
273
|
}, undefined, result.account);
|
|
274
|
+
// Fire-and-forget SSO capability verification in background
|
|
275
|
+
this.verifySsoCapability(cachedRedirectRequest, InteractionType.Redirect);
|
|
260
276
|
}
|
|
261
277
|
else {
|
|
262
278
|
/*
|
|
@@ -322,12 +338,14 @@ class StandardController {
|
|
|
322
338
|
if (this.platformAuthProvider &&
|
|
323
339
|
this.canUsePlatformBroker(request)) {
|
|
324
340
|
const nativeClient = new PlatformAuthInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.acquireTokenRedirect, this.performanceClient, this.platformAuthProvider, this.getNativeAccountId(request), this.nativeInternalStorage, correlationId);
|
|
325
|
-
result = nativeClient
|
|
326
|
-
.
|
|
327
|
-
|
|
341
|
+
result = invokeAsync(nativeClient.acquireTokenRedirect.bind(nativeClient), NativeInteractionClientAcquireTokenRedirect, this.logger, this.performanceClient, correlationId)(request, atrMeasurement).catch((e) => {
|
|
342
|
+
atrMeasurement.add({
|
|
343
|
+
brokerErrorName: e.name,
|
|
344
|
+
brokerErrorCode: e.errorCode,
|
|
345
|
+
});
|
|
328
346
|
if (e instanceof NativeAuthError &&
|
|
329
347
|
isFatalNativeAuthError(e)) {
|
|
330
|
-
this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt
|
|
348
|
+
this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt platform broker calls
|
|
331
349
|
const redirectClient = this.createRedirectClient(correlationId);
|
|
332
350
|
return redirectClient.acquireToken(request);
|
|
333
351
|
}
|
|
@@ -393,6 +411,9 @@ class StandardController {
|
|
|
393
411
|
let result;
|
|
394
412
|
const pkce = this.getPreGeneratedPkceCodes(correlationId);
|
|
395
413
|
if (this.canUsePlatformBroker(request)) {
|
|
414
|
+
atPopupMeasurement.add({
|
|
415
|
+
isPlatformBrokerRequest: true,
|
|
416
|
+
});
|
|
396
417
|
result = this.acquireTokenNative({
|
|
397
418
|
...request,
|
|
398
419
|
correlationId,
|
|
@@ -405,9 +426,13 @@ class StandardController {
|
|
|
405
426
|
return response;
|
|
406
427
|
})
|
|
407
428
|
.catch((e) => {
|
|
429
|
+
atPopupMeasurement.add({
|
|
430
|
+
brokerErrorName: e.name,
|
|
431
|
+
brokerErrorCode: e.errorCode,
|
|
432
|
+
});
|
|
408
433
|
if (e instanceof NativeAuthError &&
|
|
409
434
|
isFatalNativeAuthError(e)) {
|
|
410
|
-
this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt
|
|
435
|
+
this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt platform broker calls
|
|
411
436
|
const popupClient = this.createPopupClient(correlationId);
|
|
412
437
|
return popupClient.acquireToken(request, pkce);
|
|
413
438
|
}
|
|
@@ -438,6 +463,8 @@ class StandardController {
|
|
|
438
463
|
accessTokenSize: result.accessToken.length,
|
|
439
464
|
idTokenSize: result.idToken.length,
|
|
440
465
|
}, undefined, result.account);
|
|
466
|
+
// SSO capability verification in background
|
|
467
|
+
this.verifySsoCapability(request, InteractionType.Popup);
|
|
441
468
|
return result;
|
|
442
469
|
})
|
|
443
470
|
.catch((e) => {
|
|
@@ -455,15 +482,137 @@ class StandardController {
|
|
|
455
482
|
}
|
|
456
483
|
});
|
|
457
484
|
}
|
|
458
|
-
|
|
485
|
+
trackStateChangeWithMeasurement(event) {
|
|
459
486
|
const measurement = this.ssoSilentMeasurement ||
|
|
460
487
|
this.acquireTokenByCodeAsyncMeasurement;
|
|
461
488
|
if (!measurement) {
|
|
462
489
|
return;
|
|
463
490
|
}
|
|
464
|
-
|
|
465
|
-
|
|
491
|
+
if (event.type === "visibilitychange") {
|
|
492
|
+
this.logger.info("0yzimq", measurement.event.correlationId);
|
|
493
|
+
measurement.increment({
|
|
494
|
+
visibilityChangeCount: 1,
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
else if (event.type === "online") {
|
|
498
|
+
this.logger.info("1caf53", measurement.event.correlationId);
|
|
499
|
+
measurement.increment({
|
|
500
|
+
onlineStatusChangeCount: 1,
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
else if (event.type === "offline") {
|
|
504
|
+
this.logger.info("0fdyk7", measurement.event.correlationId);
|
|
505
|
+
measurement.increment({
|
|
506
|
+
onlineStatusChangeCount: 1,
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
addStateChangeListeners(listener) {
|
|
511
|
+
document.addEventListener("visibilitychange", listener);
|
|
512
|
+
window.addEventListener("online", listener);
|
|
513
|
+
window.addEventListener("offline", listener);
|
|
514
|
+
}
|
|
515
|
+
removeStateChangeListeners(listener) {
|
|
516
|
+
document.removeEventListener("visibilitychange", listener);
|
|
517
|
+
window.removeEventListener("online", listener);
|
|
518
|
+
window.removeEventListener("offline", listener);
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Reads the cached ssoCapable value from localStorage.
|
|
522
|
+
* @returns The cached ssoCapable boolean value, or undefined if not cached or expired.
|
|
523
|
+
*/
|
|
524
|
+
getCachedSsoCapable() {
|
|
525
|
+
try {
|
|
526
|
+
const cachedValue = window.localStorage.getItem(SSO_CAPABLE);
|
|
527
|
+
if (cachedValue) {
|
|
528
|
+
const parsed = JSON.parse(cachedValue);
|
|
529
|
+
if (parsed &&
|
|
530
|
+
typeof parsed.ssoCapable === "boolean" &&
|
|
531
|
+
parsed.expiresOn &&
|
|
532
|
+
Date.now() < parsed.expiresOn) {
|
|
533
|
+
return parsed.ssoCapable;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
catch {
|
|
538
|
+
// If parsing fails, return undefined
|
|
539
|
+
}
|
|
540
|
+
return undefined;
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* SSO capability verification in the background.
|
|
544
|
+
* This method makes an iframe request to /authorize to verify SSO capability without calling /token.
|
|
545
|
+
* This method does not block the caller and tracks telemetry for success/failure.
|
|
546
|
+
* This method only executes if verifySSO is set to true in the auth configuration.
|
|
547
|
+
* The result is cached in localStorage with a 24-hour TTL; the SSO verification call
|
|
548
|
+
* is only attempted when the cached value is absent or expired.
|
|
549
|
+
* @param request - The original request used for the authentication flow
|
|
550
|
+
* @param interactionType - The interactionType of the AT operation for logging purposes
|
|
551
|
+
*/
|
|
552
|
+
verifySsoCapability(request, interactionType) {
|
|
553
|
+
// Check if SSO capability verification is enabled
|
|
554
|
+
if (!this.config.auth.verifySSO) {
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
// Check TTL: derive ssoCapable state from localStorage and skip if not expired
|
|
558
|
+
const ssoCacheKey = SSO_CAPABLE;
|
|
559
|
+
const SSO_CAPABLE_TTL_MS = 24 * 60 * 60 * 1000; // 24 hours
|
|
560
|
+
const cachedSsoCapable = this.getCachedSsoCapable();
|
|
561
|
+
if (cachedSsoCapable !== undefined) {
|
|
562
|
+
this.logger.verbose("13poou", "");
|
|
563
|
+
return;
|
|
564
|
+
}
|
|
565
|
+
const correlationId = createNewGuid();
|
|
566
|
+
const ssoCapableMeasurement = this.performanceClient.startMeasurement(SsoCapable, correlationId);
|
|
567
|
+
ssoCapableMeasurement.add({
|
|
568
|
+
"ext.interactionType": interactionType,
|
|
466
569
|
});
|
|
570
|
+
this.logger.verbose("0pbr0i", correlationId);
|
|
571
|
+
/*
|
|
572
|
+
* Use setTimeout to ensure this runs in a separate macrotask after the current call stack completes
|
|
573
|
+
* This ensures the result is returned to the caller before the SSO verification starts and doesn't affect performance
|
|
574
|
+
*/
|
|
575
|
+
setTimeout(() => {
|
|
576
|
+
const ssoVerificationRequest = {
|
|
577
|
+
...request,
|
|
578
|
+
correlationId: correlationId,
|
|
579
|
+
};
|
|
580
|
+
const silentIframeClient = this.createSilentIframeClient(correlationId);
|
|
581
|
+
silentIframeClient
|
|
582
|
+
.verifySso(ssoVerificationRequest)
|
|
583
|
+
.then((result) => {
|
|
584
|
+
this.logger.verbose("1gd1iv", correlationId);
|
|
585
|
+
// TBD to add profileTelemetry later in localStorage with 24h TTL
|
|
586
|
+
try {
|
|
587
|
+
const cacheEntry = JSON.stringify({
|
|
588
|
+
ssoCapable: result,
|
|
589
|
+
expiresOn: Date.now() + SSO_CAPABLE_TTL_MS,
|
|
590
|
+
});
|
|
591
|
+
window.localStorage.setItem(ssoCacheKey, cacheEntry);
|
|
592
|
+
}
|
|
593
|
+
catch {
|
|
594
|
+
this.logger.warning("18lmoj", correlationId);
|
|
595
|
+
}
|
|
596
|
+
ssoCapableMeasurement.end({
|
|
597
|
+
fromCache: false,
|
|
598
|
+
success: result,
|
|
599
|
+
}, undefined);
|
|
600
|
+
})
|
|
601
|
+
.catch((error) => {
|
|
602
|
+
this.logger.warning("05g83w", correlationId);
|
|
603
|
+
// reset the cache
|
|
604
|
+
try {
|
|
605
|
+
window.localStorage.removeItem(ssoCacheKey);
|
|
606
|
+
}
|
|
607
|
+
catch {
|
|
608
|
+
this.logger.warning("0nlf9q", correlationId);
|
|
609
|
+
}
|
|
610
|
+
ssoCapableMeasurement.end({
|
|
611
|
+
fromCache: false,
|
|
612
|
+
success: false,
|
|
613
|
+
}, error);
|
|
614
|
+
});
|
|
615
|
+
}, 0);
|
|
467
616
|
}
|
|
468
617
|
// #endregion
|
|
469
618
|
// #region Silent Flow
|
|
@@ -486,28 +635,35 @@ class StandardController {
|
|
|
486
635
|
const correlationId = this.getRequestCorrelationId(request);
|
|
487
636
|
const validRequest = {
|
|
488
637
|
...request,
|
|
489
|
-
// will be PromptValue.NONE or PromptValue.NO_SESSION
|
|
490
|
-
prompt: request.prompt,
|
|
491
638
|
correlationId: correlationId,
|
|
492
639
|
};
|
|
493
640
|
this.ssoSilentMeasurement = this.performanceClient.startMeasurement(SsoSilent, correlationId);
|
|
494
641
|
this.ssoSilentMeasurement?.add({
|
|
495
642
|
scenarioId: request.scenarioId,
|
|
643
|
+
ssoCapable: this.getCachedSsoCapable(),
|
|
496
644
|
});
|
|
497
645
|
preflightCheck(this.initialized, this.ssoSilentMeasurement, this.config, validRequest);
|
|
498
646
|
this.ssoSilentMeasurement?.increment({
|
|
499
647
|
visibilityChangeCount: 0,
|
|
648
|
+
onlineStatusChangeCount: 0,
|
|
500
649
|
});
|
|
501
|
-
|
|
650
|
+
this.addStateChangeListeners(this.trackStateChangeWithMeasurement);
|
|
502
651
|
const loggedInAccounts = this.getAllAccounts();
|
|
503
652
|
this.logger.verbose("0w1b45", correlationId);
|
|
504
653
|
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, correlationId, InteractionType.Silent, validRequest);
|
|
505
654
|
let result;
|
|
506
655
|
if (this.canUsePlatformBroker(validRequest)) {
|
|
656
|
+
this.ssoSilentMeasurement?.add({
|
|
657
|
+
isPlatformBrokerRequest: true,
|
|
658
|
+
});
|
|
507
659
|
result = this.acquireTokenNative(validRequest, ApiId.ssoSilent).catch((e) => {
|
|
660
|
+
this.ssoSilentMeasurement?.add({
|
|
661
|
+
brokerErrorName: e.name,
|
|
662
|
+
brokerErrorCode: e.errorCode,
|
|
663
|
+
});
|
|
508
664
|
// If native token acquisition fails for availability reasons fallback to standard flow
|
|
509
665
|
if (e instanceof NativeAuthError && isFatalNativeAuthError(e)) {
|
|
510
|
-
this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt
|
|
666
|
+
this.platformAuthProvider = undefined; // If extension gets uninstalled during session prevent future requests from continuing to attempt platform broker calls
|
|
511
667
|
const silentIframeClient = this.createSilentIframeClient(validRequest.correlationId);
|
|
512
668
|
return silentIframeClient.acquireToken(validRequest);
|
|
513
669
|
}
|
|
@@ -541,7 +697,7 @@ class StandardController {
|
|
|
541
697
|
throw e;
|
|
542
698
|
})
|
|
543
699
|
.finally(() => {
|
|
544
|
-
|
|
700
|
+
this.removeStateChangeListeners(this.trackStateChangeWithMeasurement);
|
|
545
701
|
});
|
|
546
702
|
}
|
|
547
703
|
/**
|
|
@@ -580,7 +736,6 @@ class StandardController {
|
|
|
580
736
|
this.hybridAuthCodeResponses.delete(hybridAuthCode);
|
|
581
737
|
atbcMeasurement.end({
|
|
582
738
|
success: true,
|
|
583
|
-
isNativeBroker: result.fromPlatformBroker,
|
|
584
739
|
accessTokenSize: result.accessToken.length,
|
|
585
740
|
idTokenSize: result.idToken.length,
|
|
586
741
|
}, undefined, result.account);
|
|
@@ -604,10 +759,17 @@ class StandardController {
|
|
|
604
759
|
}
|
|
605
760
|
else if (request.nativeAccountId) {
|
|
606
761
|
if (this.canUsePlatformBroker(request, request.nativeAccountId)) {
|
|
762
|
+
atbcMeasurement.add({
|
|
763
|
+
isPlatformBrokerRequest: true,
|
|
764
|
+
});
|
|
607
765
|
const result = await this.acquireTokenNative({
|
|
608
766
|
...request,
|
|
609
767
|
correlationId,
|
|
610
768
|
}, ApiId.acquireTokenByCode, request.nativeAccountId).catch((e) => {
|
|
769
|
+
atbcMeasurement.add({
|
|
770
|
+
brokerErrorName: e.name,
|
|
771
|
+
brokerErrorCode: e.errorCode,
|
|
772
|
+
});
|
|
611
773
|
// If native token acquisition fails for availability reasons fallback to standard flow
|
|
612
774
|
if (e instanceof NativeAuthError &&
|
|
613
775
|
isFatalNativeAuthError(e)) {
|
|
@@ -648,8 +810,9 @@ class StandardController {
|
|
|
648
810
|
this.performanceClient.startMeasurement(AcquireTokenByCodeAsync, correlationId);
|
|
649
811
|
this.acquireTokenByCodeAsyncMeasurement?.increment({
|
|
650
812
|
visibilityChangeCount: 0,
|
|
813
|
+
onlineStatusChangeCount: 0,
|
|
651
814
|
});
|
|
652
|
-
|
|
815
|
+
this.addStateChangeListeners(this.trackStateChangeWithMeasurement);
|
|
653
816
|
const silentAuthCodeClient = this.createSilentAuthCodeClient(correlationId);
|
|
654
817
|
const silentTokenResult = await silentAuthCodeClient
|
|
655
818
|
.acquireToken(request)
|
|
@@ -657,7 +820,6 @@ class StandardController {
|
|
|
657
820
|
this.acquireTokenByCodeAsyncMeasurement?.end({
|
|
658
821
|
success: true,
|
|
659
822
|
fromCache: response.fromCache,
|
|
660
|
-
isNativeBroker: response.fromPlatformBroker,
|
|
661
823
|
});
|
|
662
824
|
return response;
|
|
663
825
|
})
|
|
@@ -668,7 +830,7 @@ class StandardController {
|
|
|
668
830
|
throw tokenRenewalError;
|
|
669
831
|
})
|
|
670
832
|
.finally(() => {
|
|
671
|
-
|
|
833
|
+
this.removeStateChangeListeners(this.trackStateChangeWithMeasurement);
|
|
672
834
|
});
|
|
673
835
|
return silentTokenResult;
|
|
674
836
|
}
|
|
@@ -826,7 +988,7 @@ class StandardController {
|
|
|
826
988
|
throw createBrowserAuthError(nativeConnectionNotEstablished);
|
|
827
989
|
}
|
|
828
990
|
const nativeClient = new PlatformAuthInteractionClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, apiId, this.performanceClient, this.platformAuthProvider, accountId || this.getNativeAccountId(request), this.nativeInternalStorage, correlationId);
|
|
829
|
-
return nativeClient.acquireToken(request, cacheLookupPolicy);
|
|
991
|
+
return invokeAsync(nativeClient.acquireToken.bind(nativeClient), NativeInteractionClientAcquireToken, this.logger, this.performanceClient, correlationId)(request, cacheLookupPolicy);
|
|
830
992
|
}
|
|
831
993
|
/**
|
|
832
994
|
* Returns boolean indicating if this request can use the platform broker
|
|
@@ -840,7 +1002,7 @@ class StandardController {
|
|
|
840
1002
|
return false;
|
|
841
1003
|
}
|
|
842
1004
|
if (!isPlatformAuthAllowed(this.config, this.logger, correlationId, this.platformAuthProvider, request.authenticationScheme)) {
|
|
843
|
-
this.logger.trace("
|
|
1005
|
+
this.logger.trace("0yoy1g", correlationId);
|
|
844
1006
|
return false;
|
|
845
1007
|
}
|
|
846
1008
|
if (request.prompt) {
|
|
@@ -1059,6 +1221,7 @@ class StandardController {
|
|
|
1059
1221
|
atsMeasurement.add({
|
|
1060
1222
|
cacheLookupPolicy: request.cacheLookupPolicy,
|
|
1061
1223
|
scenarioId: request.scenarioId,
|
|
1224
|
+
ssoCapable: this.getCachedSsoCapable(),
|
|
1062
1225
|
});
|
|
1063
1226
|
preflightCheck(this.initialized, atsMeasurement, this.config, request);
|
|
1064
1227
|
this.logger.verbose("0x1c4s", correlationId);
|
|
@@ -1071,7 +1234,6 @@ class StandardController {
|
|
|
1071
1234
|
atsMeasurement.end({
|
|
1072
1235
|
success: true,
|
|
1073
1236
|
fromCache: result.fromCache,
|
|
1074
|
-
isNativeBroker: result.fromPlatformBroker,
|
|
1075
1237
|
accessTokenSize: result.accessToken.length,
|
|
1076
1238
|
idTokenSize: result.idToken.length,
|
|
1077
1239
|
}, undefined, result.account);
|
|
@@ -1132,12 +1294,12 @@ class StandardController {
|
|
|
1132
1294
|
* @returns {Promise.<AuthenticationResult>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse}
|
|
1133
1295
|
*/
|
|
1134
1296
|
async acquireTokenSilentAsync(request, account) {
|
|
1135
|
-
const
|
|
1297
|
+
const trackStateChange = (event) => this.trackStateChange(request.correlationId, event);
|
|
1136
1298
|
this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, request.correlationId, InteractionType.Silent, request);
|
|
1137
1299
|
if (request.correlationId) {
|
|
1138
|
-
this.performanceClient.incrementFields({ visibilityChangeCount: 0 }, request.correlationId);
|
|
1300
|
+
this.performanceClient.incrementFields({ visibilityChangeCount: 0, onlineStatusChangeCount: 0 }, request.correlationId);
|
|
1139
1301
|
}
|
|
1140
|
-
|
|
1302
|
+
this.addStateChangeListeners(trackStateChange);
|
|
1141
1303
|
const silentRequest = await invokeAsync(initializeSilentRequest, InitializeSilentRequest, this.logger, this.performanceClient, request.correlationId)(request, account, this.config, this.performanceClient, this.logger);
|
|
1142
1304
|
const cacheLookupPolicy = request.cacheLookupPolicy || CacheLookupPolicy.Default;
|
|
1143
1305
|
const result = this.acquireTokenSilentNoIframe(silentRequest, cacheLookupPolicy).catch(async (refreshTokenError) => {
|
|
@@ -1219,7 +1381,7 @@ class StandardController {
|
|
|
1219
1381
|
throw tokenRenewalError;
|
|
1220
1382
|
})
|
|
1221
1383
|
.finally(() => {
|
|
1222
|
-
|
|
1384
|
+
this.removeStateChangeListeners(trackStateChange);
|
|
1223
1385
|
});
|
|
1224
1386
|
}
|
|
1225
1387
|
/**
|
|
@@ -1233,7 +1395,12 @@ class StandardController {
|
|
|
1233
1395
|
if (isPlatformAuthAllowed(this.config, this.logger, silentRequest.correlationId, this.platformAuthProvider, silentRequest.authenticationScheme) &&
|
|
1234
1396
|
silentRequest.account.nativeAccountId) {
|
|
1235
1397
|
this.logger.verbose("0sczo4", silentRequest.correlationId);
|
|
1398
|
+
this.performanceClient.addFields({ isPlatformBrokerRequest: true }, silentRequest.correlationId);
|
|
1236
1399
|
return this.acquireTokenNative(silentRequest, ApiId.acquireTokenSilent_silentFlow, silentRequest.account.nativeAccountId, cacheLookupPolicy).catch(async (e) => {
|
|
1400
|
+
this.performanceClient.addFields({
|
|
1401
|
+
brokerErrorName: e.name,
|
|
1402
|
+
brokerErrorCode: e.errorCode,
|
|
1403
|
+
}, silentRequest.correlationId);
|
|
1237
1404
|
// If native token acquisition fails for availability reasons fallback to web flow
|
|
1238
1405
|
if (e instanceof NativeAuthError && isFatalNativeAuthError(e)) {
|
|
1239
1406
|
this.logger.verbose("07rkmb", silentRequest.correlationId);
|