@azure/msal-browser 4.27.0 → 4.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientNext.mjs +1 -1
- package/dist/broker/nativeBroker/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 +3 -3
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.mjs +12 -8
- 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 +3 -2
- package/dist/cache/TokenCache.d.ts.map +1 -1
- package/dist/cache/TokenCache.mjs +50 -35
- package/dist/cache/TokenCache.mjs.map +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/controllers/ControllerFactory.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +3 -3
- package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
- package/dist/controllers/StandardController.d.ts.map +1 -1
- package/dist/controllers/StandardController.mjs +3 -3
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/controllers/UnknownOperatingContextController.mjs +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 +3 -3
- package/dist/custom-auth-path/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/custom-auth-path/cache/BrowserCacheManager.mjs +12 -8
- 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 +3 -2
- package/dist/custom-auth-path/cache/TokenCache.d.ts.map +1 -1
- package/dist/custom-auth-path/cache/TokenCache.mjs +50 -35
- package/dist/custom-auth-path/cache/TokenCache.mjs.map +1 -1
- package/dist/custom-auth-path/config/Configuration.mjs +1 -1
- package/dist/custom-auth-path/controllers/ControllerFactory.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 +3 -3
- 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 +2 -2
- 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 +2 -2
- 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 +6 -6
- 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.mjs +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.mjs +1 -1
- package/dist/custom-auth-path/interaction_client/RedirectClient.mjs +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/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 +3 -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/utils/BrowserConstants.d.ts +20 -1
- package/dist/custom-auth-path/utils/BrowserConstants.d.ts.map +1 -1
- package/dist/custom-auth-path/utils/BrowserConstants.mjs +27 -3
- 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.mjs +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/PlatformAuthInteractionClient.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.mjs +1 -1
- package/dist/interaction_client/RedirectClient.mjs +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/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/protocol/Authorize.d.ts.map +1 -1
- package/dist/protocol/Authorize.mjs +3 -3
- package/dist/protocol/Authorize.mjs.map +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/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/utils/BrowserConstants.d.ts +20 -1
- package/dist/utils/BrowserConstants.d.ts.map +1 -1
- package/dist/utils/BrowserConstants.mjs +27 -3
- 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/msal-custom-auth.cjs +227 -153
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +22632 -0
- package/lib/custom-auth-path/msal-custom-auth.js.map +1 -0
- package/lib/custom-auth-path/types/cache/BrowserCacheManager.d.ts +3 -3
- package/lib/custom-auth-path/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/lib/custom-auth-path/types/cache/TokenCache.d.ts +3 -2
- 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/interaction_client/PlatformAuthInteractionClient.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/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 -1
- package/lib/custom-auth-path/types/utils/BrowserConstants.d.ts.map +1 -1
- package/lib/msal-browser.cjs +220 -146
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +220 -146
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +63 -63
- package/lib/types/cache/BrowserCacheManager.d.ts +3 -3
- package/lib/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/lib/types/cache/TokenCache.d.ts +3 -2
- 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/interaction_client/PlatformAuthInteractionClient.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/packageMetadata.d.ts +1 -1
- package/lib/types/protocol/Authorize.d.ts.map +1 -1
- package/lib/types/utils/BrowserConstants.d.ts +20 -1
- package/lib/types/utils/BrowserConstants.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/cache/BrowserCacheManager.ts +19 -5
- package/src/cache/TokenCache.ts +142 -80
- package/src/controllers/NestedAppAuthController.ts +2 -1
- package/src/controllers/StandardController.ts +4 -2
- 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/interaction_client/PlatformAuthInteractionClient.ts +3 -1
- 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/packageMetadata.ts +1 -1
- package/src/protocol/Authorize.ts +2 -1
- package/src/utils/BrowserConstants.ts +27 -1
package/lib/msal-browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v4.
|
|
1
|
+
/*! @azure/msal-browser v4.28.1 2026-01-17 */
|
|
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 v15.
|
|
9
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
10
10
|
/*
|
|
11
11
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12
12
|
* Licensed under the MIT License.
|
|
@@ -283,7 +283,7 @@
|
|
|
283
283
|
// Token renewal offset default in seconds
|
|
284
284
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
285
285
|
|
|
286
|
-
/*! @azure/msal-common v15.
|
|
286
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
287
287
|
/*
|
|
288
288
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
289
289
|
* Licensed under the MIT License.
|
|
@@ -300,7 +300,7 @@
|
|
|
300
300
|
unexpectedError: unexpectedError
|
|
301
301
|
});
|
|
302
302
|
|
|
303
|
-
/*! @azure/msal-common v15.
|
|
303
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
304
304
|
|
|
305
305
|
/*
|
|
306
306
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -349,7 +349,7 @@
|
|
|
349
349
|
: AuthErrorMessages[code]);
|
|
350
350
|
}
|
|
351
351
|
|
|
352
|
-
/*! @azure/msal-common v15.
|
|
352
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
353
353
|
/*
|
|
354
354
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
355
355
|
* Licensed under the MIT License.
|
|
@@ -449,7 +449,7 @@
|
|
|
449
449
|
userTimeoutReached: userTimeoutReached
|
|
450
450
|
});
|
|
451
451
|
|
|
452
|
-
/*! @azure/msal-common v15.
|
|
452
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
453
453
|
|
|
454
454
|
/*
|
|
455
455
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -706,7 +706,7 @@
|
|
|
706
706
|
return new ClientAuthError(errorCode, additionalMessage);
|
|
707
707
|
}
|
|
708
708
|
|
|
709
|
-
/*! @azure/msal-common v15.
|
|
709
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
710
710
|
|
|
711
711
|
/*
|
|
712
712
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -745,7 +745,7 @@
|
|
|
745
745
|
},
|
|
746
746
|
};
|
|
747
747
|
|
|
748
|
-
/*! @azure/msal-common v15.
|
|
748
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
749
749
|
|
|
750
750
|
/*
|
|
751
751
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -936,12 +936,12 @@
|
|
|
936
936
|
}
|
|
937
937
|
}
|
|
938
938
|
|
|
939
|
-
/*! @azure/msal-common v15.
|
|
939
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
940
940
|
/* eslint-disable header/header */
|
|
941
941
|
const name$1 = "@azure/msal-common";
|
|
942
|
-
const version$1 = "15.
|
|
942
|
+
const version$1 = "15.14.1";
|
|
943
943
|
|
|
944
|
-
/*! @azure/msal-common v15.
|
|
944
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
945
945
|
/*
|
|
946
946
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
947
947
|
* Licensed under the MIT License.
|
|
@@ -961,7 +961,7 @@
|
|
|
961
961
|
AzureUsGovernment: "https://login.microsoftonline.us",
|
|
962
962
|
};
|
|
963
963
|
|
|
964
|
-
/*! @azure/msal-common v15.
|
|
964
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
965
965
|
/*
|
|
966
966
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
967
967
|
* Licensed under the MIT License.
|
|
@@ -1019,7 +1019,7 @@
|
|
|
1019
1019
|
urlParseError: urlParseError
|
|
1020
1020
|
});
|
|
1021
1021
|
|
|
1022
|
-
/*! @azure/msal-common v15.
|
|
1022
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
1023
1023
|
|
|
1024
1024
|
/*
|
|
1025
1025
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1167,7 +1167,7 @@
|
|
|
1167
1167
|
return new ClientConfigurationError(errorCode);
|
|
1168
1168
|
}
|
|
1169
1169
|
|
|
1170
|
-
/*! @azure/msal-common v15.
|
|
1170
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
1171
1171
|
/*
|
|
1172
1172
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1173
1173
|
* Licensed under the MIT License.
|
|
@@ -1264,7 +1264,7 @@
|
|
|
1264
1264
|
}
|
|
1265
1265
|
}
|
|
1266
1266
|
|
|
1267
|
-
/*! @azure/msal-common v15.
|
|
1267
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
1268
1268
|
|
|
1269
1269
|
/*
|
|
1270
1270
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1459,7 +1459,7 @@
|
|
|
1459
1459
|
}
|
|
1460
1460
|
}
|
|
1461
1461
|
|
|
1462
|
-
/*! @azure/msal-common v15.
|
|
1462
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
1463
1463
|
|
|
1464
1464
|
/*
|
|
1465
1465
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1499,7 +1499,7 @@
|
|
|
1499
1499
|
};
|
|
1500
1500
|
}
|
|
1501
1501
|
|
|
1502
|
-
/*! @azure/msal-common v15.
|
|
1502
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
1503
1503
|
/*
|
|
1504
1504
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1505
1505
|
* Licensed under the MIT License.
|
|
@@ -1581,7 +1581,7 @@
|
|
|
1581
1581
|
return updatedAccountInfo;
|
|
1582
1582
|
}
|
|
1583
1583
|
|
|
1584
|
-
/*! @azure/msal-common v15.
|
|
1584
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
1585
1585
|
/*
|
|
1586
1586
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1587
1587
|
* Licensed under the MIT License.
|
|
@@ -1596,7 +1596,7 @@
|
|
|
1596
1596
|
Ciam: 3,
|
|
1597
1597
|
};
|
|
1598
1598
|
|
|
1599
|
-
/*! @azure/msal-common v15.
|
|
1599
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
1600
1600
|
/*
|
|
1601
1601
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1602
1602
|
* Licensed under the MIT License.
|
|
@@ -1618,7 +1618,7 @@
|
|
|
1618
1618
|
return null;
|
|
1619
1619
|
}
|
|
1620
1620
|
|
|
1621
|
-
/*! @azure/msal-common v15.
|
|
1621
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
1622
1622
|
/*
|
|
1623
1623
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1624
1624
|
* Licensed under the MIT License.
|
|
@@ -1642,7 +1642,7 @@
|
|
|
1642
1642
|
EAR: "EAR",
|
|
1643
1643
|
};
|
|
1644
1644
|
|
|
1645
|
-
/*! @azure/msal-common v15.
|
|
1645
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
1646
1646
|
|
|
1647
1647
|
/*
|
|
1648
1648
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1676,6 +1676,13 @@
|
|
|
1676
1676
|
* Returns the AccountInfo interface for this account.
|
|
1677
1677
|
*/
|
|
1678
1678
|
static getAccountInfo(accountEntity) {
|
|
1679
|
+
const tenantProfiles = accountEntity.tenantProfiles || [];
|
|
1680
|
+
// Ensure at least the home tenant profile exists
|
|
1681
|
+
if (tenantProfiles.length === 0 &&
|
|
1682
|
+
accountEntity.realm &&
|
|
1683
|
+
accountEntity.localAccountId) {
|
|
1684
|
+
tenantProfiles.push(buildTenantProfile(accountEntity.homeAccountId, accountEntity.localAccountId, accountEntity.realm));
|
|
1685
|
+
}
|
|
1679
1686
|
return {
|
|
1680
1687
|
homeAccountId: accountEntity.homeAccountId,
|
|
1681
1688
|
environment: accountEntity.environment,
|
|
@@ -1687,7 +1694,7 @@
|
|
|
1687
1694
|
nativeAccountId: accountEntity.nativeAccountId,
|
|
1688
1695
|
authorityType: accountEntity.authorityType,
|
|
1689
1696
|
// Deserialize tenant profiles array into a Map
|
|
1690
|
-
tenantProfiles: new Map(
|
|
1697
|
+
tenantProfiles: new Map(tenantProfiles.map((tenantProfile) => {
|
|
1691
1698
|
return [tenantProfile.tenantId, tenantProfile];
|
|
1692
1699
|
})),
|
|
1693
1700
|
dataBoundary: accountEntity.dataBoundary,
|
|
@@ -1788,7 +1795,14 @@
|
|
|
1788
1795
|
account.cloudGraphHostName = cloudGraphHostName;
|
|
1789
1796
|
account.msGraphHost = msGraphHost;
|
|
1790
1797
|
// Serialize tenant profiles map into an array
|
|
1791
|
-
|
|
1798
|
+
const tenantProfiles = Array.from(accountInfo.tenantProfiles?.values() || []);
|
|
1799
|
+
// Ensure at least the home tenant profile exists
|
|
1800
|
+
if (tenantProfiles.length === 0 &&
|
|
1801
|
+
accountInfo.tenantId &&
|
|
1802
|
+
accountInfo.localAccountId) {
|
|
1803
|
+
tenantProfiles.push(buildTenantProfile(accountInfo.homeAccountId, accountInfo.localAccountId, accountInfo.tenantId, accountInfo.idTokenClaims));
|
|
1804
|
+
}
|
|
1805
|
+
account.tenantProfiles = tenantProfiles;
|
|
1792
1806
|
account.dataBoundary = accountInfo.dataBoundary;
|
|
1793
1807
|
return account;
|
|
1794
1808
|
}
|
|
@@ -1863,7 +1877,7 @@
|
|
|
1863
1877
|
}
|
|
1864
1878
|
}
|
|
1865
1879
|
|
|
1866
|
-
/*! @azure/msal-common v15.
|
|
1880
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
1867
1881
|
|
|
1868
1882
|
/*
|
|
1869
1883
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1944,7 +1958,7 @@
|
|
|
1944
1958
|
}
|
|
1945
1959
|
}
|
|
1946
1960
|
|
|
1947
|
-
/*! @azure/msal-common v15.
|
|
1961
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
1948
1962
|
|
|
1949
1963
|
/*
|
|
1950
1964
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2060,7 +2074,7 @@
|
|
|
2060
2074
|
}
|
|
2061
2075
|
}
|
|
2062
2076
|
|
|
2063
|
-
/*! @azure/msal-common v15.
|
|
2077
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
2064
2078
|
|
|
2065
2079
|
/*
|
|
2066
2080
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2224,7 +2238,7 @@
|
|
|
2224
2238
|
}
|
|
2225
2239
|
}
|
|
2226
2240
|
|
|
2227
|
-
/*! @azure/msal-common v15.
|
|
2241
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
2228
2242
|
|
|
2229
2243
|
/*
|
|
2230
2244
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2363,7 +2377,7 @@
|
|
|
2363
2377
|
return null;
|
|
2364
2378
|
}
|
|
2365
2379
|
|
|
2366
|
-
/*! @azure/msal-common v15.
|
|
2380
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
2367
2381
|
/*
|
|
2368
2382
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2369
2383
|
* Licensed under the MIT License.
|
|
@@ -2371,7 +2385,7 @@
|
|
|
2371
2385
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
2372
2386
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
2373
2387
|
|
|
2374
|
-
/*! @azure/msal-common v15.
|
|
2388
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
2375
2389
|
|
|
2376
2390
|
/*
|
|
2377
2391
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2416,7 +2430,7 @@
|
|
|
2416
2430
|
}
|
|
2417
2431
|
}
|
|
2418
2432
|
|
|
2419
|
-
/*! @azure/msal-common v15.
|
|
2433
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
2420
2434
|
|
|
2421
2435
|
/*
|
|
2422
2436
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2586,15 +2600,16 @@
|
|
|
2586
2600
|
* @param cacheRecord {CacheRecord}
|
|
2587
2601
|
* @param correlationId {?string} correlation id
|
|
2588
2602
|
* @param kmsi - Keep Me Signed In
|
|
2603
|
+
* @param apiId - API identifier for telemetry tracking
|
|
2589
2604
|
* @param storeInCache {?StoreInCache}
|
|
2590
2605
|
*/
|
|
2591
|
-
async saveCacheRecord(cacheRecord, correlationId, kmsi, storeInCache) {
|
|
2606
|
+
async saveCacheRecord(cacheRecord, correlationId, kmsi, apiId, storeInCache) {
|
|
2592
2607
|
if (!cacheRecord) {
|
|
2593
2608
|
throw createClientAuthError(invalidCacheRecord);
|
|
2594
2609
|
}
|
|
2595
2610
|
try {
|
|
2596
2611
|
if (!!cacheRecord.account) {
|
|
2597
|
-
await this.setAccount(cacheRecord.account, correlationId, kmsi);
|
|
2612
|
+
await this.setAccount(cacheRecord.account, correlationId, kmsi, apiId);
|
|
2598
2613
|
}
|
|
2599
2614
|
if (!!cacheRecord.idToken && storeInCache?.idToken !== false) {
|
|
2600
2615
|
await this.setIdTokenCredential(cacheRecord.idToken, correlationId, kmsi);
|
|
@@ -3526,7 +3541,7 @@
|
|
|
3526
3541
|
}
|
|
3527
3542
|
}
|
|
3528
3543
|
|
|
3529
|
-
/*! @azure/msal-common v15.
|
|
3544
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
3530
3545
|
/*
|
|
3531
3546
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3532
3547
|
* Licensed under the MIT License.
|
|
@@ -3783,6 +3798,11 @@
|
|
|
3783
3798
|
Decrypt: "decrypt",
|
|
3784
3799
|
GenerateEarKey: "generateEarKey",
|
|
3785
3800
|
DecryptEarResponse: "decryptEarResponse",
|
|
3801
|
+
LoadExternalTokens: "LoadExternalTokens",
|
|
3802
|
+
LoadAccount: "loadAccount",
|
|
3803
|
+
LoadIdToken: "loadIdToken",
|
|
3804
|
+
LoadAccessToken: "loadAccessToken",
|
|
3805
|
+
LoadRefreshToken: "loadRefreshToken",
|
|
3786
3806
|
};
|
|
3787
3807
|
const PerformanceEventAbbreviations = new Map([
|
|
3788
3808
|
[PerformanceEvents.AcquireTokenByCode, "ATByCode"],
|
|
@@ -4048,7 +4068,7 @@
|
|
|
4048
4068
|
"upgradedCacheCount",
|
|
4049
4069
|
]);
|
|
4050
4070
|
|
|
4051
|
-
/*! @azure/msal-common v15.
|
|
4071
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
4052
4072
|
|
|
4053
4073
|
/*
|
|
4054
4074
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4127,7 +4147,7 @@
|
|
|
4127
4147
|
}
|
|
4128
4148
|
}
|
|
4129
4149
|
|
|
4130
|
-
/*! @azure/msal-common v15.
|
|
4150
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
4131
4151
|
|
|
4132
4152
|
/*
|
|
4133
4153
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4227,7 +4247,7 @@
|
|
|
4227
4247
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
4228
4248
|
}
|
|
4229
4249
|
|
|
4230
|
-
/*! @azure/msal-common v15.
|
|
4250
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
4231
4251
|
/*
|
|
4232
4252
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4233
4253
|
* Licensed under the MIT License.
|
|
@@ -4237,7 +4257,7 @@
|
|
|
4237
4257
|
UPN: "UPN",
|
|
4238
4258
|
};
|
|
4239
4259
|
|
|
4240
|
-
/*! @azure/msal-common v15.
|
|
4260
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
4241
4261
|
/*
|
|
4242
4262
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4243
4263
|
* Licensed under the MIT License.
|
|
@@ -4287,7 +4307,7 @@
|
|
|
4287
4307
|
const EAR_JWK = "ear_jwk";
|
|
4288
4308
|
const EAR_JWE_CRYPTO = "ear_jwe_crypto";
|
|
4289
4309
|
|
|
4290
|
-
/*! @azure/msal-common v15.
|
|
4310
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
4291
4311
|
|
|
4292
4312
|
/*
|
|
4293
4313
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4667,7 +4687,7 @@
|
|
|
4667
4687
|
});
|
|
4668
4688
|
}
|
|
4669
4689
|
|
|
4670
|
-
/*! @azure/msal-common v15.
|
|
4690
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
4671
4691
|
/*
|
|
4672
4692
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4673
4693
|
* Licensed under the MIT License.
|
|
@@ -4679,7 +4699,7 @@
|
|
|
4679
4699
|
response.hasOwnProperty("jwks_uri"));
|
|
4680
4700
|
}
|
|
4681
4701
|
|
|
4682
|
-
/*! @azure/msal-common v15.
|
|
4702
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
4683
4703
|
/*
|
|
4684
4704
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4685
4705
|
* Licensed under the MIT License.
|
|
@@ -4689,7 +4709,7 @@
|
|
|
4689
4709
|
response.hasOwnProperty("metadata"));
|
|
4690
4710
|
}
|
|
4691
4711
|
|
|
4692
|
-
/*! @azure/msal-common v15.
|
|
4712
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
4693
4713
|
/*
|
|
4694
4714
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4695
4715
|
* Licensed under the MIT License.
|
|
@@ -4699,7 +4719,7 @@
|
|
|
4699
4719
|
response.hasOwnProperty("error_description"));
|
|
4700
4720
|
}
|
|
4701
4721
|
|
|
4702
|
-
/*! @azure/msal-common v15.
|
|
4722
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
4703
4723
|
/*
|
|
4704
4724
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4705
4725
|
* Licensed under the MIT License.
|
|
@@ -4795,7 +4815,7 @@
|
|
|
4795
4815
|
};
|
|
4796
4816
|
};
|
|
4797
4817
|
|
|
4798
|
-
/*! @azure/msal-common v15.
|
|
4818
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
4799
4819
|
|
|
4800
4820
|
/*
|
|
4801
4821
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4901,7 +4921,7 @@
|
|
|
4901
4921
|
},
|
|
4902
4922
|
};
|
|
4903
4923
|
|
|
4904
|
-
/*! @azure/msal-common v15.
|
|
4924
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
4905
4925
|
/*
|
|
4906
4926
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4907
4927
|
* Licensed under the MIT License.
|
|
@@ -4966,7 +4986,7 @@
|
|
|
4966
4986
|
return cachedAtSec > nowSeconds();
|
|
4967
4987
|
}
|
|
4968
4988
|
|
|
4969
|
-
/*! @azure/msal-common v15.
|
|
4989
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
4970
4990
|
|
|
4971
4991
|
/*
|
|
4972
4992
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5228,7 +5248,7 @@
|
|
|
5228
5248
|
return metadata.expiresAt <= nowSeconds();
|
|
5229
5249
|
}
|
|
5230
5250
|
|
|
5231
|
-
/*! @azure/msal-common v15.
|
|
5251
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
5232
5252
|
|
|
5233
5253
|
/*
|
|
5234
5254
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6067,7 +6087,7 @@
|
|
|
6067
6087
|
};
|
|
6068
6088
|
}
|
|
6069
6089
|
|
|
6070
|
-
/*! @azure/msal-common v15.
|
|
6090
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
6071
6091
|
|
|
6072
6092
|
/*
|
|
6073
6093
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6098,7 +6118,7 @@
|
|
|
6098
6118
|
}
|
|
6099
6119
|
}
|
|
6100
6120
|
|
|
6101
|
-
/*! @azure/msal-common v15.
|
|
6121
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
6102
6122
|
|
|
6103
6123
|
/*
|
|
6104
6124
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6117,7 +6137,7 @@
|
|
|
6117
6137
|
}
|
|
6118
6138
|
}
|
|
6119
6139
|
|
|
6120
|
-
/*! @azure/msal-common v15.
|
|
6140
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
6121
6141
|
/*
|
|
6122
6142
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6123
6143
|
* Licensed under the MIT License.
|
|
@@ -6138,7 +6158,7 @@
|
|
|
6138
6158
|
};
|
|
6139
6159
|
}
|
|
6140
6160
|
|
|
6141
|
-
/*! @azure/msal-common v15.
|
|
6161
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
6142
6162
|
|
|
6143
6163
|
/*
|
|
6144
6164
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6225,7 +6245,7 @@
|
|
|
6225
6245
|
}
|
|
6226
6246
|
}
|
|
6227
6247
|
|
|
6228
|
-
/*! @azure/msal-common v15.
|
|
6248
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
6229
6249
|
|
|
6230
6250
|
/*
|
|
6231
6251
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6256,7 +6276,7 @@
|
|
|
6256
6276
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
6257
6277
|
}
|
|
6258
6278
|
|
|
6259
|
-
/*! @azure/msal-common v15.
|
|
6279
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
6260
6280
|
|
|
6261
6281
|
/*
|
|
6262
6282
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6404,7 +6424,7 @@
|
|
|
6404
6424
|
}
|
|
6405
6425
|
}
|
|
6406
6426
|
|
|
6407
|
-
/*! @azure/msal-common v15.
|
|
6427
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
6408
6428
|
/*
|
|
6409
6429
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6410
6430
|
* Licensed under the MIT License.
|
|
@@ -6432,7 +6452,7 @@
|
|
|
6432
6452
|
uxNotAllowed: uxNotAllowed
|
|
6433
6453
|
});
|
|
6434
6454
|
|
|
6435
|
-
/*! @azure/msal-common v15.
|
|
6455
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
6436
6456
|
|
|
6437
6457
|
/*
|
|
6438
6458
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6522,7 +6542,7 @@
|
|
|
6522
6542
|
return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);
|
|
6523
6543
|
}
|
|
6524
6544
|
|
|
6525
|
-
/*! @azure/msal-common v15.
|
|
6545
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
6526
6546
|
|
|
6527
6547
|
/*
|
|
6528
6548
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6594,7 +6614,7 @@
|
|
|
6594
6614
|
}
|
|
6595
6615
|
}
|
|
6596
6616
|
|
|
6597
|
-
/*! @azure/msal-common v15.
|
|
6617
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
6598
6618
|
|
|
6599
6619
|
/*
|
|
6600
6620
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6676,7 +6696,7 @@
|
|
|
6676
6696
|
}
|
|
6677
6697
|
}
|
|
6678
6698
|
|
|
6679
|
-
/*! @azure/msal-common v15.
|
|
6699
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
6680
6700
|
/*
|
|
6681
6701
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6682
6702
|
* Licensed under the MIT License.
|
|
@@ -6703,7 +6723,7 @@
|
|
|
6703
6723
|
}
|
|
6704
6724
|
}
|
|
6705
6725
|
|
|
6706
|
-
/*! @azure/msal-common v15.
|
|
6726
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
6707
6727
|
|
|
6708
6728
|
/*
|
|
6709
6729
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6767,7 +6787,7 @@
|
|
|
6767
6787
|
* @param serverTokenResponse
|
|
6768
6788
|
* @param authority
|
|
6769
6789
|
*/
|
|
6770
|
-
async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) {
|
|
6790
|
+
async handleServerTokenResponse(serverTokenResponse, authority, reqTimestamp, request, apiId, authCodePayload, userAssertionHash, handlingRefreshTokenResponse, forceCacheRefreshTokenResponse, serverRequestId) {
|
|
6771
6791
|
this.performanceClient?.addQueueMeasurement(PerformanceEvents.HandleServerTokenResponse, serverTokenResponse.correlation_id);
|
|
6772
6792
|
// create an idToken object (not entity)
|
|
6773
6793
|
let idTokenClaims;
|
|
@@ -6815,14 +6835,19 @@
|
|
|
6815
6835
|
if (handlingRefreshTokenResponse &&
|
|
6816
6836
|
!forceCacheRefreshTokenResponse &&
|
|
6817
6837
|
cacheRecord.account) {
|
|
6818
|
-
const
|
|
6819
|
-
|
|
6820
|
-
|
|
6838
|
+
const cachedAccounts = this.cacheStorage.getAllAccounts({
|
|
6839
|
+
homeAccountId: cacheRecord.account.homeAccountId,
|
|
6840
|
+
environment: cacheRecord.account.environment,
|
|
6841
|
+
}, request.correlationId);
|
|
6842
|
+
if (cachedAccounts.length < 1) {
|
|
6821
6843
|
this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache");
|
|
6844
|
+
this.performanceClient?.addFields({
|
|
6845
|
+
acntLoggedOut: true,
|
|
6846
|
+
}, request.correlationId);
|
|
6822
6847
|
return await ResponseHandler.generateAuthenticationResult(this.cryptoObj, authority, cacheRecord, false, request, idTokenClaims, requestStateObj, undefined, serverRequestId);
|
|
6823
6848
|
}
|
|
6824
6849
|
}
|
|
6825
|
-
await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, isKmsi(idTokenClaims || {}), request.storeInCache);
|
|
6850
|
+
await this.cacheStorage.saveCacheRecord(cacheRecord, request.correlationId, isKmsi(idTokenClaims || {}), apiId, request.storeInCache);
|
|
6826
6851
|
}
|
|
6827
6852
|
finally {
|
|
6828
6853
|
if (this.persistencePlugin &&
|
|
@@ -6892,6 +6917,9 @@
|
|
|
6892
6917
|
? parseInt(serverTokenResponse.refresh_token_expires_in, 10)
|
|
6893
6918
|
: serverTokenResponse.refresh_token_expires_in;
|
|
6894
6919
|
rtExpiresOn = reqTimestamp + rtExpiresIn;
|
|
6920
|
+
this.performanceClient?.addFields({
|
|
6921
|
+
ntwkRtExpiresOnSeconds: rtExpiresOn,
|
|
6922
|
+
}, request.correlationId);
|
|
6895
6923
|
}
|
|
6896
6924
|
cachedRefreshToken = createRefreshTokenEntity(this.homeAccountIdentifier, env, serverTokenResponse.refresh_token, this.clientId, serverTokenResponse.foci, userAssertionHash, rtExpiresOn);
|
|
6897
6925
|
}
|
|
@@ -7034,7 +7062,7 @@
|
|
|
7034
7062
|
return baseAccount;
|
|
7035
7063
|
}
|
|
7036
7064
|
|
|
7037
|
-
/*! @azure/msal-common v15.
|
|
7065
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
7038
7066
|
/*
|
|
7039
7067
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7040
7068
|
* Licensed under the MIT License.
|
|
@@ -7052,7 +7080,7 @@
|
|
|
7052
7080
|
}
|
|
7053
7081
|
}
|
|
7054
7082
|
|
|
7055
|
-
/*! @azure/msal-common v15.
|
|
7083
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
7056
7084
|
|
|
7057
7085
|
/*
|
|
7058
7086
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7074,8 +7102,9 @@
|
|
|
7074
7102
|
* API to acquire a token in exchange of 'authorization_code` acquired by the user in the first leg of the
|
|
7075
7103
|
* authorization_code_grant
|
|
7076
7104
|
* @param request
|
|
7105
|
+
* @param apiId - API identifier for telemetry tracking
|
|
7077
7106
|
*/
|
|
7078
|
-
async acquireToken(request, authCodePayload) {
|
|
7107
|
+
async acquireToken(request, apiId, authCodePayload) {
|
|
7079
7108
|
this.performanceClient?.addQueueMeasurement(PerformanceEvents.AuthClientAcquireToken, request.correlationId);
|
|
7080
7109
|
if (!request.code) {
|
|
7081
7110
|
throw createClientAuthError(requestCannotBeMade);
|
|
@@ -7087,7 +7116,7 @@
|
|
|
7087
7116
|
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin, this.performanceClient);
|
|
7088
7117
|
// Validate response. This function throws a server error if an error is returned by the server.
|
|
7089
7118
|
responseHandler.validateTokenResponse(response.body);
|
|
7090
|
-
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, authCodePayload, undefined, undefined, undefined, requestId);
|
|
7119
|
+
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, apiId, authCodePayload, undefined, undefined, undefined, requestId);
|
|
7091
7120
|
}
|
|
7092
7121
|
/**
|
|
7093
7122
|
* Used to log out the current user, and redirect the user to the postLogoutRedirectUri.
|
|
@@ -7287,7 +7316,7 @@
|
|
|
7287
7316
|
}
|
|
7288
7317
|
}
|
|
7289
7318
|
|
|
7290
|
-
/*! @azure/msal-common v15.
|
|
7319
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
7291
7320
|
|
|
7292
7321
|
/*
|
|
7293
7322
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7302,7 +7331,7 @@
|
|
|
7302
7331
|
constructor(configuration, performanceClient) {
|
|
7303
7332
|
super(configuration, performanceClient);
|
|
7304
7333
|
}
|
|
7305
|
-
async acquireToken(request) {
|
|
7334
|
+
async acquireToken(request, apiId) {
|
|
7306
7335
|
this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId);
|
|
7307
7336
|
const reqTimestamp = nowSeconds();
|
|
7308
7337
|
const response = await invokeAsync(this.executeTokenRequest.bind(this), PerformanceEvents.RefreshTokenClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(request, this.authority);
|
|
@@ -7310,13 +7339,13 @@
|
|
|
7310
7339
|
const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
|
|
7311
7340
|
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.config.serializableCache, this.config.persistencePlugin);
|
|
7312
7341
|
responseHandler.validateTokenResponse(response.body);
|
|
7313
|
-
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, undefined, undefined, true, request.forceCache, requestId);
|
|
7342
|
+
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, apiId, undefined, undefined, true, request.forceCache, requestId);
|
|
7314
7343
|
}
|
|
7315
7344
|
/**
|
|
7316
7345
|
* Gets cached refresh token and attaches to request, then calls acquireToken API
|
|
7317
7346
|
* @param request
|
|
7318
7347
|
*/
|
|
7319
|
-
async acquireTokenByRefreshToken(request) {
|
|
7348
|
+
async acquireTokenByRefreshToken(request, apiId) {
|
|
7320
7349
|
// Cannot renew token if no request object is given.
|
|
7321
7350
|
if (!request) {
|
|
7322
7351
|
throw createClientConfigurationError(tokenRequestEmpty);
|
|
@@ -7331,7 +7360,7 @@
|
|
|
7331
7360
|
// if the app is part of the family, retrive a Family refresh token if present and make a refreshTokenRequest
|
|
7332
7361
|
if (isFOCI) {
|
|
7333
7362
|
try {
|
|
7334
|
-
return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true);
|
|
7363
|
+
return await invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, true, apiId);
|
|
7335
7364
|
}
|
|
7336
7365
|
catch (e) {
|
|
7337
7366
|
const noFamilyRTInCache = e instanceof InteractionRequiredAuthError &&
|
|
@@ -7342,7 +7371,7 @@
|
|
|
7342
7371
|
e.subError === Errors.CLIENT_MISMATCH_ERROR;
|
|
7343
7372
|
// if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART)
|
|
7344
7373
|
if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) {
|
|
7345
|
-
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);
|
|
7374
|
+
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false, apiId);
|
|
7346
7375
|
// throw in all other cases
|
|
7347
7376
|
}
|
|
7348
7377
|
else {
|
|
@@ -7351,26 +7380,30 @@
|
|
|
7351
7380
|
}
|
|
7352
7381
|
}
|
|
7353
7382
|
// fall back to application refresh token acquisition
|
|
7354
|
-
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false);
|
|
7383
|
+
return invokeAsync(this.acquireTokenWithCachedRefreshToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, this.logger, this.performanceClient, request.correlationId)(request, false, apiId);
|
|
7355
7384
|
}
|
|
7356
7385
|
/**
|
|
7357
7386
|
* makes a network call to acquire tokens by exchanging RefreshToken available in userCache; throws if refresh token is not cached
|
|
7358
7387
|
* @param request
|
|
7359
7388
|
*/
|
|
7360
|
-
async acquireTokenWithCachedRefreshToken(request, foci) {
|
|
7389
|
+
async acquireTokenWithCachedRefreshToken(request, foci, apiId) {
|
|
7361
7390
|
this.performanceClient?.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, request.correlationId);
|
|
7362
7391
|
// fetches family RT or application RT based on FOCI value
|
|
7363
7392
|
const refreshToken = invoke(this.cacheManager.getRefreshToken.bind(this.cacheManager), PerformanceEvents.CacheManagerGetRefreshToken, this.logger, this.performanceClient, request.correlationId)(request.account, foci, request.correlationId, undefined, this.performanceClient);
|
|
7364
7393
|
if (!refreshToken) {
|
|
7365
7394
|
throw createInteractionRequiredAuthError(noTokensFound);
|
|
7366
7395
|
}
|
|
7367
|
-
if (refreshToken.expiresOn
|
|
7368
|
-
|
|
7369
|
-
DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS
|
|
7370
|
-
this.performanceClient?.addFields({
|
|
7371
|
-
|
|
7396
|
+
if (refreshToken.expiresOn) {
|
|
7397
|
+
const offset = request.refreshTokenExpirationOffsetSeconds ||
|
|
7398
|
+
DEFAULT_REFRESH_TOKEN_EXPIRATION_OFFSET_SECONDS;
|
|
7399
|
+
this.performanceClient?.addFields({
|
|
7400
|
+
cacheRtExpiresOnSeconds: Number(refreshToken.expiresOn),
|
|
7401
|
+
rtOffsetSeconds: offset,
|
|
7402
|
+
}, request.correlationId);
|
|
7403
|
+
if (isTokenExpired(refreshToken.expiresOn, offset)) {
|
|
7404
|
+
throw createInteractionRequiredAuthError(refreshTokenExpired);
|
|
7405
|
+
}
|
|
7372
7406
|
}
|
|
7373
|
-
// attach cached RT size to the current measurement
|
|
7374
7407
|
const refreshTokenRequest = {
|
|
7375
7408
|
...request,
|
|
7376
7409
|
refreshToken: refreshToken.secret,
|
|
@@ -7381,11 +7414,10 @@
|
|
|
7381
7414
|
},
|
|
7382
7415
|
};
|
|
7383
7416
|
try {
|
|
7384
|
-
return await invokeAsync(this.acquireToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest);
|
|
7417
|
+
return await invokeAsync(this.acquireToken.bind(this), PerformanceEvents.RefreshTokenClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(refreshTokenRequest, apiId);
|
|
7385
7418
|
}
|
|
7386
7419
|
catch (e) {
|
|
7387
7420
|
if (e instanceof InteractionRequiredAuthError) {
|
|
7388
|
-
this.performanceClient?.addFields({ rtExpiresOnMs: Number(refreshToken.expiresOn) }, request.correlationId);
|
|
7389
7421
|
if (e.subError === badToken) {
|
|
7390
7422
|
// Remove bad refresh token from cache
|
|
7391
7423
|
this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");
|
|
@@ -7496,7 +7528,7 @@
|
|
|
7496
7528
|
}
|
|
7497
7529
|
}
|
|
7498
7530
|
|
|
7499
|
-
/*! @azure/msal-common v15.
|
|
7531
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
7500
7532
|
|
|
7501
7533
|
/*
|
|
7502
7534
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7594,7 +7626,7 @@
|
|
|
7594
7626
|
}
|
|
7595
7627
|
}
|
|
7596
7628
|
|
|
7597
|
-
/*! @azure/msal-common v15.
|
|
7629
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
7598
7630
|
|
|
7599
7631
|
/*
|
|
7600
7632
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7609,7 +7641,7 @@
|
|
|
7609
7641
|
},
|
|
7610
7642
|
};
|
|
7611
7643
|
|
|
7612
|
-
/*! @azure/msal-common v15.
|
|
7644
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
7613
7645
|
|
|
7614
7646
|
/*
|
|
7615
7647
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7833,7 +7865,7 @@
|
|
|
7833
7865
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
7834
7866
|
}
|
|
7835
7867
|
|
|
7836
|
-
/*! @azure/msal-common v15.
|
|
7868
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
7837
7869
|
|
|
7838
7870
|
/*
|
|
7839
7871
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7891,7 +7923,7 @@
|
|
|
7891
7923
|
}
|
|
7892
7924
|
}
|
|
7893
7925
|
|
|
7894
|
-
/*! @azure/msal-common v15.
|
|
7926
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
7895
7927
|
|
|
7896
7928
|
/*
|
|
7897
7929
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8154,7 +8186,7 @@
|
|
|
8154
8186
|
}
|
|
8155
8187
|
}
|
|
8156
8188
|
|
|
8157
|
-
/*! @azure/msal-common v15.
|
|
8189
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
8158
8190
|
/*
|
|
8159
8191
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
8160
8192
|
* Licensed under the MIT License.
|
|
@@ -8162,7 +8194,7 @@
|
|
|
8162
8194
|
const missingKidError = "missing_kid_error";
|
|
8163
8195
|
const missingAlgError = "missing_alg_error";
|
|
8164
8196
|
|
|
8165
|
-
/*! @azure/msal-common v15.
|
|
8197
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
8166
8198
|
|
|
8167
8199
|
/*
|
|
8168
8200
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8187,7 +8219,7 @@
|
|
|
8187
8219
|
return new JoseHeaderError(code, JoseHeaderErrorMessages[code]);
|
|
8188
8220
|
}
|
|
8189
8221
|
|
|
8190
|
-
/*! @azure/msal-common v15.
|
|
8222
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
8191
8223
|
|
|
8192
8224
|
/*
|
|
8193
8225
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8227,7 +8259,7 @@
|
|
|
8227
8259
|
}
|
|
8228
8260
|
}
|
|
8229
8261
|
|
|
8230
|
-
/*! @azure/msal-common v15.
|
|
8262
|
+
/*! @azure/msal-common v15.14.1 2026-01-17 */
|
|
8231
8263
|
|
|
8232
8264
|
/*
|
|
8233
8265
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -9315,9 +9347,9 @@
|
|
|
9315
9347
|
};
|
|
9316
9348
|
/**
|
|
9317
9349
|
* API Codes for Telemetry purposes.
|
|
9318
|
-
* Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs
|
|
9319
9350
|
* 0-99 Silent Flow
|
|
9320
9351
|
* 800-899 Auth Code Flow
|
|
9352
|
+
* 900-999 Miscellaneous
|
|
9321
9353
|
*/
|
|
9322
9354
|
const ApiId = {
|
|
9323
9355
|
acquireTokenRedirect: 861,
|
|
@@ -9329,6 +9361,30 @@
|
|
|
9329
9361
|
acquireTokenSilent_silentFlow: 61,
|
|
9330
9362
|
logout: 961,
|
|
9331
9363
|
logoutPopup: 962,
|
|
9364
|
+
hydrateCache: 963,
|
|
9365
|
+
loadExternalTokens: 964,
|
|
9366
|
+
};
|
|
9367
|
+
/**
|
|
9368
|
+
* API Names for Telemetry purposes.
|
|
9369
|
+
*/
|
|
9370
|
+
const ApiName = {
|
|
9371
|
+
861: "acquireTokenRedirect",
|
|
9372
|
+
862: "acquireTokenPopup",
|
|
9373
|
+
863: "ssoSilent",
|
|
9374
|
+
864: "acquireTokenSilent_authCode",
|
|
9375
|
+
865: "handleRedirectPromise",
|
|
9376
|
+
866: "acquireTokenByCode",
|
|
9377
|
+
61: "acquireTokenSilent_silentFlow",
|
|
9378
|
+
961: "logout",
|
|
9379
|
+
962: "logoutPopup",
|
|
9380
|
+
963: "hydrateCache",
|
|
9381
|
+
964: "loadExternalTokens",
|
|
9382
|
+
};
|
|
9383
|
+
const apiIdToName = (id) => {
|
|
9384
|
+
if (typeof id === "number" && id in ApiName) {
|
|
9385
|
+
return ApiName[id];
|
|
9386
|
+
}
|
|
9387
|
+
return "unknown";
|
|
9332
9388
|
};
|
|
9333
9389
|
/*
|
|
9334
9390
|
* Interaction type of the API - used for state and telemetry
|
|
@@ -10344,7 +10400,7 @@
|
|
|
10344
10400
|
|
|
10345
10401
|
/* eslint-disable header/header */
|
|
10346
10402
|
const name = "@azure/msal-browser";
|
|
10347
|
-
const version = "4.
|
|
10403
|
+
const version = "4.28.1";
|
|
10348
10404
|
|
|
10349
10405
|
/*
|
|
10350
10406
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -12364,17 +12420,21 @@
|
|
|
12364
12420
|
if (!parsedAccount || !AccountEntity.isAccountEntity(parsedAccount)) {
|
|
12365
12421
|
return null;
|
|
12366
12422
|
}
|
|
12423
|
+
this.performanceClient.addFields({
|
|
12424
|
+
accountCachedBy: apiIdToName(parsedAccount.cachedByApiId),
|
|
12425
|
+
}, correlationId);
|
|
12367
12426
|
return CacheManager.toObject(new AccountEntity(), parsedAccount);
|
|
12368
12427
|
}
|
|
12369
12428
|
/**
|
|
12370
12429
|
* set account entity in the platform cache
|
|
12371
12430
|
* @param account
|
|
12372
12431
|
*/
|
|
12373
|
-
async setAccount(account, correlationId, kmsi) {
|
|
12432
|
+
async setAccount(account, correlationId, kmsi, apiId) {
|
|
12374
12433
|
this.logger.trace("BrowserCacheManager.setAccount called");
|
|
12375
12434
|
const key = this.generateAccountKey(AccountEntity.getAccountInfo(account));
|
|
12376
12435
|
const timestamp = Date.now().toString();
|
|
12377
12436
|
account.lastUpdatedAt = timestamp;
|
|
12437
|
+
account.cachedByApiId = apiId;
|
|
12378
12438
|
await this.setUserData(key, JSON.stringify(account), correlationId, timestamp, kmsi);
|
|
12379
12439
|
const wasAdded = this.addAccountKeyToMap(key, correlationId);
|
|
12380
12440
|
this.performanceClient.addFields({ kmsi: kmsi }, correlationId);
|
|
@@ -13129,7 +13189,7 @@
|
|
|
13129
13189
|
* @param request
|
|
13130
13190
|
*/
|
|
13131
13191
|
async hydrateCache(result, request) {
|
|
13132
|
-
const idTokenEntity = createIdTokenEntity(result.account
|
|
13192
|
+
const idTokenEntity = createIdTokenEntity(result.account.homeAccountId, result.account.environment, result.idToken, this.clientId, result.tenantId);
|
|
13133
13193
|
let claimsHash;
|
|
13134
13194
|
if (request.claims) {
|
|
13135
13195
|
claimsHash = await this.cryptoImpl.hashString(request.claims);
|
|
@@ -13141,7 +13201,7 @@
|
|
|
13141
13201
|
*
|
|
13142
13202
|
* The next MSAL VFuture should map these both to same value if possible
|
|
13143
13203
|
*/
|
|
13144
|
-
const accessTokenEntity = createAccessTokenEntity(result.account
|
|
13204
|
+
const accessTokenEntity = createAccessTokenEntity(result.account.homeAccountId, result.account.environment, result.accessToken, this.clientId, result.tenantId, result.scopes.join(" "),
|
|
13145
13205
|
// Access token expiresOn stored in seconds, converting from AuthenticationResult expiresOn stored as Date
|
|
13146
13206
|
result.expiresOn
|
|
13147
13207
|
? toSecondsFromDate(result.expiresOn)
|
|
@@ -13154,7 +13214,7 @@
|
|
|
13154
13214
|
idToken: idTokenEntity,
|
|
13155
13215
|
accessToken: accessTokenEntity,
|
|
13156
13216
|
};
|
|
13157
|
-
return this.saveCacheRecord(cacheRecord, result.correlationId, isKmsi(extractTokenClaims(result.idToken, base64Decode)));
|
|
13217
|
+
return this.saveCacheRecord(cacheRecord, result.correlationId, isKmsi(extractTokenClaims(result.idToken, base64Decode)), ApiId.hydrateCache);
|
|
13158
13218
|
}
|
|
13159
13219
|
/**
|
|
13160
13220
|
* saves a cache record
|
|
@@ -13162,9 +13222,9 @@
|
|
|
13162
13222
|
* @param storeInCache {?StoreInCache}
|
|
13163
13223
|
* @param correlationId {?string} correlation id
|
|
13164
13224
|
*/
|
|
13165
|
-
async saveCacheRecord(cacheRecord, correlationId, kmsi, storeInCache) {
|
|
13225
|
+
async saveCacheRecord(cacheRecord, correlationId, kmsi, apiId, storeInCache) {
|
|
13166
13226
|
try {
|
|
13167
|
-
await super.saveCacheRecord(cacheRecord, correlationId, kmsi, storeInCache);
|
|
13227
|
+
await super.saveCacheRecord(cacheRecord, correlationId, kmsi, apiId, storeInCache);
|
|
13168
13228
|
}
|
|
13169
13229
|
catch (e) {
|
|
13170
13230
|
if (e instanceof CacheError &&
|
|
@@ -13923,7 +13983,7 @@
|
|
|
13923
13983
|
* Function to handle response parameters from hash.
|
|
13924
13984
|
* @param locationHash
|
|
13925
13985
|
*/
|
|
13926
|
-
async handleCodeResponse(response, request) {
|
|
13986
|
+
async handleCodeResponse(response, request, apiId) {
|
|
13927
13987
|
this.performanceClient.addQueueMeasurement(PerformanceEvents.HandleCodeResponse, request.correlationId);
|
|
13928
13988
|
let authCodeResponse;
|
|
13929
13989
|
try {
|
|
@@ -13939,7 +13999,7 @@
|
|
|
13939
13999
|
throw e;
|
|
13940
14000
|
}
|
|
13941
14001
|
}
|
|
13942
|
-
return invokeAsync(this.handleCodeResponseFromServer.bind(this), PerformanceEvents.HandleCodeResponseFromServer, this.logger, this.performanceClient, request.correlationId)(authCodeResponse, request);
|
|
14002
|
+
return invokeAsync(this.handleCodeResponseFromServer.bind(this), PerformanceEvents.HandleCodeResponseFromServer, this.logger, this.performanceClient, request.correlationId)(authCodeResponse, request, apiId);
|
|
13943
14003
|
}
|
|
13944
14004
|
/**
|
|
13945
14005
|
* Process auth code response from AAD
|
|
@@ -13949,7 +14009,7 @@
|
|
|
13949
14009
|
* @param networkModule
|
|
13950
14010
|
* @returns
|
|
13951
14011
|
*/
|
|
13952
|
-
async handleCodeResponseFromServer(authCodeResponse, request, validateNonce = true) {
|
|
14012
|
+
async handleCodeResponseFromServer(authCodeResponse, request, apiId, validateNonce = true) {
|
|
13953
14013
|
this.performanceClient.addQueueMeasurement(PerformanceEvents.HandleCodeResponseFromServer, request.correlationId);
|
|
13954
14014
|
this.logger.trace("InteractionHandler.handleCodeResponseFromServer called");
|
|
13955
14015
|
// Assign code to request
|
|
@@ -13975,7 +14035,7 @@
|
|
|
13975
14035
|
}
|
|
13976
14036
|
}
|
|
13977
14037
|
// Acquire token with retrieved code.
|
|
13978
|
-
const tokenResponse = (await invokeAsync(this.authModule.acquireToken.bind(this.authModule), PerformanceEvents.AuthClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(this.authCodeRequest, authCodeResponse));
|
|
14038
|
+
const tokenResponse = (await invokeAsync(this.authModule.acquireToken.bind(this.authModule), PerformanceEvents.AuthClientAcquireToken, this.logger, this.performanceClient, request.correlationId)(this.authCodeRequest, apiId, authCodeResponse));
|
|
13979
14039
|
return tokenResponse;
|
|
13980
14040
|
}
|
|
13981
14041
|
/**
|
|
@@ -14523,7 +14583,7 @@
|
|
|
14523
14583
|
*/
|
|
14524
14584
|
async cacheAccount(accountEntity, correlationId, kmsi) {
|
|
14525
14585
|
// Store the account info and hence `nativeAccountId` in browser cache
|
|
14526
|
-
await this.browserStorage.setAccount(accountEntity, this.correlationId, kmsi);
|
|
14586
|
+
await this.browserStorage.setAccount(accountEntity, this.correlationId, kmsi, this.apiId);
|
|
14527
14587
|
// Remove any existing cached tokens for this account in browser storage
|
|
14528
14588
|
this.browserStorage.removeAccountContext(AccountEntity.getAccountInfo(accountEntity), correlationId);
|
|
14529
14589
|
}
|
|
@@ -14552,7 +14612,7 @@
|
|
|
14552
14612
|
idToken: cachedIdToken,
|
|
14553
14613
|
accessToken: cachedAccessToken,
|
|
14554
14614
|
};
|
|
14555
|
-
return this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, this.correlationId, isKmsi(idTokenClaims), request.storeInCache);
|
|
14615
|
+
return this.nativeStorageManager.saveCacheRecord(nativeCacheRecord, this.correlationId, isKmsi(idTokenClaims), this.apiId, request.storeInCache);
|
|
14556
14616
|
}
|
|
14557
14617
|
getExpiresInValue(tokenType, expiresIn) {
|
|
14558
14618
|
return tokenType === AuthenticationScheme.POP
|
|
@@ -14927,7 +14987,7 @@
|
|
|
14927
14987
|
// Create popup interaction handler.
|
|
14928
14988
|
const interactionHandler = new InteractionHandler(authClient, browserStorage, authCodeRequest, logger, performanceClient);
|
|
14929
14989
|
// Handle response from hash string.
|
|
14930
|
-
const result = await invokeAsync(interactionHandler.handleCodeResponse.bind(interactionHandler), PerformanceEvents.HandleCodeResponse, logger, performanceClient, request.correlationId)(response, request);
|
|
14990
|
+
const result = await invokeAsync(interactionHandler.handleCodeResponse.bind(interactionHandler), PerformanceEvents.HandleCodeResponse, logger, performanceClient, request.correlationId)(response, request, apiId);
|
|
14931
14991
|
return result;
|
|
14932
14992
|
}
|
|
14933
14993
|
/**
|
|
@@ -14974,7 +15034,7 @@
|
|
|
14974
15034
|
cloud_instance_name: decryptedData.cloud_instance_name,
|
|
14975
15035
|
msgraph_host: decryptedData.msgraph_host,
|
|
14976
15036
|
};
|
|
14977
|
-
return (await invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, logger, performanceClient, request.correlationId)(decryptedData, authority, nowSeconds(), request, additionalData, undefined, undefined, undefined, undefined));
|
|
15037
|
+
return (await invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), PerformanceEvents.HandleServerTokenResponse, logger, performanceClient, request.correlationId)(decryptedData, authority, nowSeconds(), request, apiId, additionalData, undefined, undefined, undefined, undefined));
|
|
14978
15038
|
}
|
|
14979
15039
|
|
|
14980
15040
|
/*
|
|
@@ -16788,7 +16848,7 @@
|
|
|
16788
16848
|
account: silentRequest.account,
|
|
16789
16849
|
});
|
|
16790
16850
|
// Send request to renew token. Auth module will throw errors if token cannot be renewed.
|
|
16791
|
-
return invokeAsync(refreshTokenClient.acquireTokenByRefreshToken.bind(refreshTokenClient), PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken, this.logger, this.performanceClient, request.correlationId)(silentRequest).catch((e) => {
|
|
16851
|
+
return invokeAsync(refreshTokenClient.acquireTokenByRefreshToken.bind(refreshTokenClient), PerformanceEvents.RefreshTokenClientAcquireTokenByRefreshToken, this.logger, this.performanceClient, request.correlationId)(silentRequest, ApiId.acquireTokenSilent_silentFlow).catch((e) => {
|
|
16792
16852
|
e.setCorrelationId(this.correlationId);
|
|
16793
16853
|
serverTelemetryManager.cacheFailedRequest(e);
|
|
16794
16854
|
throw e;
|
|
@@ -16832,12 +16892,13 @@
|
|
|
16832
16892
|
* Token cache manager
|
|
16833
16893
|
*/
|
|
16834
16894
|
class TokenCache {
|
|
16835
|
-
constructor(configuration, storage, logger, cryptoObj) {
|
|
16895
|
+
constructor(configuration, storage, logger, cryptoObj, performanceClient) {
|
|
16836
16896
|
this.isBrowserEnvironment = typeof window !== "undefined";
|
|
16837
16897
|
this.config = configuration;
|
|
16838
16898
|
this.storage = storage;
|
|
16839
16899
|
this.logger = logger;
|
|
16840
16900
|
this.cryptoObj = cryptoObj;
|
|
16901
|
+
this.performanceClient = performanceClient;
|
|
16841
16902
|
}
|
|
16842
16903
|
// Move getAllAccounts here and cache utility APIs
|
|
16843
16904
|
/**
|
|
@@ -16852,30 +16913,37 @@
|
|
|
16852
16913
|
throw createBrowserAuthError(nonBrowserEnvironment);
|
|
16853
16914
|
}
|
|
16854
16915
|
const correlationId = request.correlationId || createNewGuid();
|
|
16855
|
-
const
|
|
16856
|
-
|
|
16857
|
-
|
|
16858
|
-
|
|
16859
|
-
|
|
16860
|
-
|
|
16861
|
-
|
|
16862
|
-
|
|
16863
|
-
|
|
16864
|
-
|
|
16865
|
-
|
|
16866
|
-
|
|
16867
|
-
|
|
16868
|
-
|
|
16869
|
-
|
|
16870
|
-
|
|
16871
|
-
|
|
16872
|
-
|
|
16873
|
-
|
|
16874
|
-
|
|
16875
|
-
|
|
16876
|
-
|
|
16877
|
-
|
|
16878
|
-
|
|
16916
|
+
const rootMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.LoadExternalTokens, correlationId);
|
|
16917
|
+
try {
|
|
16918
|
+
const idTokenClaims = response.id_token
|
|
16919
|
+
? extractTokenClaims(response.id_token, base64Decode)
|
|
16920
|
+
: undefined;
|
|
16921
|
+
const kmsi = isKmsi(idTokenClaims || {});
|
|
16922
|
+
const authorityOptions = {
|
|
16923
|
+
protocolMode: this.config.auth.protocolMode,
|
|
16924
|
+
knownAuthorities: this.config.auth.knownAuthorities,
|
|
16925
|
+
cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,
|
|
16926
|
+
authorityMetadata: this.config.auth.authorityMetadata,
|
|
16927
|
+
skipAuthorityMetadataCache: this.config.auth.skipAuthorityMetadataCache,
|
|
16928
|
+
};
|
|
16929
|
+
const authorityString = request.authority || this.config.auth.authority;
|
|
16930
|
+
const authority = await createDiscoveredInstance(Authority.generateAuthority(authorityString, request.azureCloudOptions), this.config.system.networkClient, this.storage, authorityOptions, this.logger, correlationId, this.performanceClient);
|
|
16931
|
+
const cacheRecordAccount = await invokeAsync(this.loadAccount.bind(this), PerformanceEvents.LoadAccount, this.logger, this.performanceClient, correlationId)(request, options.clientInfo || response.client_info || "", correlationId, authority, idTokenClaims);
|
|
16932
|
+
const idToken = await invokeAsync(this.loadIdToken.bind(this), PerformanceEvents.LoadIdToken, this.logger, this.performanceClient, correlationId)(response, cacheRecordAccount.homeAccountId, cacheRecordAccount.environment, cacheRecordAccount.realm, correlationId, kmsi);
|
|
16933
|
+
const accessToken = await invokeAsync(this.loadAccessToken.bind(this), PerformanceEvents.LoadAccessToken, this.logger, this.performanceClient, correlationId)(request, response, cacheRecordAccount.homeAccountId, cacheRecordAccount.environment, cacheRecordAccount.realm, options, correlationId, kmsi);
|
|
16934
|
+
const refreshToken = await invokeAsync(this.loadRefreshToken.bind(this), PerformanceEvents.LoadRefreshToken, this.logger, this.performanceClient, correlationId)(response, cacheRecordAccount.homeAccountId, cacheRecordAccount.environment, correlationId, kmsi);
|
|
16935
|
+
rootMeasurement.end({ success: true }, undefined, AccountEntity.getAccountInfo(cacheRecordAccount));
|
|
16936
|
+
return this.generateAuthenticationResult(request, {
|
|
16937
|
+
account: cacheRecordAccount,
|
|
16938
|
+
idToken,
|
|
16939
|
+
accessToken,
|
|
16940
|
+
refreshToken,
|
|
16941
|
+
}, authority, idTokenClaims);
|
|
16942
|
+
}
|
|
16943
|
+
catch (error) {
|
|
16944
|
+
rootMeasurement.end({ success: false }, error);
|
|
16945
|
+
throw error;
|
|
16946
|
+
}
|
|
16879
16947
|
}
|
|
16880
16948
|
/**
|
|
16881
16949
|
* Helper function to load account to msal-browser cache
|
|
@@ -16886,23 +16954,23 @@
|
|
|
16886
16954
|
* @param requestHomeAccountId
|
|
16887
16955
|
* @returns `AccountEntity`
|
|
16888
16956
|
*/
|
|
16889
|
-
async loadAccount(request, clientInfo, correlationId,
|
|
16957
|
+
async loadAccount(request, clientInfo, correlationId, authority, idTokenClaims) {
|
|
16890
16958
|
this.logger.verbose("TokenCache - loading account");
|
|
16891
16959
|
if (request.account) {
|
|
16892
16960
|
const accountEntity = AccountEntity.createFromAccountInfo(request.account);
|
|
16893
|
-
await this.storage.setAccount(accountEntity, correlationId, isKmsi(idTokenClaims || {}));
|
|
16961
|
+
await this.storage.setAccount(accountEntity, correlationId, isKmsi(idTokenClaims || {}), ApiId.loadExternalTokens);
|
|
16894
16962
|
return accountEntity;
|
|
16895
16963
|
}
|
|
16896
|
-
else if (!
|
|
16897
|
-
this.logger.error("TokenCache - if an account is not provided on the request,
|
|
16964
|
+
else if (!clientInfo && !idTokenClaims) {
|
|
16965
|
+
this.logger.error("TokenCache - if an account is not provided on the request, clientInfo or idToken must be provided instead.");
|
|
16898
16966
|
throw createBrowserAuthError(unableToLoadToken);
|
|
16899
16967
|
}
|
|
16900
16968
|
const homeAccountId = AccountEntity.generateHomeAccountId(clientInfo, authority.authorityType, this.logger, this.cryptoObj, idTokenClaims);
|
|
16901
16969
|
const claimsTenantId = idTokenClaims?.tid;
|
|
16902
|
-
const cachedAccount = buildAccountToCache(this.storage, authority, homeAccountId, base64Decode, correlationId, idTokenClaims, clientInfo, authority.
|
|
16970
|
+
const cachedAccount = buildAccountToCache(this.storage, authority, homeAccountId, base64Decode, correlationId, idTokenClaims, clientInfo, authority.getPreferredCache(), claimsTenantId, undefined, // authCodePayload
|
|
16903
16971
|
undefined, // nativeAccountId
|
|
16904
16972
|
this.logger);
|
|
16905
|
-
await this.storage.setAccount(cachedAccount, correlationId, isKmsi(idTokenClaims || {}));
|
|
16973
|
+
await this.storage.setAccount(cachedAccount, correlationId, isKmsi(idTokenClaims || {}), ApiId.loadExternalTokens);
|
|
16906
16974
|
return cachedAccount;
|
|
16907
16975
|
}
|
|
16908
16976
|
/**
|
|
@@ -16971,9 +17039,15 @@
|
|
|
16971
17039
|
this.logger.verbose("TokenCache - no refresh token found in response");
|
|
16972
17040
|
return null;
|
|
16973
17041
|
}
|
|
17042
|
+
const expiresOn = response.refresh_token_expires_in
|
|
17043
|
+
? response.refresh_token_expires_in + nowSeconds()
|
|
17044
|
+
: undefined;
|
|
17045
|
+
this.performanceClient.addFields({
|
|
17046
|
+
extRtExpiresOnSeconds: expiresOn,
|
|
17047
|
+
}, correlationId);
|
|
16974
17048
|
this.logger.verbose("TokenCache - loading refresh token");
|
|
16975
17049
|
const refreshTokenEntity = createRefreshTokenEntity(homeAccountId, environment, response.refresh_token, this.config.auth.clientId, response.foci, undefined, // userAssertionHash
|
|
16976
|
-
|
|
17050
|
+
expiresOn);
|
|
16977
17051
|
await this.storage.setRefreshTokenCredential(refreshTokenEntity, correlationId, kmsi);
|
|
16978
17052
|
return refreshTokenEntity;
|
|
16979
17053
|
}
|
|
@@ -16985,7 +17059,7 @@
|
|
|
16985
17059
|
* @param authority
|
|
16986
17060
|
* @returns `AuthenticationResult`
|
|
16987
17061
|
*/
|
|
16988
|
-
generateAuthenticationResult(request, cacheRecord,
|
|
17062
|
+
generateAuthenticationResult(request, cacheRecord, authority, idTokenClaims) {
|
|
16989
17063
|
let accessToken = "";
|
|
16990
17064
|
let responseScopes = [];
|
|
16991
17065
|
let expiresOn = null;
|
|
@@ -17078,7 +17152,7 @@
|
|
|
17078
17152
|
msgraph_host: request.msGraphHost,
|
|
17079
17153
|
cloud_graph_host_name: request.cloudGraphHostName,
|
|
17080
17154
|
cloud_instance_host_name: request.cloudInstanceHostName,
|
|
17081
|
-
}, silentRequest, false);
|
|
17155
|
+
}, silentRequest, this.apiId, false);
|
|
17082
17156
|
}
|
|
17083
17157
|
catch (e) {
|
|
17084
17158
|
if (e instanceof AuthError) {
|
|
@@ -17191,7 +17265,7 @@
|
|
|
17191
17265
|
};
|
|
17192
17266
|
this.nativeInternalStorage = new BrowserCacheManager(this.config.auth.clientId, nativeCacheOptions, this.browserCrypto, this.logger, this.performanceClient, this.eventHandler);
|
|
17193
17267
|
// Initialize the token cache
|
|
17194
|
-
this.tokenCache = new TokenCache(this.config, this.browserStorage, this.logger, this.browserCrypto);
|
|
17268
|
+
this.tokenCache = new TokenCache(this.config, this.browserStorage, this.logger, this.browserCrypto, this.performanceClient);
|
|
17195
17269
|
this.activeSilentTokenRequests = new Map();
|
|
17196
17270
|
// Register listener functions
|
|
17197
17271
|
this.trackPageVisibility = this.trackPageVisibility.bind(this);
|
|
@@ -18021,7 +18095,7 @@
|
|
|
18021
18095
|
this.logger.verbose("hydrateCache called");
|
|
18022
18096
|
// Account gets saved to browser storage regardless of native or not
|
|
18023
18097
|
const accountEntity = AccountEntity.createFromAccountInfo(result.account, result.cloudGraphHostName, result.msGraphHost);
|
|
18024
|
-
await this.browserStorage.setAccount(accountEntity, result.correlationId, isKmsi(result.idTokenClaims));
|
|
18098
|
+
await this.browserStorage.setAccount(accountEntity, result.correlationId, isKmsi(result.idTokenClaims), ApiId.hydrateCache);
|
|
18025
18099
|
if (result.fromNativeBroker) {
|
|
18026
18100
|
this.logger.verbose("Response was from native broker, storing in-memory");
|
|
18027
18101
|
// Tokens from native broker are stored in-memory
|
|
@@ -19299,7 +19373,7 @@
|
|
|
19299
19373
|
async hydrateCache(result, request) {
|
|
19300
19374
|
this.logger.verbose("hydrateCache called");
|
|
19301
19375
|
const accountEntity = AccountEntity.createFromAccountInfo(result.account, result.cloudGraphHostName, result.msGraphHost);
|
|
19302
|
-
await this.browserStorage.setAccount(accountEntity, result.correlationId, isKmsi(result.idTokenClaims));
|
|
19376
|
+
await this.browserStorage.setAccount(accountEntity, result.correlationId, isKmsi(result.idTokenClaims), ApiId.hydrateCache);
|
|
19303
19377
|
return this.browserStorage.hydrateCache(result, request);
|
|
19304
19378
|
}
|
|
19305
19379
|
}
|