@azure/msal-browser 4.27.0 → 4.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/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 +10 -6
- 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 +39 -29
- 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 +10 -6
- 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 +39 -29
- 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 +190 -140
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +22608 -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 +183 -133
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +183 -133
- 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 +16 -2
- package/src/cache/TokenCache.ts +122 -72
- 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/src/cache/TokenCache.ts
CHANGED
|
@@ -20,6 +20,9 @@ import {
|
|
|
20
20
|
CacheHelpers,
|
|
21
21
|
buildAccountToCache,
|
|
22
22
|
TimeUtils,
|
|
23
|
+
IPerformanceClient,
|
|
24
|
+
PerformanceEvents,
|
|
25
|
+
invokeAsync,
|
|
23
26
|
} from "@azure/msal-common/browser";
|
|
24
27
|
import { BrowserConfiguration } from "../config/Configuration.js";
|
|
25
28
|
import type { SilentRequest } from "../request/SilentRequest.js";
|
|
@@ -32,6 +35,7 @@ import {
|
|
|
32
35
|
import type { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
33
36
|
import { base64Decode } from "../encode/Base64Decode.js";
|
|
34
37
|
import * as BrowserCrypto from "../crypto/BrowserCrypto.js";
|
|
38
|
+
import { ApiId } from "../utils/BrowserConstants.js";
|
|
35
39
|
|
|
36
40
|
export type LoadTokenOptions = {
|
|
37
41
|
clientInfo?: string;
|
|
@@ -53,18 +57,22 @@ export class TokenCache implements ITokenCache {
|
|
|
53
57
|
private logger: Logger;
|
|
54
58
|
// Crypto class
|
|
55
59
|
private cryptoObj: ICrypto;
|
|
60
|
+
// Perf client
|
|
61
|
+
private performanceClient: IPerformanceClient;
|
|
56
62
|
|
|
57
63
|
constructor(
|
|
58
64
|
configuration: BrowserConfiguration,
|
|
59
65
|
storage: BrowserCacheManager,
|
|
60
66
|
logger: Logger,
|
|
61
|
-
cryptoObj: ICrypto
|
|
67
|
+
cryptoObj: ICrypto,
|
|
68
|
+
performanceClient: IPerformanceClient
|
|
62
69
|
) {
|
|
63
70
|
this.isBrowserEnvironment = typeof window !== "undefined";
|
|
64
71
|
this.config = configuration;
|
|
65
72
|
this.storage = storage;
|
|
66
73
|
this.logger = logger;
|
|
67
74
|
this.cryptoObj = cryptoObj;
|
|
75
|
+
this.performanceClient = performanceClient;
|
|
68
76
|
}
|
|
69
77
|
|
|
70
78
|
// Move getAllAccounts here and cache utility APIs
|
|
@@ -90,80 +98,120 @@ export class TokenCache implements ITokenCache {
|
|
|
90
98
|
const correlationId =
|
|
91
99
|
request.correlationId || BrowserCrypto.createNewGuid();
|
|
92
100
|
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
const kmsi = AuthToken.isKmsi(idTokenClaims || {});
|
|
97
|
-
|
|
98
|
-
const authorityOptions: AuthorityOptions = {
|
|
99
|
-
protocolMode: this.config.auth.protocolMode,
|
|
100
|
-
knownAuthorities: this.config.auth.knownAuthorities,
|
|
101
|
-
cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,
|
|
102
|
-
authorityMetadata: this.config.auth.authorityMetadata,
|
|
103
|
-
skipAuthorityMetadataCache:
|
|
104
|
-
this.config.auth.skipAuthorityMetadataCache,
|
|
105
|
-
};
|
|
106
|
-
const authority = request.authority
|
|
107
|
-
? new Authority(
|
|
108
|
-
Authority.generateAuthority(
|
|
109
|
-
request.authority,
|
|
110
|
-
request.azureCloudOptions
|
|
111
|
-
),
|
|
112
|
-
this.config.system.networkClient,
|
|
113
|
-
this.storage,
|
|
114
|
-
authorityOptions,
|
|
115
|
-
this.logger,
|
|
116
|
-
request.correlationId || BrowserCrypto.createNewGuid()
|
|
117
|
-
)
|
|
118
|
-
: undefined;
|
|
119
|
-
|
|
120
|
-
const cacheRecordAccount: AccountEntity = await this.loadAccount(
|
|
121
|
-
request,
|
|
122
|
-
options.clientInfo || response.client_info || "",
|
|
123
|
-
correlationId,
|
|
124
|
-
idTokenClaims,
|
|
125
|
-
authority
|
|
101
|
+
const rootMeasurement = this.performanceClient.startMeasurement(
|
|
102
|
+
PerformanceEvents.LoadExternalTokens,
|
|
103
|
+
correlationId
|
|
126
104
|
);
|
|
127
105
|
|
|
128
|
-
|
|
129
|
-
response
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
106
|
+
try {
|
|
107
|
+
const idTokenClaims = response.id_token
|
|
108
|
+
? AuthToken.extractTokenClaims(response.id_token, base64Decode)
|
|
109
|
+
: undefined;
|
|
110
|
+
const kmsi = AuthToken.isKmsi(idTokenClaims || {});
|
|
111
|
+
|
|
112
|
+
const authorityOptions: AuthorityOptions = {
|
|
113
|
+
protocolMode: this.config.auth.protocolMode,
|
|
114
|
+
knownAuthorities: this.config.auth.knownAuthorities,
|
|
115
|
+
cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,
|
|
116
|
+
authorityMetadata: this.config.auth.authorityMetadata,
|
|
117
|
+
skipAuthorityMetadataCache:
|
|
118
|
+
this.config.auth.skipAuthorityMetadataCache,
|
|
119
|
+
};
|
|
120
|
+
const authority = request.authority
|
|
121
|
+
? new Authority(
|
|
122
|
+
Authority.generateAuthority(
|
|
123
|
+
request.authority,
|
|
124
|
+
request.azureCloudOptions
|
|
125
|
+
),
|
|
126
|
+
this.config.system.networkClient,
|
|
127
|
+
this.storage,
|
|
128
|
+
authorityOptions,
|
|
129
|
+
this.logger,
|
|
130
|
+
request.correlationId || BrowserCrypto.createNewGuid()
|
|
131
|
+
)
|
|
132
|
+
: undefined;
|
|
133
|
+
|
|
134
|
+
const cacheRecordAccount: AccountEntity = await invokeAsync(
|
|
135
|
+
this.loadAccount.bind(this),
|
|
136
|
+
PerformanceEvents.LoadAccount,
|
|
137
|
+
this.logger,
|
|
138
|
+
this.performanceClient,
|
|
139
|
+
correlationId
|
|
140
|
+
)(
|
|
141
|
+
request,
|
|
142
|
+
options.clientInfo || response.client_info || "",
|
|
143
|
+
correlationId,
|
|
144
|
+
idTokenClaims,
|
|
145
|
+
authority
|
|
146
|
+
);
|
|
136
147
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
148
|
+
const idToken = await invokeAsync(
|
|
149
|
+
this.loadIdToken.bind(this),
|
|
150
|
+
PerformanceEvents.LoadIdToken,
|
|
151
|
+
this.logger,
|
|
152
|
+
this.performanceClient,
|
|
153
|
+
correlationId
|
|
154
|
+
)(
|
|
155
|
+
response,
|
|
156
|
+
cacheRecordAccount.homeAccountId,
|
|
157
|
+
cacheRecordAccount.environment,
|
|
158
|
+
cacheRecordAccount.realm,
|
|
159
|
+
correlationId,
|
|
160
|
+
kmsi
|
|
161
|
+
);
|
|
147
162
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
163
|
+
const accessToken = await invokeAsync(
|
|
164
|
+
this.loadAccessToken.bind(this),
|
|
165
|
+
PerformanceEvents.LoadAccessToken,
|
|
166
|
+
this.logger,
|
|
167
|
+
this.performanceClient,
|
|
168
|
+
correlationId
|
|
169
|
+
)(
|
|
170
|
+
request,
|
|
171
|
+
response,
|
|
172
|
+
cacheRecordAccount.homeAccountId,
|
|
173
|
+
cacheRecordAccount.environment,
|
|
174
|
+
cacheRecordAccount.realm,
|
|
175
|
+
options,
|
|
176
|
+
correlationId,
|
|
177
|
+
kmsi
|
|
178
|
+
);
|
|
155
179
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
180
|
+
const refreshToken = await invokeAsync(
|
|
181
|
+
this.loadRefreshToken.bind(this),
|
|
182
|
+
PerformanceEvents.LoadRefreshToken,
|
|
183
|
+
this.logger,
|
|
184
|
+
this.performanceClient,
|
|
185
|
+
correlationId
|
|
186
|
+
)(
|
|
187
|
+
response,
|
|
188
|
+
cacheRecordAccount.homeAccountId,
|
|
189
|
+
cacheRecordAccount.environment,
|
|
190
|
+
correlationId,
|
|
191
|
+
kmsi
|
|
192
|
+
);
|
|
193
|
+
|
|
194
|
+
rootMeasurement.end(
|
|
195
|
+
{ success: true },
|
|
196
|
+
undefined,
|
|
197
|
+
AccountEntity.getAccountInfo(cacheRecordAccount)
|
|
198
|
+
);
|
|
199
|
+
|
|
200
|
+
return this.generateAuthenticationResult(
|
|
201
|
+
request,
|
|
202
|
+
{
|
|
203
|
+
account: cacheRecordAccount,
|
|
204
|
+
idToken,
|
|
205
|
+
accessToken,
|
|
206
|
+
refreshToken,
|
|
207
|
+
},
|
|
208
|
+
idTokenClaims,
|
|
209
|
+
authority
|
|
210
|
+
);
|
|
211
|
+
} catch (error) {
|
|
212
|
+
rootMeasurement.end({ success: false }, error);
|
|
213
|
+
throw error;
|
|
214
|
+
}
|
|
167
215
|
}
|
|
168
216
|
|
|
169
217
|
/**
|
|
@@ -191,7 +239,8 @@ export class TokenCache implements ITokenCache {
|
|
|
191
239
|
await this.storage.setAccount(
|
|
192
240
|
accountEntity,
|
|
193
241
|
correlationId,
|
|
194
|
-
AuthToken.isKmsi(idTokenClaims || {})
|
|
242
|
+
AuthToken.isKmsi(idTokenClaims || {}),
|
|
243
|
+
ApiId.loadExternalTokens
|
|
195
244
|
);
|
|
196
245
|
return accountEntity;
|
|
197
246
|
} else if (!authority || (!clientInfo && !idTokenClaims)) {
|
|
@@ -231,7 +280,8 @@ export class TokenCache implements ITokenCache {
|
|
|
231
280
|
await this.storage.setAccount(
|
|
232
281
|
cachedAccount,
|
|
233
282
|
correlationId,
|
|
234
|
-
AuthToken.isKmsi(idTokenClaims || {})
|
|
283
|
+
AuthToken.isKmsi(idTokenClaims || {}),
|
|
284
|
+
ApiId.loadExternalTokens
|
|
235
285
|
);
|
|
236
286
|
return cachedAccount;
|
|
237
287
|
}
|
|
@@ -939,7 +939,8 @@ export class NestedAppAuthController implements IController {
|
|
|
939
939
|
await this.browserStorage.setAccount(
|
|
940
940
|
accountEntity,
|
|
941
941
|
result.correlationId,
|
|
942
|
-
AuthToken.isKmsi(result.idTokenClaims)
|
|
942
|
+
AuthToken.isKmsi(result.idTokenClaims),
|
|
943
|
+
ApiId.hydrateCache
|
|
943
944
|
);
|
|
944
945
|
return this.browserStorage.hydrateCache(result, request);
|
|
945
946
|
}
|
|
@@ -269,7 +269,8 @@ export class StandardController implements IController {
|
|
|
269
269
|
this.config,
|
|
270
270
|
this.browserStorage,
|
|
271
271
|
this.logger,
|
|
272
|
-
this.browserCrypto
|
|
272
|
+
this.browserCrypto,
|
|
273
|
+
this.performanceClient
|
|
273
274
|
);
|
|
274
275
|
|
|
275
276
|
this.activeSilentTokenRequests = new Map();
|
|
@@ -1627,7 +1628,8 @@ export class StandardController implements IController {
|
|
|
1627
1628
|
await this.browserStorage.setAccount(
|
|
1628
1629
|
accountEntity,
|
|
1629
1630
|
result.correlationId,
|
|
1630
|
-
AuthToken.isKmsi(result.idTokenClaims)
|
|
1631
|
+
AuthToken.isKmsi(result.idTokenClaims),
|
|
1632
|
+
ApiId.hydrateCache
|
|
1631
1633
|
);
|
|
1632
1634
|
|
|
1633
1635
|
if (result.fromNativeBroker) {
|
|
@@ -97,7 +97,8 @@ export abstract class CustomAuthInteractionClientBase extends StandardInteractio
|
|
|
97
97
|
protected async handleTokenResponse(
|
|
98
98
|
tokenResponse: SignInTokenResponse,
|
|
99
99
|
requestScopes: string[],
|
|
100
|
-
correlationId: string
|
|
100
|
+
correlationId: string,
|
|
101
|
+
apiId: number
|
|
101
102
|
): Promise<AuthenticationResult> {
|
|
102
103
|
this.logger.verbose("Processing token response.", correlationId);
|
|
103
104
|
|
|
@@ -114,7 +115,8 @@ export abstract class CustomAuthInteractionClientBase extends StandardInteractio
|
|
|
114
115
|
correlationId:
|
|
115
116
|
tokenResponse.correlation_id ?? correlationId,
|
|
116
117
|
scopes: requestScopes,
|
|
117
|
-
}
|
|
118
|
+
},
|
|
119
|
+
apiId
|
|
118
120
|
);
|
|
119
121
|
|
|
120
122
|
return result as AuthenticationResult;
|
|
@@ -154,7 +154,8 @@ export class JitClient extends CustomAuthInteractionClientBase {
|
|
|
154
154
|
const authResult = await this.handleTokenResponse(
|
|
155
155
|
tokenResponse,
|
|
156
156
|
scopes,
|
|
157
|
-
tokenResponse.correlation_id || continueResponse.correlation_id
|
|
157
|
+
tokenResponse.correlation_id || continueResponse.correlation_id,
|
|
158
|
+
apiId
|
|
158
159
|
);
|
|
159
160
|
|
|
160
161
|
return createJitCompletedResult({
|
|
@@ -137,7 +137,8 @@ export class MfaClient extends CustomAuthInteractionClientBase {
|
|
|
137
137
|
const result = await this.handleTokenResponse(
|
|
138
138
|
tokenResponse,
|
|
139
139
|
scopes,
|
|
140
|
-
tokenResponse.correlation_id ?? parameters.correlationId
|
|
140
|
+
tokenResponse.correlation_id ?? parameters.correlationId,
|
|
141
|
+
apiId
|
|
141
142
|
);
|
|
142
143
|
|
|
143
144
|
return createMfaCompletedResult({
|
|
@@ -89,7 +89,8 @@ export class CustomAuthSilentCacheClient extends CustomAuthInteractionClientBase
|
|
|
89
89
|
|
|
90
90
|
const refreshTokenResult =
|
|
91
91
|
await refreshTokenClient.acquireTokenByRefreshToken(
|
|
92
|
-
silentRequest
|
|
92
|
+
silentRequest,
|
|
93
|
+
PublicApiId.ACCOUNT_GET_ACCESS_TOKEN
|
|
93
94
|
);
|
|
94
95
|
|
|
95
96
|
this.logger.verbose(
|
|
@@ -176,7 +176,8 @@ export class SignInClient extends CustomAuthInteractionClientBase {
|
|
|
176
176
|
),
|
|
177
177
|
scopes,
|
|
178
178
|
parameters.correlationId,
|
|
179
|
-
telemetryManager
|
|
179
|
+
telemetryManager,
|
|
180
|
+
apiId
|
|
180
181
|
);
|
|
181
182
|
}
|
|
182
183
|
|
|
@@ -220,7 +221,8 @@ export class SignInClient extends CustomAuthInteractionClientBase {
|
|
|
220
221
|
),
|
|
221
222
|
scopes,
|
|
222
223
|
parameters.correlationId,
|
|
223
|
-
telemetryManager
|
|
224
|
+
telemetryManager,
|
|
225
|
+
apiId
|
|
224
226
|
);
|
|
225
227
|
}
|
|
226
228
|
|
|
@@ -263,7 +265,8 @@ export class SignInClient extends CustomAuthInteractionClientBase {
|
|
|
263
265
|
),
|
|
264
266
|
scopes,
|
|
265
267
|
parameters.correlationId,
|
|
266
|
-
telemetryManager
|
|
268
|
+
telemetryManager,
|
|
269
|
+
apiId
|
|
267
270
|
);
|
|
268
271
|
}
|
|
269
272
|
|
|
@@ -279,7 +282,8 @@ export class SignInClient extends CustomAuthInteractionClientBase {
|
|
|
279
282
|
tokenEndpointCaller: () => Promise<SignInTokenResponse>,
|
|
280
283
|
scopes: string[],
|
|
281
284
|
correlationId: string,
|
|
282
|
-
telemetryManager: ServerTelemetryManager
|
|
285
|
+
telemetryManager: ServerTelemetryManager,
|
|
286
|
+
apiId: number
|
|
283
287
|
): Promise<
|
|
284
288
|
| SignInCompletedResult
|
|
285
289
|
| SignInJitRequiredResult
|
|
@@ -301,7 +305,8 @@ export class SignInClient extends CustomAuthInteractionClientBase {
|
|
|
301
305
|
const authResult = await this.handleTokenResponse(
|
|
302
306
|
tokenResponse,
|
|
303
307
|
scopes,
|
|
304
|
-
correlationId
|
|
308
|
+
correlationId,
|
|
309
|
+
apiId
|
|
305
310
|
);
|
|
306
311
|
|
|
307
312
|
return createSignInCompleteResult({
|
|
@@ -741,7 +741,8 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
741
741
|
await this.browserStorage.setAccount(
|
|
742
742
|
accountEntity,
|
|
743
743
|
this.correlationId,
|
|
744
|
-
kmsi
|
|
744
|
+
kmsi,
|
|
745
|
+
this.apiId
|
|
745
746
|
);
|
|
746
747
|
// Remove any existing cached tokens for this account in browser storage
|
|
747
748
|
this.browserStorage.removeAccountContext(
|
|
@@ -817,6 +818,7 @@ export class PlatformAuthInteractionClient extends BaseInteractionClient {
|
|
|
817
818
|
nativeCacheRecord,
|
|
818
819
|
this.correlationId,
|
|
819
820
|
AuthToken.isKmsi(idTokenClaims),
|
|
821
|
+
this.apiId,
|
|
820
822
|
request.storeInCache
|
|
821
823
|
);
|
|
822
824
|
}
|
|
@@ -74,11 +74,13 @@ export class SilentRefreshClient extends StandardInteractionClient {
|
|
|
74
74
|
this.logger,
|
|
75
75
|
this.performanceClient,
|
|
76
76
|
request.correlationId
|
|
77
|
-
)(silentRequest).catch(
|
|
78
|
-
(e
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
)(silentRequest, ApiId.acquireTokenSilent_silentFlow).catch(
|
|
78
|
+
(e: AuthError) => {
|
|
79
|
+
(e as AuthError).setCorrelationId(this.correlationId);
|
|
80
|
+
serverTelemetryManager.cacheFailedRequest(e);
|
|
81
|
+
throw e;
|
|
82
|
+
}
|
|
83
|
+
) as Promise<AuthenticationResult>;
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
/**
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
BrowserAuthErrorCodes,
|
|
26
26
|
} from "../error/BrowserAuthError.js";
|
|
27
27
|
import { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
28
|
+
import { ApiId } from "../utils/BrowserConstants.js";
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
31
|
* Abstract class which defines operations for a browser interaction handling class.
|
|
@@ -56,7 +57,8 @@ export class InteractionHandler {
|
|
|
56
57
|
*/
|
|
57
58
|
async handleCodeResponse(
|
|
58
59
|
response: AuthorizeResponse,
|
|
59
|
-
request: CommonAuthorizationUrlRequest
|
|
60
|
+
request: CommonAuthorizationUrlRequest,
|
|
61
|
+
apiId: ApiId
|
|
60
62
|
): Promise<AuthenticationResult> {
|
|
61
63
|
this.performanceClient.addQueueMeasurement(
|
|
62
64
|
PerformanceEvents.HandleCodeResponse,
|
|
@@ -89,7 +91,7 @@ export class InteractionHandler {
|
|
|
89
91
|
this.logger,
|
|
90
92
|
this.performanceClient,
|
|
91
93
|
request.correlationId
|
|
92
|
-
)(authCodeResponse, request);
|
|
94
|
+
)(authCodeResponse, request, apiId);
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
/**
|
|
@@ -103,6 +105,7 @@ export class InteractionHandler {
|
|
|
103
105
|
async handleCodeResponseFromServer(
|
|
104
106
|
authCodeResponse: AuthorizationCodePayload,
|
|
105
107
|
request: CommonAuthorizationUrlRequest,
|
|
108
|
+
apiId: ApiId,
|
|
106
109
|
validateNonce: boolean = true
|
|
107
110
|
): Promise<AuthenticationResult> {
|
|
108
111
|
this.performanceClient.addQueueMeasurement(
|
|
@@ -152,7 +155,11 @@ export class InteractionHandler {
|
|
|
152
155
|
this.logger,
|
|
153
156
|
this.performanceClient,
|
|
154
157
|
request.correlationId
|
|
155
|
-
)(
|
|
158
|
+
)(
|
|
159
|
+
this.authCodeRequest,
|
|
160
|
+
apiId,
|
|
161
|
+
authCodeResponse
|
|
162
|
+
)) as AuthenticationResult;
|
|
156
163
|
return tokenResponse;
|
|
157
164
|
}
|
|
158
165
|
|
package/src/packageMetadata.ts
CHANGED
|
@@ -438,7 +438,7 @@ export async function handleResponseCode(
|
|
|
438
438
|
logger,
|
|
439
439
|
performanceClient,
|
|
440
440
|
request.correlationId
|
|
441
|
-
)(response, request);
|
|
441
|
+
)(response, request, apiId);
|
|
442
442
|
|
|
443
443
|
return result;
|
|
444
444
|
}
|
|
@@ -556,6 +556,7 @@ export async function handleResponseEAR(
|
|
|
556
556
|
authority,
|
|
557
557
|
TimeUtils.nowSeconds(),
|
|
558
558
|
request,
|
|
559
|
+
apiId,
|
|
559
560
|
additionalData,
|
|
560
561
|
undefined,
|
|
561
562
|
undefined,
|
|
@@ -112,9 +112,9 @@ export type InMemoryCacheKeys =
|
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
* API Codes for Telemetry purposes.
|
|
115
|
-
* Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs
|
|
116
115
|
* 0-99 Silent Flow
|
|
117
116
|
* 800-899 Auth Code Flow
|
|
117
|
+
* 900-999 Miscellaneous
|
|
118
118
|
*/
|
|
119
119
|
export const ApiId = {
|
|
120
120
|
acquireTokenRedirect: 861,
|
|
@@ -126,9 +126,35 @@ export const ApiId = {
|
|
|
126
126
|
acquireTokenSilent_silentFlow: 61,
|
|
127
127
|
logout: 961,
|
|
128
128
|
logoutPopup: 962,
|
|
129
|
+
hydrateCache: 963,
|
|
130
|
+
loadExternalTokens: 964,
|
|
129
131
|
} as const;
|
|
130
132
|
export type ApiId = (typeof ApiId)[keyof typeof ApiId];
|
|
131
133
|
|
|
134
|
+
/**
|
|
135
|
+
* API Names for Telemetry purposes.
|
|
136
|
+
*/
|
|
137
|
+
export const ApiName = {
|
|
138
|
+
861: "acquireTokenRedirect",
|
|
139
|
+
862: "acquireTokenPopup",
|
|
140
|
+
863: "ssoSilent",
|
|
141
|
+
864: "acquireTokenSilent_authCode",
|
|
142
|
+
865: "handleRedirectPromise",
|
|
143
|
+
866: "acquireTokenByCode",
|
|
144
|
+
61: "acquireTokenSilent_silentFlow",
|
|
145
|
+
961: "logout",
|
|
146
|
+
962: "logoutPopup",
|
|
147
|
+
963: "hydrateCache",
|
|
148
|
+
964: "loadExternalTokens",
|
|
149
|
+
} as const satisfies Record<ApiId, string>;
|
|
150
|
+
|
|
151
|
+
export const apiIdToName = (id: number | undefined): string => {
|
|
152
|
+
if (typeof id === "number" && id in ApiName) {
|
|
153
|
+
return ApiName[id as ApiId];
|
|
154
|
+
}
|
|
155
|
+
return "unknown";
|
|
156
|
+
};
|
|
157
|
+
|
|
132
158
|
/*
|
|
133
159
|
* Interaction type of the API - used for state and telemetry
|
|
134
160
|
*/
|