@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/src/cache/TokenCache.ts
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
Logger,
|
|
11
11
|
ScopeSet,
|
|
12
12
|
Authority,
|
|
13
|
+
AuthorityFactory,
|
|
13
14
|
AuthorityOptions,
|
|
14
15
|
ExternalTokenResponse,
|
|
15
16
|
AccountEntity,
|
|
@@ -20,6 +21,9 @@ import {
|
|
|
20
21
|
CacheHelpers,
|
|
21
22
|
buildAccountToCache,
|
|
22
23
|
TimeUtils,
|
|
24
|
+
IPerformanceClient,
|
|
25
|
+
PerformanceEvents,
|
|
26
|
+
invokeAsync,
|
|
23
27
|
} from "@azure/msal-common/browser";
|
|
24
28
|
import { BrowserConfiguration } from "../config/Configuration.js";
|
|
25
29
|
import type { SilentRequest } from "../request/SilentRequest.js";
|
|
@@ -32,6 +36,7 @@ import {
|
|
|
32
36
|
import type { AuthenticationResult } from "../response/AuthenticationResult.js";
|
|
33
37
|
import { base64Decode } from "../encode/Base64Decode.js";
|
|
34
38
|
import * as BrowserCrypto from "../crypto/BrowserCrypto.js";
|
|
39
|
+
import { ApiId } from "../utils/BrowserConstants.js";
|
|
35
40
|
|
|
36
41
|
export type LoadTokenOptions = {
|
|
37
42
|
clientInfo?: string;
|
|
@@ -53,18 +58,22 @@ export class TokenCache implements ITokenCache {
|
|
|
53
58
|
private logger: Logger;
|
|
54
59
|
// Crypto class
|
|
55
60
|
private cryptoObj: ICrypto;
|
|
61
|
+
// Perf client
|
|
62
|
+
private performanceClient: IPerformanceClient;
|
|
56
63
|
|
|
57
64
|
constructor(
|
|
58
65
|
configuration: BrowserConfiguration,
|
|
59
66
|
storage: BrowserCacheManager,
|
|
60
67
|
logger: Logger,
|
|
61
|
-
cryptoObj: ICrypto
|
|
68
|
+
cryptoObj: ICrypto,
|
|
69
|
+
performanceClient: IPerformanceClient
|
|
62
70
|
) {
|
|
63
71
|
this.isBrowserEnvironment = typeof window !== "undefined";
|
|
64
72
|
this.config = configuration;
|
|
65
73
|
this.storage = storage;
|
|
66
74
|
this.logger = logger;
|
|
67
75
|
this.cryptoObj = cryptoObj;
|
|
76
|
+
this.performanceClient = performanceClient;
|
|
68
77
|
}
|
|
69
78
|
|
|
70
79
|
// Move getAllAccounts here and cache utility APIs
|
|
@@ -90,80 +99,121 @@ export class TokenCache implements ITokenCache {
|
|
|
90
99
|
const correlationId =
|
|
91
100
|
request.correlationId || BrowserCrypto.createNewGuid();
|
|
92
101
|
|
|
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
|
|
102
|
+
const rootMeasurement = this.performanceClient.startMeasurement(
|
|
103
|
+
PerformanceEvents.LoadExternalTokens,
|
|
104
|
+
correlationId
|
|
126
105
|
);
|
|
127
106
|
|
|
128
|
-
|
|
129
|
-
response
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
107
|
+
try {
|
|
108
|
+
const idTokenClaims = response.id_token
|
|
109
|
+
? AuthToken.extractTokenClaims(response.id_token, base64Decode)
|
|
110
|
+
: undefined;
|
|
111
|
+
const kmsi = AuthToken.isKmsi(idTokenClaims || {});
|
|
112
|
+
|
|
113
|
+
const authorityOptions: AuthorityOptions = {
|
|
114
|
+
protocolMode: this.config.auth.protocolMode,
|
|
115
|
+
knownAuthorities: this.config.auth.knownAuthorities,
|
|
116
|
+
cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,
|
|
117
|
+
authorityMetadata: this.config.auth.authorityMetadata,
|
|
118
|
+
skipAuthorityMetadataCache:
|
|
119
|
+
this.config.auth.skipAuthorityMetadataCache,
|
|
120
|
+
};
|
|
121
|
+
const authorityString =
|
|
122
|
+
request.authority || this.config.auth.authority;
|
|
123
|
+
const authority = await AuthorityFactory.createDiscoveredInstance(
|
|
124
|
+
Authority.generateAuthority(
|
|
125
|
+
authorityString,
|
|
126
|
+
request.azureCloudOptions
|
|
127
|
+
),
|
|
128
|
+
this.config.system.networkClient,
|
|
129
|
+
this.storage,
|
|
130
|
+
authorityOptions,
|
|
131
|
+
this.logger,
|
|
132
|
+
correlationId,
|
|
133
|
+
this.performanceClient
|
|
134
|
+
);
|
|
136
135
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
136
|
+
const cacheRecordAccount: AccountEntity = await invokeAsync(
|
|
137
|
+
this.loadAccount.bind(this),
|
|
138
|
+
PerformanceEvents.LoadAccount,
|
|
139
|
+
this.logger,
|
|
140
|
+
this.performanceClient,
|
|
141
|
+
correlationId
|
|
142
|
+
)(
|
|
143
|
+
request,
|
|
144
|
+
options.clientInfo || response.client_info || "",
|
|
145
|
+
correlationId,
|
|
146
|
+
authority,
|
|
147
|
+
idTokenClaims
|
|
148
|
+
);
|
|
147
149
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
150
|
+
const idToken = await invokeAsync(
|
|
151
|
+
this.loadIdToken.bind(this),
|
|
152
|
+
PerformanceEvents.LoadIdToken,
|
|
153
|
+
this.logger,
|
|
154
|
+
this.performanceClient,
|
|
155
|
+
correlationId
|
|
156
|
+
)(
|
|
157
|
+
response,
|
|
158
|
+
cacheRecordAccount.homeAccountId,
|
|
159
|
+
cacheRecordAccount.environment,
|
|
160
|
+
cacheRecordAccount.realm,
|
|
161
|
+
correlationId,
|
|
162
|
+
kmsi
|
|
163
|
+
);
|
|
155
164
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
const accessToken = await invokeAsync(
|
|
166
|
+
this.loadAccessToken.bind(this),
|
|
167
|
+
PerformanceEvents.LoadAccessToken,
|
|
168
|
+
this.logger,
|
|
169
|
+
this.performanceClient,
|
|
170
|
+
correlationId
|
|
171
|
+
)(
|
|
172
|
+
request,
|
|
173
|
+
response,
|
|
174
|
+
cacheRecordAccount.homeAccountId,
|
|
175
|
+
cacheRecordAccount.environment,
|
|
176
|
+
cacheRecordAccount.realm,
|
|
177
|
+
options,
|
|
178
|
+
correlationId,
|
|
179
|
+
kmsi
|
|
180
|
+
);
|
|
181
|
+
|
|
182
|
+
const refreshToken = await invokeAsync(
|
|
183
|
+
this.loadRefreshToken.bind(this),
|
|
184
|
+
PerformanceEvents.LoadRefreshToken,
|
|
185
|
+
this.logger,
|
|
186
|
+
this.performanceClient,
|
|
187
|
+
correlationId
|
|
188
|
+
)(
|
|
189
|
+
response,
|
|
190
|
+
cacheRecordAccount.homeAccountId,
|
|
191
|
+
cacheRecordAccount.environment,
|
|
192
|
+
correlationId,
|
|
193
|
+
kmsi
|
|
194
|
+
);
|
|
195
|
+
|
|
196
|
+
rootMeasurement.end(
|
|
197
|
+
{ success: true },
|
|
198
|
+
undefined,
|
|
199
|
+
AccountEntity.getAccountInfo(cacheRecordAccount)
|
|
200
|
+
);
|
|
201
|
+
|
|
202
|
+
return this.generateAuthenticationResult(
|
|
203
|
+
request,
|
|
204
|
+
{
|
|
205
|
+
account: cacheRecordAccount,
|
|
206
|
+
idToken,
|
|
207
|
+
accessToken,
|
|
208
|
+
refreshToken,
|
|
209
|
+
},
|
|
210
|
+
authority,
|
|
211
|
+
idTokenClaims
|
|
212
|
+
);
|
|
213
|
+
} catch (error) {
|
|
214
|
+
rootMeasurement.end({ success: false }, error);
|
|
215
|
+
throw error;
|
|
216
|
+
}
|
|
167
217
|
}
|
|
168
218
|
|
|
169
219
|
/**
|
|
@@ -179,8 +229,8 @@ export class TokenCache implements ITokenCache {
|
|
|
179
229
|
request: SilentRequest,
|
|
180
230
|
clientInfo: string,
|
|
181
231
|
correlationId: string,
|
|
182
|
-
|
|
183
|
-
|
|
232
|
+
authority: Authority,
|
|
233
|
+
idTokenClaims?: TokenClaims
|
|
184
234
|
): Promise<AccountEntity> {
|
|
185
235
|
this.logger.verbose("TokenCache - loading account");
|
|
186
236
|
|
|
@@ -191,12 +241,13 @@ export class TokenCache implements ITokenCache {
|
|
|
191
241
|
await this.storage.setAccount(
|
|
192
242
|
accountEntity,
|
|
193
243
|
correlationId,
|
|
194
|
-
AuthToken.isKmsi(idTokenClaims || {})
|
|
244
|
+
AuthToken.isKmsi(idTokenClaims || {}),
|
|
245
|
+
ApiId.loadExternalTokens
|
|
195
246
|
);
|
|
196
247
|
return accountEntity;
|
|
197
|
-
} else if (!
|
|
248
|
+
} else if (!clientInfo && !idTokenClaims) {
|
|
198
249
|
this.logger.error(
|
|
199
|
-
"TokenCache - if an account is not provided on the request,
|
|
250
|
+
"TokenCache - if an account is not provided on the request, clientInfo or idToken must be provided instead."
|
|
200
251
|
);
|
|
201
252
|
throw createBrowserAuthError(
|
|
202
253
|
BrowserAuthErrorCodes.unableToLoadToken
|
|
@@ -221,7 +272,7 @@ export class TokenCache implements ITokenCache {
|
|
|
221
272
|
correlationId,
|
|
222
273
|
idTokenClaims,
|
|
223
274
|
clientInfo,
|
|
224
|
-
authority.
|
|
275
|
+
authority.getPreferredCache(),
|
|
225
276
|
claimsTenantId,
|
|
226
277
|
undefined, // authCodePayload
|
|
227
278
|
undefined, // nativeAccountId
|
|
@@ -231,7 +282,8 @@ export class TokenCache implements ITokenCache {
|
|
|
231
282
|
await this.storage.setAccount(
|
|
232
283
|
cachedAccount,
|
|
233
284
|
correlationId,
|
|
234
|
-
AuthToken.isKmsi(idTokenClaims || {})
|
|
285
|
+
AuthToken.isKmsi(idTokenClaims || {}),
|
|
286
|
+
ApiId.loadExternalTokens
|
|
235
287
|
);
|
|
236
288
|
return cachedAccount;
|
|
237
289
|
}
|
|
@@ -368,6 +420,16 @@ export class TokenCache implements ITokenCache {
|
|
|
368
420
|
return null;
|
|
369
421
|
}
|
|
370
422
|
|
|
423
|
+
const expiresOn = response.refresh_token_expires_in
|
|
424
|
+
? response.refresh_token_expires_in + TimeUtils.nowSeconds()
|
|
425
|
+
: undefined;
|
|
426
|
+
this.performanceClient.addFields(
|
|
427
|
+
{
|
|
428
|
+
extRtExpiresOnSeconds: expiresOn,
|
|
429
|
+
},
|
|
430
|
+
correlationId
|
|
431
|
+
);
|
|
432
|
+
|
|
371
433
|
this.logger.verbose("TokenCache - loading refresh token");
|
|
372
434
|
const refreshTokenEntity = CacheHelpers.createRefreshTokenEntity(
|
|
373
435
|
homeAccountId,
|
|
@@ -376,7 +438,7 @@ export class TokenCache implements ITokenCache {
|
|
|
376
438
|
this.config.auth.clientId,
|
|
377
439
|
response.foci,
|
|
378
440
|
undefined, // userAssertionHash
|
|
379
|
-
|
|
441
|
+
expiresOn
|
|
380
442
|
);
|
|
381
443
|
|
|
382
444
|
await this.storage.setRefreshTokenCredential(
|
|
@@ -398,8 +460,8 @@ export class TokenCache implements ITokenCache {
|
|
|
398
460
|
private generateAuthenticationResult(
|
|
399
461
|
request: SilentRequest,
|
|
400
462
|
cacheRecord: CacheRecord & { account: AccountEntity },
|
|
401
|
-
|
|
402
|
-
|
|
463
|
+
authority: Authority,
|
|
464
|
+
idTokenClaims?: TokenClaims
|
|
403
465
|
): AuthenticationResult {
|
|
404
466
|
let accessToken: string = "";
|
|
405
467
|
let responseScopes: Array<string> = [];
|
|
@@ -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
|
*/
|