@azure/msal-browser 5.29.1 → 5.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/app/IPublicClientApplication.mjs +4 -1
- package/dist/app/IPublicClientApplication.mjs.map +1 -1
- package/dist/app/PublicClientApplication.mjs +14 -2
- package/dist/app/PublicClientApplication.mjs.map +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +10 -23
- package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +2 -3
- package/dist/broker/nativeBroker/PlatformAuthProvider.mjs.map +1 -1
- package/dist/broker/nativeBroker/PlatformAuthRequest.mjs +1 -1
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.mjs +40 -4
- 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.mjs +1 -1
- package/dist/config/Configuration.mjs +11 -2
- package/dist/config/Configuration.mjs.map +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +26 -5
- package/dist/controllers/NestedAppAuthController.mjs.map +1 -1
- package/dist/controllers/StandardController.mjs +44 -11
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/crypto/BrowserCrypto.mjs +189 -5
- package/dist/crypto/BrowserCrypto.mjs.map +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/crypto/TokenBindingKeyManager.mjs +1 -1
- package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
- package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +1 -4
- package/dist/custom_auth/CustomAuthPublicClientApplication.mjs.map +1 -1
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs +11 -4
- package/dist/custom_auth/controller/CustomAuthStandardController.mjs.map +1 -1
- package/dist/custom_auth/core/CustomAuthAuthority.mjs +3 -3
- package/dist/custom_auth/core/CustomAuthAuthority.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -4
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -3
- package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -8
- package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -3
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -3
- package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -7
- package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs +1 -2
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs +1 -2
- package/dist/custom_auth/core/auth_flow/v2/CustomAuthResultV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorSubcodesV2.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs +1 -2
- package/dist/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.mjs +1 -2
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs +2 -5
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs +1 -2
- package/dist/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/ChallengeVerificationStateBaseV2.mjs +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs +1 -2
- package/dist/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs +1 -2
- package/dist/custom_auth/core/auth_flow/v2/state/CompletedStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs +1 -2
- package/dist/custom_auth/core/auth_flow/v2/state/FailedStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs +1 -2
- package/dist/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.mjs +2 -3
- package/dist/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
- package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
- package/dist/custom_auth/core/error/HttpError.mjs +1 -1
- package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
- package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
- package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
- package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
- package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
- package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
- package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
- package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
- package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
- package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs +32 -27
- package/dist/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.mjs.map +1 -1
- package/dist/custom_auth/core/interaction_client/v2/InteractionClientBaseV2.mjs +1 -1
- package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs +6 -2
- package/dist/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ApiClientConstantsV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs +7 -5
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs +12 -3
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ErrorCodesV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs +9 -39
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/ResponseHandlerV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/response/ErrorNormalizerV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs +1 -1
- package/dist/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.mjs.map +1 -1
- package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
- package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
- package/dist/custom_auth/core/telemetry/FlowApiIdHelperV2.mjs +1 -1
- package/dist/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
- package/dist/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
- package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
- package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
- package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
- package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +2 -1
- package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs.map +1 -1
- package/dist/custom_auth/index.mjs +1 -1
- package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
- package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs +1 -2
- package/dist/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/reset_password/auth_flow/v2/state/ResetPasswordStateTransitionHandlerV2.mjs +1 -1
- package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -3
- package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -3
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -3
- package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs +1 -2
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.mjs.map +1 -1
- package/dist/custom_auth/sign_in/auth_flow/v2/state/SignInStateTransitionHandlerV2.mjs +1 -1
- package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
- package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs +1 -2
- package/dist/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.mjs.map +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountCodeRequiredStateV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountPasswordRequiredStateV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/ExistingAccountStateTransitionHelperV2.mjs +1 -1
- package/dist/custom_auth/sign_up/auth_flow/v2/state/SignUpStateTransitionHandlerV2.mjs +1 -1
- package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
- package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +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 +3 -2
- package/dist/error/BrowserAuthErrorCodes.mjs.map +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 +4 -2
- package/dist/interaction_client/BaseInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs +18 -5
- package/dist/interaction_client/PlatformAuthInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +27 -21
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +8 -10
- package/dist/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +5 -8
- package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +2 -1
- package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/log-strings-mapping.json +13 -9
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/popup_relay/constants.mjs +24 -6
- package/dist/popup_relay/constants.mjs.map +1 -1
- package/dist/popup_relay/index.mjs +142 -44
- package/dist/popup_relay/index.mjs.map +1 -1
- package/dist/popup_relay/relayClient.mjs +66 -23
- package/dist/popup_relay/relayClient.mjs.map +1 -1
- package/dist/protocol/Authorize.mjs +71 -13
- package/dist/protocol/Authorize.mjs.map +1 -1
- package/dist/redirect_bridge/index.mjs +1 -1
- package/dist/request/RequestHelpers.mjs +2 -1
- package/dist/request/RequestHelpers.mjs.map +1 -1
- package/dist/request/SilentRequestHelpers.mjs +7 -4
- package/dist/request/SilentRequestHelpers.mjs.map +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceEvents.mjs +14 -2
- package/dist/telemetry/BrowserPerformanceEvents.mjs.map +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
- package/dist/utils/BrowserConstants.mjs +1 -1
- package/dist/utils/BrowserDetection.mjs +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/IframeMonitor.mjs +1 -1
- package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
- package/dist/utils/PopupMonitor.mjs +1 -1
- package/dist/utils/PopupOriginCheck.mjs +1 -1
- package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
- package/dist/webBrokerBridge/PerfEventNames.mjs +1 -1
- package/dist/webBrokerBridge/WebBrokerBridgeError.mjs +1 -1
- package/dist/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +1 -1
- package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs +1 -1
- package/dist/webBrokerBridge/index.mjs +1 -1
- package/lib/custom-auth-path/log-strings-mapping.json +13 -9
- package/lib/custom-auth-path/msal-custom-auth.cjs +764 -314
- package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
- package/lib/custom-auth-path/msal-custom-auth.js +764 -314
- package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
- package/lib/log-strings-mapping.json +13 -9
- package/lib/msal-browser.cjs +791 -215
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +791 -215
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +2 -2
- package/lib/popup-relay/msal-popup-relay.cjs +231 -60
- package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
- package/lib/popup-relay/msal-popup-relay.js +231 -60
- package/lib/popup-relay/msal-popup-relay.js.map +1 -1
- package/lib/popup-relay/msal-popup-relay.min.js +2 -2
- package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
- package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
- package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
- package/lib/web-broker-bridge/msal-web-broker-bridge.cjs +1 -1
- package/package.json +2 -2
- package/src/app/IPublicClientApplication.ts +16 -0
- package/src/app/PublicClientApplication.ts +22 -0
- package/src/broker/nativeBroker/PlatformAuthDOMHandler.ts +11 -44
- package/src/broker/nativeBroker/PlatformAuthProvider.ts +1 -2
- package/src/broker/nativeBroker/PlatformAuthResponse.ts +2 -6
- package/src/cache/BrowserCacheManager.ts +66 -6
- package/src/config/Configuration.ts +35 -0
- package/src/controllers/NestedAppAuthController.ts +35 -2
- package/src/controllers/StandardController.ts +76 -12
- package/src/controllers/UnknownOperatingContextController.ts +10 -0
- package/src/crypto/BrowserCrypto.ts +367 -2
- package/src/custom_auth/CustomAuthActionInputs.ts +0 -9
- package/src/custom_auth/CustomAuthPublicClientApplication.ts +0 -3
- package/src/custom_auth/ICustomAuthPublicClientApplicationV2.ts +0 -3
- package/src/custom_auth/controller/CustomAuthStandardController.ts +15 -2
- package/src/custom_auth/core/CustomAuthAuthority.ts +2 -1
- package/src/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.ts +0 -3
- package/src/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.ts +0 -2
- package/src/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.ts +0 -7
- package/src/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.ts +0 -2
- package/src/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.ts +0 -2
- package/src/custom_auth/core/auth_flow/mfa/state/MfaState.ts +0 -6
- package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.ts +0 -4
- package/src/custom_auth/core/auth_flow/v2/CustomAuthResultV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.ts +0 -2
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.ts +0 -3
- package/src/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/state/CompletedStateV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/state/FailedStateV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.ts +0 -1
- package/src/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.ts +8 -6
- package/src/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.ts +1 -0
- package/src/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.ts +43 -29
- package/src/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.ts +21 -2
- package/src/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.ts +12 -8
- package/src/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.ts +35 -4
- package/src/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.ts +10 -47
- package/src/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.ts +1 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.ts +9 -0
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.ts +5 -5
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.ts +2 -5
- package/src/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.ts +2 -4
- package/src/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.ts +1 -0
- package/src/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.ts +0 -2
- package/src/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.ts +0 -1
- package/src/custom_auth/sign_in/auth_flow/result/SignInResult.ts +0 -2
- package/src/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.ts +0 -2
- package/src/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.ts +0 -2
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.ts +0 -2
- package/src/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.ts +0 -2
- package/src/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.ts +0 -1
- package/src/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.ts +0 -2
- package/src/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.ts +0 -2
- package/src/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.ts +0 -1
- package/src/error/AsymmetricEarSubErrors.ts +18 -0
- package/src/error/BrowserAuthErrorCodes.ts +1 -0
- package/src/interaction_client/BaseInteractionClient.ts +6 -1
- package/src/interaction_client/PlatformAuthInteractionClient.ts +28 -8
- package/src/interaction_client/PopupClient.ts +59 -29
- package/src/interaction_client/RedirectClient.ts +10 -13
- package/src/interaction_client/SilentIframeClient.ts +9 -13
- package/src/interaction_client/StandardInteractionClient.ts +1 -0
- package/src/packageMetadata.ts +1 -1
- package/src/popup_relay/constants.ts +34 -3
- package/src/popup_relay/index.ts +200 -45
- package/src/popup_relay/relayClient.ts +108 -24
- package/src/protocol/Authorize.ts +123 -11
- package/src/request/EndSessionPopupRequest.ts +3 -0
- package/src/request/PopupRequest.ts +1 -0
- package/src/request/RedirectRequest.ts +4 -0
- package/src/request/RequestHelpers.ts +5 -0
- package/src/request/SilentRequestHelpers.ts +10 -4
- package/src/request/SsoSilentRequest.ts +1 -0
- package/src/telemetry/BrowserPerformanceEvents.ts +14 -0
- package/types/app/IPublicClientApplication.d.ts +8 -0
- package/types/app/IPublicClientApplication.d.ts.map +1 -1
- package/types/app/PublicClientApplication.d.ts +6 -1
- package/types/app/PublicClientApplication.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts +0 -1
- package/types/broker/nativeBroker/PlatformAuthDOMHandler.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthProvider.d.ts.map +1 -1
- package/types/broker/nativeBroker/PlatformAuthResponse.d.ts +2 -6
- package/types/broker/nativeBroker/PlatformAuthResponse.d.ts.map +1 -1
- package/types/cache/BrowserCacheManager.d.ts +20 -2
- package/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/types/config/Configuration.d.ts +14 -0
- package/types/config/Configuration.d.ts.map +1 -1
- package/types/controllers/NestedAppAuthController.d.ts +5 -0
- package/types/controllers/NestedAppAuthController.d.ts.map +1 -1
- package/types/controllers/StandardController.d.ts +4 -0
- package/types/controllers/StandardController.d.ts.map +1 -1
- package/types/controllers/UnknownOperatingContextController.d.ts +5 -0
- package/types/controllers/UnknownOperatingContextController.d.ts.map +1 -1
- package/types/crypto/BrowserCrypto.d.ts +34 -0
- package/types/crypto/BrowserCrypto.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthActionInputs.d.ts +0 -9
- package/types/custom_auth/CustomAuthActionInputs.d.ts.map +1 -1
- package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
- package/types/custom_auth/CustomAuthPublicClientApplication.d.ts +0 -3
- package/types/custom_auth/CustomAuthPublicClientApplication.d.ts.map +1 -1
- package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts +0 -3
- package/types/custom_auth/ICustomAuthPublicClientApplicationV2.d.ts.map +1 -1
- package/types/custom_auth/controller/CustomAuthStandardController.d.ts.map +1 -1
- package/types/custom_auth/core/CustomAuthAuthority.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.d.ts +0 -3
- package/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.d.ts +0 -7
- package/types/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/mfa/state/MfaState.d.ts +0 -6
- package/types/custom_auth/core/auth_flow/mfa/state/MfaState.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodRegistrationV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/AuthenticationMethodV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts +0 -4
- package/types/custom_auth/core/auth_flow/v2/CustomAuthFlowScenarioV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/CustomAuthResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/error/AuthFlowErrorV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodRegistrationChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/v2/result/AuthMethodVerificationSubmitChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/v2/result/MFASubmitChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/v2/result/RequestChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/v2/result/ResetPasswordStartResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/v2/result/SubmitPasswordResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts +0 -2
- package/types/custom_auth/core/auth_flow/v2/result/VerifyChallengeResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodRegistrationRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodSelectionRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/AuthMethodVerificationRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/CodeRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/CompletedStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/FailedStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/MFAVerificationRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.d.ts +0 -1
- package/types/custom_auth/core/auth_flow/v2/state/PasswordRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts +1 -0
- package/types/custom_auth/core/interaction_client/v2/FlowContinuationStateV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts +3 -2
- package/types/custom_auth/core/interaction_client/v2/FlowInteractionClientV2.d.ts.map +1 -1
- package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts +10 -1
- package/types/custom_auth/core/interaction_client/v2/result/FlowActionResultV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.d.ts +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/BaseApiClientV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/CustomAuthApiClientV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/HrefResolverV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts +1 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/request/RequestsV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts +8 -0
- package/types/custom_auth/core/network_client/custom_auth_api/v2/response/ResponsesV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts +4 -5
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/BaseResultsV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts +3 -6
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/ResetPasswordResultsV2.d.ts.map +1 -1
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts +2 -5
- package/types/custom_auth/core/network_client/custom_auth_api/v2/result/SignUpResultsV2.d.ts.map +1 -1
- package/types/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.d.ts.map +1 -1
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts +0 -2
- package/types/custom_auth/reset_password/auth_flow/v2/result/SubmitNewPasswordResultV2.d.ts.map +1 -1
- package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts +0 -1
- package/types/custom_auth/reset_password/auth_flow/v2/state/NewPasswordRequiredStateV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/result/SignInResult.d.ts +0 -2
- package/types/custom_auth/sign_in/auth_flow/result/SignInResult.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.d.ts +0 -2
- package/types/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.d.ts +0 -2
- package/types/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts +0 -2
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInContinuationResultV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts +0 -2
- package/types/custom_auth/sign_in/auth_flow/v2/result/SignInStartResultV2.d.ts.map +1 -1
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts +0 -1
- package/types/custom_auth/sign_in/auth_flow/v2/state/SignInContinuationStateV2.d.ts.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts +0 -2
- package/types/custom_auth/sign_up/auth_flow/v2/result/SignUpStartResultV2.d.ts.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts +0 -2
- package/types/custom_auth/sign_up/auth_flow/v2/result/SubmitAttributesResultV2.d.ts.map +1 -1
- package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts +0 -1
- package/types/custom_auth/sign_up/auth_flow/v2/state/AttributesRequiredStateV2.d.ts.map +1 -1
- package/types/error/AsymmetricEarSubErrors.d.ts +14 -0
- package/types/error/AsymmetricEarSubErrors.d.ts.map +1 -0
- package/types/error/BrowserAuthErrorCodes.d.ts +1 -0
- package/types/error/BrowserAuthErrorCodes.d.ts.map +1 -1
- package/types/interaction_client/BaseInteractionClient.d.ts +3 -2
- package/types/interaction_client/BaseInteractionClient.d.ts.map +1 -1
- package/types/interaction_client/PlatformAuthInteractionClient.d.ts.map +1 -1
- package/types/interaction_client/PopupClient.d.ts +3 -1
- package/types/interaction_client/PopupClient.d.ts.map +1 -1
- package/types/interaction_client/RedirectClient.d.ts +0 -1
- package/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/types/packageMetadata.d.ts +1 -1
- package/types/popup_relay/constants.d.ts +10 -3
- package/types/popup_relay/constants.d.ts.map +1 -1
- package/types/popup_relay/index.d.ts +27 -11
- package/types/popup_relay/index.d.ts.map +1 -1
- package/types/popup_relay/relayClient.d.ts +9 -11
- package/types/popup_relay/relayClient.d.ts.map +1 -1
- package/types/protocol/Authorize.d.ts +5 -0
- package/types/protocol/Authorize.d.ts.map +1 -1
- package/types/request/EndSessionPopupRequest.d.ts +3 -0
- package/types/request/EndSessionPopupRequest.d.ts.map +1 -1
- package/types/request/PopupRequest.d.ts +1 -1
- package/types/request/PopupRequest.d.ts.map +1 -1
- package/types/request/RedirectRequest.d.ts +4 -1
- package/types/request/RedirectRequest.d.ts.map +1 -1
- package/types/request/RequestHelpers.d.ts.map +1 -1
- package/types/request/SilentRequestHelpers.d.ts +1 -1
- package/types/request/SilentRequestHelpers.d.ts.map +1 -1
- package/types/request/SsoSilentRequest.d.ts +1 -1
- package/types/request/SsoSilentRequest.d.ts.map +1 -1
- package/types/telemetry/BrowserPerformanceEvents.d.ts +12 -0
- package/types/telemetry/BrowserPerformanceEvents.d.ts.map +1 -1
package/lib/msal-browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v5.
|
|
1
|
+
/*! @azure/msal-browser v5.31.0 2026-12-02 */
|
|
2
2
|
'use strict';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.msal = {}));
|
|
7
7
|
})(this, (function (exports) { 'use strict';
|
|
8
8
|
|
|
9
|
-
/*! @azure/msal-common v16.
|
|
9
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
10
10
|
/*
|
|
11
11
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12
12
|
* Licensed under the MIT License.
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
*/
|
|
67
67
|
const POPUP_ORIGIN_CHECK_DONE = "pocd";
|
|
68
68
|
|
|
69
|
-
/*! @azure/msal-common v16.
|
|
69
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
70
70
|
/*
|
|
71
71
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
72
72
|
* Licensed under the MIT License.
|
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
// Token renewal offset default in seconds
|
|
306
306
|
const DEFAULT_TOKEN_RENEWAL_OFFSET_SEC = 300;
|
|
307
307
|
|
|
308
|
-
/*! @azure/msal-common v16.
|
|
308
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
309
309
|
/*
|
|
310
310
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
311
311
|
* Licensed under the MIT License.
|
|
@@ -334,7 +334,7 @@
|
|
|
334
334
|
return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage$1(code));
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
/*! @azure/msal-common v16.
|
|
337
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
338
338
|
|
|
339
339
|
/*
|
|
340
340
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -357,7 +357,7 @@
|
|
|
357
357
|
return new ClientAuthError(errorCode, correlationId, additionalMessage);
|
|
358
358
|
}
|
|
359
359
|
|
|
360
|
-
/*! @azure/msal-common v16.
|
|
360
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
361
361
|
/*
|
|
362
362
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
363
363
|
* Licensed under the MIT License.
|
|
@@ -443,7 +443,7 @@
|
|
|
443
443
|
userCanceled: userCanceled
|
|
444
444
|
});
|
|
445
445
|
|
|
446
|
-
/*! @azure/msal-common v16.
|
|
446
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
447
447
|
|
|
448
448
|
/*
|
|
449
449
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -481,7 +481,7 @@
|
|
|
481
481
|
};
|
|
482
482
|
}
|
|
483
483
|
|
|
484
|
-
/*! @azure/msal-common v16.
|
|
484
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
485
485
|
|
|
486
486
|
/*
|
|
487
487
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -547,7 +547,7 @@
|
|
|
547
547
|
return matches[2];
|
|
548
548
|
}
|
|
549
549
|
|
|
550
|
-
/*! @azure/msal-common v16.
|
|
550
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
551
551
|
|
|
552
552
|
/*
|
|
553
553
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -635,7 +635,7 @@
|
|
|
635
635
|
return updatedAccountInfo;
|
|
636
636
|
}
|
|
637
637
|
|
|
638
|
-
/*! @azure/msal-common v16.
|
|
638
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
639
639
|
/*
|
|
640
640
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
641
641
|
* Licensed under the MIT License.
|
|
@@ -649,7 +649,7 @@
|
|
|
649
649
|
Ciam: 3,
|
|
650
650
|
};
|
|
651
651
|
|
|
652
|
-
/*! @azure/msal-common v16.
|
|
652
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
653
653
|
/*
|
|
654
654
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
655
655
|
* Licensed under the MIT License.
|
|
@@ -671,7 +671,7 @@
|
|
|
671
671
|
return null;
|
|
672
672
|
}
|
|
673
673
|
|
|
674
|
-
/*! @azure/msal-common v16.
|
|
674
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
675
675
|
/*
|
|
676
676
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
677
677
|
* Licensed under the MIT License.
|
|
@@ -695,7 +695,7 @@
|
|
|
695
695
|
EAR: "EAR",
|
|
696
696
|
};
|
|
697
697
|
|
|
698
|
-
/*! @azure/msal-common v16.
|
|
698
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
699
699
|
/**
|
|
700
700
|
* Returns the AccountInfo interface for this account.
|
|
701
701
|
* @internal
|
|
@@ -884,7 +884,7 @@
|
|
|
884
884
|
entity.hasOwnProperty("authorityType"));
|
|
885
885
|
}
|
|
886
886
|
|
|
887
|
-
/*! @azure/msal-common v16.
|
|
887
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
888
888
|
/*
|
|
889
889
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
890
890
|
* Licensed under the MIT License.
|
|
@@ -901,7 +901,7 @@
|
|
|
901
901
|
unexpectedError: unexpectedError
|
|
902
902
|
});
|
|
903
903
|
|
|
904
|
-
/*! @azure/msal-common v16.
|
|
904
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
905
905
|
|
|
906
906
|
/*
|
|
907
907
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -921,7 +921,7 @@
|
|
|
921
921
|
return new ClientConfigurationError(errorCode, correlationId);
|
|
922
922
|
}
|
|
923
923
|
|
|
924
|
-
/*! @azure/msal-common v16.
|
|
924
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
925
925
|
/*
|
|
926
926
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
927
927
|
* Licensed under the MIT License.
|
|
@@ -961,7 +961,7 @@
|
|
|
961
961
|
return headerName === undefined ? undefined : headers[headerName];
|
|
962
962
|
}
|
|
963
963
|
|
|
964
|
-
/*! @azure/msal-common v16.
|
|
964
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
965
965
|
/*
|
|
966
966
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
967
967
|
* Licensed under the MIT License.
|
|
@@ -1031,7 +1031,7 @@
|
|
|
1031
1031
|
urlParseError: urlParseError
|
|
1032
1032
|
});
|
|
1033
1033
|
|
|
1034
|
-
/*! @azure/msal-common v16.
|
|
1034
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1035
1035
|
|
|
1036
1036
|
/*
|
|
1037
1037
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1051,21 +1051,38 @@
|
|
|
1051
1051
|
* @returns
|
|
1052
1052
|
*/
|
|
1053
1053
|
getShrNonce() {
|
|
1054
|
-
// Attempt to parse nonce from
|
|
1054
|
+
// Attempt to parse nonce from Authentication-Info
|
|
1055
1055
|
const authenticationInfo = getResponseHeader(this.headers, HeaderNames.AuthenticationInfo);
|
|
1056
1056
|
if (authenticationInfo) {
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1057
|
+
// Also support the legacy PoP-prefixed Authentication-Info form.
|
|
1058
|
+
const parameters = this.parseChallenges(authenticationInfo.trim().replace(/^PoP[ \t]+/i, ""));
|
|
1059
|
+
for (const parameter of parameters) {
|
|
1060
|
+
const nextNonce = getHeaderParameter(parameter, "nextnonce");
|
|
1061
|
+
if (nextNonce) {
|
|
1062
|
+
return nextNonce;
|
|
1063
|
+
}
|
|
1060
1064
|
}
|
|
1061
1065
|
throw createClientConfigurationError(invalidAuthenticationHeader, "");
|
|
1062
1066
|
}
|
|
1063
1067
|
// Attempt to parse nonce from WWW-Authenticate
|
|
1064
1068
|
const wwwAuthenticate = getResponseHeader(this.headers, HeaderNames.WWWAuthenticate);
|
|
1065
1069
|
if (wwwAuthenticate) {
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1070
|
+
let isPopChallenge = false;
|
|
1071
|
+
for (const parameter of this.parseChallenges(wwwAuthenticate)) {
|
|
1072
|
+
const scheme = /^[^ \t=]+/.exec(parameter)?.[0] || "";
|
|
1073
|
+
const remainder = parameter.slice(scheme.length).trim();
|
|
1074
|
+
let authParameter = parameter;
|
|
1075
|
+
// A scheme starts a new challenge; whitespace before '=' does not.
|
|
1076
|
+
if (scheme && !remainder.startsWith("=")) {
|
|
1077
|
+
isPopChallenge = scheme.toLowerCase() === "pop";
|
|
1078
|
+
authParameter = remainder;
|
|
1079
|
+
}
|
|
1080
|
+
if (isPopChallenge) {
|
|
1081
|
+
const nonce = getHeaderParameter(authParameter, "nonce");
|
|
1082
|
+
if (nonce) {
|
|
1083
|
+
return nonce;
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1069
1086
|
}
|
|
1070
1087
|
throw createClientConfigurationError(invalidAuthenticationHeader, "");
|
|
1071
1088
|
}
|
|
@@ -1073,24 +1090,53 @@
|
|
|
1073
1090
|
throw createClientConfigurationError(missingNonceAuthenticationHeader, "");
|
|
1074
1091
|
}
|
|
1075
1092
|
/**
|
|
1076
|
-
*
|
|
1093
|
+
* Splits authentication parameters without splitting commas inside quoted strings.
|
|
1077
1094
|
* @param header
|
|
1078
1095
|
* @returns
|
|
1079
1096
|
*/
|
|
1080
1097
|
parseChallenges(header) {
|
|
1081
|
-
const
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
const
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1098
|
+
const parameters = [];
|
|
1099
|
+
let inQuotes = false;
|
|
1100
|
+
let start = 0;
|
|
1101
|
+
for (let i = 0; i < header.length; i++) {
|
|
1102
|
+
const character = header[i];
|
|
1103
|
+
if (inQuotes && character === "\\") {
|
|
1104
|
+
i++;
|
|
1105
|
+
}
|
|
1106
|
+
else if (character === '"') {
|
|
1107
|
+
inQuotes = !inQuotes;
|
|
1108
|
+
}
|
|
1109
|
+
else if (character === "," && !inQuotes) {
|
|
1110
|
+
parameters.push(header.slice(start, i).trim());
|
|
1111
|
+
start = i + 1;
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
if (!inQuotes) {
|
|
1115
|
+
parameters.push(header.slice(start).trim());
|
|
1116
|
+
}
|
|
1117
|
+
return parameters;
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
/**
|
|
1121
|
+
* Reads a named authentication parameter, removing only HTTP quoted-string syntax.
|
|
1122
|
+
* @param parameter - A single authentication parameter.
|
|
1123
|
+
* @param name - The parameter name to read.
|
|
1124
|
+
* @returns The opaque parameter value, or undefined if the name does not match.
|
|
1125
|
+
*/
|
|
1126
|
+
function getHeaderParameter(parameter, name) {
|
|
1127
|
+
const separator = parameter.indexOf("=");
|
|
1128
|
+
if (separator === -1 ||
|
|
1129
|
+
parameter.slice(0, separator).trim().toLowerCase() !== name) {
|
|
1130
|
+
return undefined;
|
|
1090
1131
|
}
|
|
1132
|
+
const value = parameter.slice(separator + 1).trim();
|
|
1133
|
+
if (value.startsWith('"') && value.endsWith('"')) {
|
|
1134
|
+
return value.slice(1, -1).replace(/\\(.)/g, "$1");
|
|
1135
|
+
}
|
|
1136
|
+
return value;
|
|
1091
1137
|
}
|
|
1092
1138
|
|
|
1093
|
-
/*! @azure/msal-common v16.
|
|
1139
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1094
1140
|
/*
|
|
1095
1141
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1096
1142
|
* Licensed under the MIT License.
|
|
@@ -1102,7 +1148,7 @@
|
|
|
1102
1148
|
response.hasOwnProperty("jwks_uri"));
|
|
1103
1149
|
}
|
|
1104
1150
|
|
|
1105
|
-
/*! @azure/msal-common v16.
|
|
1151
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1106
1152
|
/*
|
|
1107
1153
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1108
1154
|
* Licensed under the MIT License.
|
|
@@ -1182,7 +1228,7 @@
|
|
|
1182
1228
|
}
|
|
1183
1229
|
}
|
|
1184
1230
|
|
|
1185
|
-
/*! @azure/msal-common v16.
|
|
1231
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1186
1232
|
|
|
1187
1233
|
/*
|
|
1188
1234
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1369,7 +1415,7 @@
|
|
|
1369
1415
|
}
|
|
1370
1416
|
}
|
|
1371
1417
|
|
|
1372
|
-
/*! @azure/msal-common v16.
|
|
1418
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1373
1419
|
|
|
1374
1420
|
/*
|
|
1375
1421
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1523,7 +1569,7 @@
|
|
|
1523
1569
|
return null;
|
|
1524
1570
|
}
|
|
1525
1571
|
|
|
1526
|
-
/*! @azure/msal-common v16.
|
|
1572
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1527
1573
|
/*
|
|
1528
1574
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1529
1575
|
* Licensed under the MIT License.
|
|
@@ -1541,7 +1587,7 @@
|
|
|
1541
1587
|
AzureUsGovernment: "https://login.microsoftonline.us",
|
|
1542
1588
|
};
|
|
1543
1589
|
|
|
1544
|
-
/*! @azure/msal-common v16.
|
|
1590
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1545
1591
|
/*
|
|
1546
1592
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1547
1593
|
* Licensed under the MIT License.
|
|
@@ -1551,7 +1597,7 @@
|
|
|
1551
1597
|
response.hasOwnProperty("metadata"));
|
|
1552
1598
|
}
|
|
1553
1599
|
|
|
1554
|
-
/*! @azure/msal-common v16.
|
|
1600
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1555
1601
|
/*
|
|
1556
1602
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1557
1603
|
* Licensed under the MIT License.
|
|
@@ -1561,7 +1607,7 @@
|
|
|
1561
1607
|
response.hasOwnProperty("error_description"));
|
|
1562
1608
|
}
|
|
1563
1609
|
|
|
1564
|
-
/*! @azure/msal-common v16.
|
|
1610
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1565
1611
|
/*
|
|
1566
1612
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1567
1613
|
* Licensed under the MIT License.
|
|
@@ -1632,7 +1678,7 @@
|
|
|
1632
1678
|
const CacheManagerGetRefreshToken = "cacheManagerGetRefreshToken";
|
|
1633
1679
|
const SetUserData = "setUserData";
|
|
1634
1680
|
|
|
1635
|
-
/*! @azure/msal-common v16.
|
|
1681
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1636
1682
|
/*
|
|
1637
1683
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1638
1684
|
* Licensed under the MIT License.
|
|
@@ -1726,7 +1772,7 @@
|
|
|
1726
1772
|
};
|
|
1727
1773
|
};
|
|
1728
1774
|
|
|
1729
|
-
/*! @azure/msal-common v16.
|
|
1775
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1730
1776
|
|
|
1731
1777
|
/*
|
|
1732
1778
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1855,7 +1901,7 @@
|
|
|
1855
1901
|
},
|
|
1856
1902
|
};
|
|
1857
1903
|
|
|
1858
|
-
/*! @azure/msal-common v16.
|
|
1904
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1859
1905
|
/*
|
|
1860
1906
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
1861
1907
|
* Licensed under the MIT License.
|
|
@@ -1920,7 +1966,7 @@
|
|
|
1920
1966
|
return cachedAtSec > nowSeconds();
|
|
1921
1967
|
}
|
|
1922
1968
|
|
|
1923
|
-
/*! @azure/msal-common v16.
|
|
1969
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
1924
1970
|
|
|
1925
1971
|
/*
|
|
1926
1972
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -2207,7 +2253,7 @@
|
|
|
2207
2253
|
return [...attributeTokens].sort().join(" ");
|
|
2208
2254
|
}
|
|
2209
2255
|
|
|
2210
|
-
/*! @azure/msal-common v16.
|
|
2256
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
2211
2257
|
|
|
2212
2258
|
/*
|
|
2213
2259
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3178,7 +3224,7 @@
|
|
|
3178
3224
|
};
|
|
3179
3225
|
}
|
|
3180
3226
|
|
|
3181
|
-
/*! @azure/msal-common v16.
|
|
3227
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
3182
3228
|
|
|
3183
3229
|
/*
|
|
3184
3230
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3212,7 +3258,7 @@
|
|
|
3212
3258
|
}
|
|
3213
3259
|
}
|
|
3214
3260
|
|
|
3215
|
-
/*! @azure/msal-common v16.
|
|
3261
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
3216
3262
|
|
|
3217
3263
|
/*
|
|
3218
3264
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3408,7 +3454,7 @@
|
|
|
3408
3454
|
}
|
|
3409
3455
|
}
|
|
3410
3456
|
|
|
3411
|
-
/*! @azure/msal-common v16.
|
|
3457
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
3412
3458
|
|
|
3413
3459
|
/*
|
|
3414
3460
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -3876,12 +3922,13 @@
|
|
|
3876
3922
|
* Add EAR (Encrypted Authorize Response) request parameters
|
|
3877
3923
|
* @param parameters
|
|
3878
3924
|
* @param jwk
|
|
3925
|
+
* @param jweCrypto - Base64-encoded encryption metadata; defaults to symmetric EAR.
|
|
3879
3926
|
*/
|
|
3880
|
-
function addEARParameters(parameters, jwk) {
|
|
3927
|
+
function addEARParameters(parameters, jwk, jweCrypto) {
|
|
3881
3928
|
parameters.set(EAR_JWK, encodeURIComponent(jwk));
|
|
3882
|
-
//
|
|
3929
|
+
// Default symmetric EAR metadata; asymmetric requests supply their APV.
|
|
3883
3930
|
const jweCryptoB64Encoded = "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0";
|
|
3884
|
-
parameters.set(EAR_JWE_CRYPTO, jweCryptoB64Encoded);
|
|
3931
|
+
parameters.set(EAR_JWE_CRYPTO, jweCrypto ?? jweCryptoB64Encoded);
|
|
3885
3932
|
}
|
|
3886
3933
|
function addResource(parameters, resource) {
|
|
3887
3934
|
if (resource) {
|
|
@@ -3908,7 +3955,7 @@
|
|
|
3908
3955
|
}
|
|
3909
3956
|
}
|
|
3910
3957
|
|
|
3911
|
-
/*! @azure/msal-common v16.
|
|
3958
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
3912
3959
|
|
|
3913
3960
|
/*
|
|
3914
3961
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4039,7 +4086,7 @@
|
|
|
4039
4086
|
}
|
|
4040
4087
|
}
|
|
4041
4088
|
|
|
4042
|
-
/*! @azure/msal-common v16.
|
|
4089
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
4043
4090
|
|
|
4044
4091
|
/*
|
|
4045
4092
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4087,7 +4134,7 @@
|
|
|
4087
4134
|
},
|
|
4088
4135
|
};
|
|
4089
4136
|
|
|
4090
|
-
/*! @azure/msal-common v16.
|
|
4137
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
4091
4138
|
|
|
4092
4139
|
/*
|
|
4093
4140
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4110,7 +4157,7 @@
|
|
|
4110
4157
|
},
|
|
4111
4158
|
};
|
|
4112
4159
|
|
|
4113
|
-
/*! @azure/msal-common v16.
|
|
4160
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
4114
4161
|
/*
|
|
4115
4162
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4116
4163
|
* Licensed under the MIT License.
|
|
@@ -4399,12 +4446,12 @@
|
|
|
4399
4446
|
}
|
|
4400
4447
|
}
|
|
4401
4448
|
|
|
4402
|
-
/*! @azure/msal-common v16.
|
|
4449
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
4403
4450
|
/* eslint-disable header/header */
|
|
4404
4451
|
const name$1 = "@azure/msal-common";
|
|
4405
|
-
const version$1 = "16.
|
|
4452
|
+
const version$1 = "16.18.0";
|
|
4406
4453
|
|
|
4407
|
-
/*! @azure/msal-common v16.
|
|
4454
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
4408
4455
|
/*
|
|
4409
4456
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4410
4457
|
* Licensed under the MIT License.
|
|
@@ -4412,7 +4459,7 @@
|
|
|
4412
4459
|
const cacheQuotaExceeded = "cache_quota_exceeded";
|
|
4413
4460
|
const cacheErrorUnknown = "cache_error_unknown";
|
|
4414
4461
|
|
|
4415
|
-
/*! @azure/msal-common v16.
|
|
4462
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
4416
4463
|
|
|
4417
4464
|
/*
|
|
4418
4465
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -4450,7 +4497,7 @@
|
|
|
4450
4497
|
}
|
|
4451
4498
|
}
|
|
4452
4499
|
|
|
4453
|
-
/*! @azure/msal-common v16.
|
|
4500
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
4454
4501
|
|
|
4455
4502
|
/*
|
|
4456
4503
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5678,7 +5725,7 @@
|
|
|
5678
5725
|
}
|
|
5679
5726
|
}
|
|
5680
5727
|
|
|
5681
|
-
/*! @azure/msal-common v16.
|
|
5728
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
5682
5729
|
/*
|
|
5683
5730
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5684
5731
|
* Licensed under the MIT License.
|
|
@@ -5740,10 +5787,11 @@
|
|
|
5740
5787
|
"networkRtt",
|
|
5741
5788
|
"redirectBridgeTimeoutMs",
|
|
5742
5789
|
"redirectBridgeMessageVersion",
|
|
5790
|
+
"popupRelayProtocolVersion",
|
|
5743
5791
|
"fetchRetryCount",
|
|
5744
5792
|
]);
|
|
5745
5793
|
|
|
5746
|
-
/*! @azure/msal-common v16.
|
|
5794
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
5747
5795
|
|
|
5748
5796
|
/*
|
|
5749
5797
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5801,7 +5849,7 @@
|
|
|
5801
5849
|
}
|
|
5802
5850
|
}
|
|
5803
5851
|
|
|
5804
|
-
/*! @azure/msal-common v16.
|
|
5852
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
5805
5853
|
|
|
5806
5854
|
/*
|
|
5807
5855
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5855,7 +5903,7 @@
|
|
|
5855
5903
|
* @returns Configuration
|
|
5856
5904
|
* @internal
|
|
5857
5905
|
*/
|
|
5858
|
-
function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, tokenBindingKeyManager: tokenBindingKeyManager, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }) {
|
|
5906
|
+
function buildClientConfiguration({ authOptions: userAuthOptions, systemOptions: userSystemOptions, loggerOptions: userLoggerOption, storageInterface: storageImplementation, networkInterface: networkImplementation, cryptoInterface: cryptoImplementation, tokenBindingKeyManager: tokenBindingKeyManager, dpopNonceProvider: dpopNonceProvider, clientCredentials: clientCredentials, libraryInfo: libraryInfo, telemetry: telemetry, serverTelemetryManager: serverTelemetryManager, persistencePlugin: persistencePlugin, serializableCache: serializableCache, }) {
|
|
5859
5907
|
const loggerOptions = {
|
|
5860
5908
|
...DEFAULT_LOGGER_IMPLEMENTATION,
|
|
5861
5909
|
...userLoggerOption,
|
|
@@ -5870,6 +5918,7 @@
|
|
|
5870
5918
|
networkInterface: networkImplementation || DEFAULT_NETWORK_IMPLEMENTATION,
|
|
5871
5919
|
cryptoInterface: cryptoImplementation || DEFAULT_CRYPTO_IMPLEMENTATION,
|
|
5872
5920
|
tokenBindingKeyManager: resolvedTokenBindingKeyManager,
|
|
5921
|
+
dpopNonceProvider,
|
|
5873
5922
|
clientCredentials: clientCredentials || DEFAULT_CLIENT_CREDENTIALS,
|
|
5874
5923
|
libraryInfo: { ...DEFAULT_LIBRARY_INFO, ...libraryInfo },
|
|
5875
5924
|
telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...telemetry },
|
|
@@ -5899,7 +5948,7 @@
|
|
|
5899
5948
|
return (config.authOptions.authority.options.protocolMode === ProtocolMode.OIDC);
|
|
5900
5949
|
}
|
|
5901
5950
|
|
|
5902
|
-
/*! @azure/msal-common v16.
|
|
5951
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
5903
5952
|
/*
|
|
5904
5953
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5905
5954
|
* Licensed under the MIT License.
|
|
@@ -5926,7 +5975,7 @@
|
|
|
5926
5975
|
}
|
|
5927
5976
|
}
|
|
5928
5977
|
|
|
5929
|
-
/*! @azure/msal-common v16.
|
|
5978
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
5930
5979
|
|
|
5931
5980
|
/*
|
|
5932
5981
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -5947,7 +5996,7 @@
|
|
|
5947
5996
|
return new JoseHeaderError(code, correlationId);
|
|
5948
5997
|
}
|
|
5949
5998
|
|
|
5950
|
-
/*! @azure/msal-common v16.
|
|
5999
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
5951
6000
|
/*
|
|
5952
6001
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5953
6002
|
* Licensed under the MIT License.
|
|
@@ -5972,7 +6021,7 @@
|
|
|
5972
6021
|
return Object.getPrototypeOf(value) === proto;
|
|
5973
6022
|
}
|
|
5974
6023
|
|
|
5975
|
-
/*! @azure/msal-common v16.
|
|
6024
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
5976
6025
|
/*
|
|
5977
6026
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
5978
6027
|
* Licensed under the MIT License.
|
|
@@ -5982,7 +6031,7 @@
|
|
|
5982
6031
|
const missingJwkError = "missing_jwk_error";
|
|
5983
6032
|
const invalidJwkError = "invalid_jwk_error";
|
|
5984
6033
|
|
|
5985
|
-
/*! @azure/msal-common v16.
|
|
6034
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
5986
6035
|
|
|
5987
6036
|
/*
|
|
5988
6037
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6048,7 +6097,7 @@
|
|
|
6048
6097
|
}
|
|
6049
6098
|
}
|
|
6050
6099
|
|
|
6051
|
-
/*! @azure/msal-common v16.
|
|
6100
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6052
6101
|
|
|
6053
6102
|
/*
|
|
6054
6103
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6149,7 +6198,50 @@
|
|
|
6149
6198
|
}
|
|
6150
6199
|
}
|
|
6151
6200
|
|
|
6152
|
-
/*! @azure/msal-common v16.
|
|
6201
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6202
|
+
|
|
6203
|
+
/*
|
|
6204
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6205
|
+
* Licensed under the MIT License.
|
|
6206
|
+
*/
|
|
6207
|
+
/**
|
|
6208
|
+
* Validates that a DPoP nonce is a non-empty string and returns the opaque
|
|
6209
|
+
* value unchanged.
|
|
6210
|
+
* @internal
|
|
6211
|
+
*/
|
|
6212
|
+
function validateDpopNonce(nonce, correlationId = "") {
|
|
6213
|
+
if (typeof nonce !== "string" || nonce.length === 0) {
|
|
6214
|
+
throw createClientConfigurationError(invalidDpopNonce, correlationId);
|
|
6215
|
+
}
|
|
6216
|
+
return nonce;
|
|
6217
|
+
}
|
|
6218
|
+
/**
|
|
6219
|
+
* Returns the normalized HTTPS origin used to scope a resource-server nonce.
|
|
6220
|
+
* @internal
|
|
6221
|
+
*/
|
|
6222
|
+
function canonicalizeDpopResourceServer(resourceRequestUri, correlationId = "") {
|
|
6223
|
+
if (typeof resourceRequestUri !== "string" ||
|
|
6224
|
+
!/^https:\/\//i.test(resourceRequestUri)) {
|
|
6225
|
+
throw createClientConfigurationError(invalidDpopHtu, correlationId);
|
|
6226
|
+
}
|
|
6227
|
+
let parsedUrl;
|
|
6228
|
+
try {
|
|
6229
|
+
parsedUrl = new URL(resourceRequestUri);
|
|
6230
|
+
}
|
|
6231
|
+
catch {
|
|
6232
|
+
throw createClientConfigurationError(invalidDpopHtu, correlationId);
|
|
6233
|
+
}
|
|
6234
|
+
if (parsedUrl.protocol !== "https:" ||
|
|
6235
|
+
parsedUrl.origin === "null" ||
|
|
6236
|
+
!parsedUrl.hostname ||
|
|
6237
|
+
parsedUrl.username ||
|
|
6238
|
+
parsedUrl.password) {
|
|
6239
|
+
throw createClientConfigurationError(invalidDpopHtu, correlationId);
|
|
6240
|
+
}
|
|
6241
|
+
return parsedUrl.origin;
|
|
6242
|
+
}
|
|
6243
|
+
|
|
6244
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6153
6245
|
|
|
6154
6246
|
/*
|
|
6155
6247
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6194,11 +6286,6 @@
|
|
|
6194
6286
|
parsedUrl.hash = "";
|
|
6195
6287
|
return parsedUrl.href;
|
|
6196
6288
|
}
|
|
6197
|
-
function validateDpopNonce(nonce, correlationId) {
|
|
6198
|
-
if (nonce !== undefined && nonce.trim().length === 0) {
|
|
6199
|
-
throw createClientConfigurationError(invalidDpopNonce, correlationId);
|
|
6200
|
-
}
|
|
6201
|
-
}
|
|
6202
6289
|
/**
|
|
6203
6290
|
* Validates and normalizes the HTTP resource context for a DPoP-bound request.
|
|
6204
6291
|
* @internal
|
|
@@ -6242,7 +6329,6 @@
|
|
|
6242
6329
|
* - jti is a fresh CSPRNG-backed unique identifier for every proof.
|
|
6243
6330
|
*/
|
|
6244
6331
|
buildTokenProofClaims(params, correlationId = "") {
|
|
6245
|
-
validateDpopNonce(params.nonce, correlationId);
|
|
6246
6332
|
const claims = {
|
|
6247
6333
|
jti: this.cryptoUtils.createNewGuid(),
|
|
6248
6334
|
htm: "POST",
|
|
@@ -6250,7 +6336,7 @@
|
|
|
6250
6336
|
iat: nowSeconds(),
|
|
6251
6337
|
};
|
|
6252
6338
|
if (params.nonce !== undefined) {
|
|
6253
|
-
claims.nonce = params.nonce;
|
|
6339
|
+
claims.nonce = validateDpopNonce(params.nonce, correlationId);
|
|
6254
6340
|
}
|
|
6255
6341
|
return claims;
|
|
6256
6342
|
}
|
|
@@ -6268,7 +6354,6 @@
|
|
|
6268
6354
|
* - jti is a fresh CSPRNG-backed unique identifier for every proof.
|
|
6269
6355
|
*/
|
|
6270
6356
|
buildResourceProofClaims(params, correlationId = "") {
|
|
6271
|
-
validateDpopNonce(params.nonce, correlationId);
|
|
6272
6357
|
const resourceContext = normalizeDpopResourceRequestContext(params, correlationId);
|
|
6273
6358
|
const claims = {
|
|
6274
6359
|
jti: this.cryptoUtils.createNewGuid(),
|
|
@@ -6278,7 +6363,7 @@
|
|
|
6278
6363
|
iat: nowSeconds(),
|
|
6279
6364
|
};
|
|
6280
6365
|
if (params.nonce !== undefined) {
|
|
6281
|
-
claims.nonce = params.nonce;
|
|
6366
|
+
claims.nonce = validateDpopNonce(params.nonce, correlationId);
|
|
6282
6367
|
}
|
|
6283
6368
|
return claims;
|
|
6284
6369
|
}
|
|
@@ -6304,7 +6389,7 @@
|
|
|
6304
6389
|
}
|
|
6305
6390
|
}
|
|
6306
6391
|
|
|
6307
|
-
/*! @azure/msal-common v16.
|
|
6392
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6308
6393
|
/*
|
|
6309
6394
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6310
6395
|
* Licensed under the MIT License.
|
|
@@ -6368,7 +6453,7 @@
|
|
|
6368
6453
|
uiNotAllowed: uiNotAllowed
|
|
6369
6454
|
});
|
|
6370
6455
|
|
|
6371
|
-
/*! @azure/msal-common v16.
|
|
6456
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6372
6457
|
|
|
6373
6458
|
/*
|
|
6374
6459
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6435,7 +6520,7 @@
|
|
|
6435
6520
|
return new InteractionRequiredAuthError(errorCode, correlationId, errorMessage);
|
|
6436
6521
|
}
|
|
6437
6522
|
|
|
6438
|
-
/*! @azure/msal-common v16.
|
|
6523
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6439
6524
|
|
|
6440
6525
|
/*
|
|
6441
6526
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6454,7 +6539,7 @@
|
|
|
6454
6539
|
}
|
|
6455
6540
|
}
|
|
6456
6541
|
|
|
6457
|
-
/*! @azure/msal-common v16.
|
|
6542
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6458
6543
|
|
|
6459
6544
|
/*
|
|
6460
6545
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -6525,18 +6610,29 @@
|
|
|
6525
6610
|
}
|
|
6526
6611
|
}
|
|
6527
6612
|
|
|
6528
|
-
/*! @azure/msal-common v16.
|
|
6613
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6529
6614
|
|
|
6530
6615
|
/*
|
|
6531
6616
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6532
6617
|
* Licensed under the MIT License.
|
|
6533
6618
|
*/
|
|
6619
|
+
/*
|
|
6620
|
+
* Retains the signing key for fresh proofs on deduplicated calls without
|
|
6621
|
+
* exposing it on the public AuthenticationResult.
|
|
6622
|
+
*/
|
|
6623
|
+
const dpopKeyIdByAuthenticationResult = new WeakMap();
|
|
6624
|
+
function getDpopNonceForRequest(dpopNonceProvider, request) {
|
|
6625
|
+
if (!request.resourceRequestUri || !dpopNonceProvider) {
|
|
6626
|
+
return undefined;
|
|
6627
|
+
}
|
|
6628
|
+
return dpopNonceProvider.getDpopNonce(request.resourceRequestUri, request.correlationId);
|
|
6629
|
+
}
|
|
6534
6630
|
/**
|
|
6535
6631
|
* Class that handles response parsing.
|
|
6536
6632
|
* @internal
|
|
6537
6633
|
*/
|
|
6538
6634
|
class ResponseHandler {
|
|
6539
|
-
constructor(clientId, cacheStorage, cryptoObj, logger, performanceClient, serializableCache, persistencePlugin, tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER) {
|
|
6635
|
+
constructor(clientId, cacheStorage, cryptoObj, logger, performanceClient, serializableCache, persistencePlugin, tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER, dpopNonceProvider) {
|
|
6540
6636
|
this.clientId = clientId;
|
|
6541
6637
|
this.cacheStorage = cacheStorage;
|
|
6542
6638
|
this.cryptoObj = cryptoObj;
|
|
@@ -6545,6 +6641,7 @@
|
|
|
6545
6641
|
this.performanceClient = performanceClient;
|
|
6546
6642
|
this.serializableCache = serializableCache;
|
|
6547
6643
|
this.persistencePlugin = persistencePlugin;
|
|
6644
|
+
this.dpopNonceProvider = dpopNonceProvider;
|
|
6548
6645
|
}
|
|
6549
6646
|
/**
|
|
6550
6647
|
* Function which validates server authorization token response.
|
|
@@ -6683,6 +6780,7 @@
|
|
|
6683
6780
|
requestState: requestStateObj,
|
|
6684
6781
|
requestId: serverRequestId,
|
|
6685
6782
|
tokenBindingKeyManager: this.tokenBindingKeyManager,
|
|
6783
|
+
dpopNonceProvider: this.dpopNonceProvider,
|
|
6686
6784
|
});
|
|
6687
6785
|
}
|
|
6688
6786
|
}
|
|
@@ -6702,6 +6800,7 @@
|
|
|
6702
6800
|
serverTokenResponse,
|
|
6703
6801
|
requestId: serverRequestId,
|
|
6704
6802
|
tokenBindingKeyManager: this.tokenBindingKeyManager,
|
|
6803
|
+
dpopNonceProvider: this.dpopNonceProvider,
|
|
6705
6804
|
});
|
|
6706
6805
|
}
|
|
6707
6806
|
/**
|
|
@@ -6799,7 +6898,7 @@
|
|
|
6799
6898
|
* @param stateString
|
|
6800
6899
|
*/
|
|
6801
6900
|
static async generateAuthenticationResult(cryptoObj, authority, cacheRecord, fromTokenCache, request, performanceClient, options = {}) {
|
|
6802
|
-
const { idTokenClaims, requestState, serverTokenResponse, requestId, tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER, } = options;
|
|
6901
|
+
const { idTokenClaims, requestState, serverTokenResponse, requestId, tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER, dpopNonceProvider, } = options;
|
|
6803
6902
|
let accessToken = "";
|
|
6804
6903
|
let responseScopes = [];
|
|
6805
6904
|
let expiresOn = null;
|
|
@@ -6807,8 +6906,13 @@
|
|
|
6807
6906
|
let refreshOn;
|
|
6808
6907
|
let familyId = "";
|
|
6809
6908
|
let dpopProof;
|
|
6909
|
+
const cachedAccessTokenType = cacheRecord.accessToken?.tokenType || "";
|
|
6910
|
+
const isDpopAccessToken = cachedAccessTokenType.toLowerCase() ===
|
|
6911
|
+
AuthenticationScheme$1.DPOP.toLowerCase();
|
|
6912
|
+
const resultTokenType = isDpopAccessToken
|
|
6913
|
+
? AuthenticationScheme$1.DPOP
|
|
6914
|
+
: cachedAccessTokenType;
|
|
6810
6915
|
if (cacheRecord.accessToken) {
|
|
6811
|
-
const accessTokenType = cacheRecord.accessToken.tokenType?.toLowerCase();
|
|
6812
6916
|
/*
|
|
6813
6917
|
* if the request object has `popKid` property, `signPopToken` will be set to false and
|
|
6814
6918
|
* the token will be returned unsigned
|
|
@@ -6826,15 +6930,17 @@
|
|
|
6826
6930
|
else {
|
|
6827
6931
|
accessToken = cacheRecord.accessToken.secret;
|
|
6828
6932
|
}
|
|
6829
|
-
if (
|
|
6830
|
-
AuthenticationScheme$1.DPOP.toLowerCase()) {
|
|
6933
|
+
if (isDpopAccessToken) {
|
|
6831
6934
|
if (!cacheRecord.accessToken.keyId) {
|
|
6832
6935
|
throw createClientAuthError(keyIdMissing, request.correlationId);
|
|
6833
6936
|
}
|
|
6834
6937
|
const dpopProofGenerator = new DpopProofGenerator(cryptoObj, tokenBindingKeyManager);
|
|
6938
|
+
const dpopNonce = getDpopNonceForRequest(dpopNonceProvider, request);
|
|
6939
|
+
performanceClient?.addFields({ dpopNonceAppliedToProof: Boolean(dpopNonce) }, request.correlationId);
|
|
6835
6940
|
dpopProof = await dpopProofGenerator.generateResourceProof({
|
|
6836
6941
|
htu: request.resourceRequestUri,
|
|
6837
6942
|
htm: request.resourceRequestMethod,
|
|
6943
|
+
nonce: dpopNonce,
|
|
6838
6944
|
accessToken: cacheRecord.accessToken.secret,
|
|
6839
6945
|
}, cacheRecord.accessToken.keyId, request.correlationId);
|
|
6840
6946
|
}
|
|
@@ -6882,7 +6988,7 @@
|
|
|
6882
6988
|
? updateAccountTenantProfileData(getAccountInfo(cacheRecord.account), undefined, // tenantProfile optional
|
|
6883
6989
|
idTokenClaims, cacheRecord.idToken?.secret)
|
|
6884
6990
|
: null;
|
|
6885
|
-
|
|
6991
|
+
const authenticationResult = {
|
|
6886
6992
|
authority: authority.canonicalAuthority,
|
|
6887
6993
|
uniqueId: uid,
|
|
6888
6994
|
tenantId: tid,
|
|
@@ -6899,16 +7005,49 @@
|
|
|
6899
7005
|
correlationId: request.correlationId,
|
|
6900
7006
|
requestId: requestId || "",
|
|
6901
7007
|
familyId: familyId,
|
|
6902
|
-
tokenType:
|
|
6903
|
-
AuthenticationScheme$1.DPOP.toLowerCase()
|
|
6904
|
-
? AuthenticationScheme$1.DPOP
|
|
6905
|
-
: cacheRecord.accessToken?.tokenType || "",
|
|
7008
|
+
tokenType: resultTokenType,
|
|
6906
7009
|
state: requestState ? requestState.userRequestState : "",
|
|
6907
7010
|
cloudGraphHostName: cacheRecord.account?.cloudGraphHostName || "",
|
|
6908
7011
|
msGraphHost: cacheRecord.account?.msGraphHost || "",
|
|
6909
7012
|
code: serverTokenResponse?.spa_code,
|
|
6910
7013
|
fromPlatformBroker: false,
|
|
6911
7014
|
};
|
|
7015
|
+
if (isDpopAccessToken && cacheRecord.accessToken?.keyId) {
|
|
7016
|
+
ResponseHandler.setDpopKeyId(authenticationResult, cacheRecord.accessToken.keyId);
|
|
7017
|
+
}
|
|
7018
|
+
return authenticationResult;
|
|
7019
|
+
}
|
|
7020
|
+
/**
|
|
7021
|
+
* Retains an MSAL-owned DPoP key for fresh proofs on deduplicated calls.
|
|
7022
|
+
* @internal
|
|
7023
|
+
*/
|
|
7024
|
+
static setDpopKeyId(authenticationResult, keyId) {
|
|
7025
|
+
dpopKeyIdByAuthenticationResult.set(authenticationResult, keyId);
|
|
7026
|
+
}
|
|
7027
|
+
/**
|
|
7028
|
+
* Returns whether MSAL can generate another proof for this result.
|
|
7029
|
+
* @internal
|
|
7030
|
+
*/
|
|
7031
|
+
static hasDpopKeyId(authenticationResult) {
|
|
7032
|
+
return dpopKeyIdByAuthenticationResult.has(authenticationResult);
|
|
7033
|
+
}
|
|
7034
|
+
/**
|
|
7035
|
+
* Generates a fresh resource proof for a previously constructed DPoP result.
|
|
7036
|
+
* @internal
|
|
7037
|
+
*/
|
|
7038
|
+
static async generateDpopResourceProof(cryptoObj, authenticationResult, request, performanceClient, options = {}) {
|
|
7039
|
+
const keyId = dpopKeyIdByAuthenticationResult.get(authenticationResult);
|
|
7040
|
+
if (!keyId) {
|
|
7041
|
+
throw createClientAuthError(keyIdMissing, request.correlationId);
|
|
7042
|
+
}
|
|
7043
|
+
const dpopNonce = getDpopNonceForRequest(options.dpopNonceProvider, request);
|
|
7044
|
+
performanceClient.addFields({ dpopNonceAppliedToProof: Boolean(dpopNonce) }, request.correlationId);
|
|
7045
|
+
return new DpopProofGenerator(cryptoObj, options.tokenBindingKeyManager ?? DEFAULT_TOKEN_BINDING_KEY_MANAGER).generateResourceProof({
|
|
7046
|
+
htu: request.resourceRequestUri,
|
|
7047
|
+
htm: request.resourceRequestMethod,
|
|
7048
|
+
nonce: dpopNonce,
|
|
7049
|
+
accessToken: authenticationResult.accessToken,
|
|
7050
|
+
}, keyId, request.correlationId);
|
|
6912
7051
|
}
|
|
6913
7052
|
}
|
|
6914
7053
|
/** @internal */
|
|
@@ -6953,7 +7092,7 @@
|
|
|
6953
7092
|
return baseAccount;
|
|
6954
7093
|
}
|
|
6955
7094
|
|
|
6956
|
-
/*! @azure/msal-common v16.
|
|
7095
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6957
7096
|
/*
|
|
6958
7097
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6959
7098
|
* Licensed under the MIT License.
|
|
@@ -6963,7 +7102,7 @@
|
|
|
6963
7102
|
UPN: "UPN",
|
|
6964
7103
|
};
|
|
6965
7104
|
|
|
6966
|
-
/*! @azure/msal-common v16.
|
|
7105
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6967
7106
|
/*
|
|
6968
7107
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6969
7108
|
* Licensed under the MIT License.
|
|
@@ -6982,7 +7121,7 @@
|
|
|
6982
7121
|
}
|
|
6983
7122
|
}
|
|
6984
7123
|
|
|
6985
|
-
/*! @azure/msal-common v16.
|
|
7124
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
6986
7125
|
|
|
6987
7126
|
/*
|
|
6988
7127
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7006,7 +7145,7 @@
|
|
|
7006
7145
|
};
|
|
7007
7146
|
}
|
|
7008
7147
|
|
|
7009
|
-
/*! @azure/msal-common v16.
|
|
7148
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
7010
7149
|
|
|
7011
7150
|
/*
|
|
7012
7151
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7096,7 +7235,7 @@
|
|
|
7096
7235
|
return undefined;
|
|
7097
7236
|
}
|
|
7098
7237
|
|
|
7099
|
-
/*! @azure/msal-common v16.
|
|
7238
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
7100
7239
|
|
|
7101
7240
|
/*
|
|
7102
7241
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7127,7 +7266,7 @@
|
|
|
7127
7266
|
return new NetworkError(error, httpStatus, responseHeaders);
|
|
7128
7267
|
}
|
|
7129
7268
|
|
|
7130
|
-
/*! @azure/msal-common v16.
|
|
7269
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
7131
7270
|
|
|
7132
7271
|
/*
|
|
7133
7272
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7261,7 +7400,7 @@
|
|
|
7261
7400
|
return response;
|
|
7262
7401
|
}
|
|
7263
7402
|
|
|
7264
|
-
/*! @azure/msal-common v16.
|
|
7403
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
7265
7404
|
|
|
7266
7405
|
/*
|
|
7267
7406
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7312,7 +7451,7 @@
|
|
|
7312
7451
|
const response = await invokeAsync(this.executeTokenRequest.bind(this), AuthClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(this.authority, request, this.serverTelemetryManager);
|
|
7313
7452
|
// Retrieve requestId from response headers
|
|
7314
7453
|
const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
|
|
7315
|
-
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin, this.config.tokenBindingKeyManager);
|
|
7454
|
+
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin, this.config.tokenBindingKeyManager, this.config.dpopNonceProvider);
|
|
7316
7455
|
// Validate response. This function throws a server error if an error is returned by the server.
|
|
7317
7456
|
responseHandler.validateTokenResponse(response.body, request.correlationId);
|
|
7318
7457
|
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, apiId, authCodePayload, undefined, undefined, undefined, requestId);
|
|
@@ -7529,7 +7668,7 @@
|
|
|
7529
7668
|
}
|
|
7530
7669
|
}
|
|
7531
7670
|
|
|
7532
|
-
/*! @azure/msal-common v16.
|
|
7671
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
7533
7672
|
|
|
7534
7673
|
/*
|
|
7535
7674
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -7759,7 +7898,7 @@
|
|
|
7759
7898
|
return account.loginHint || account.idTokenClaims?.login_hint || null;
|
|
7760
7899
|
}
|
|
7761
7900
|
|
|
7762
|
-
/*! @azure/msal-common v16.
|
|
7901
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
7763
7902
|
|
|
7764
7903
|
/*
|
|
7765
7904
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8308,7 +8447,7 @@
|
|
|
8308
8447
|
}
|
|
8309
8448
|
}
|
|
8310
8449
|
|
|
8311
|
-
/*! @azure/msal-common v16.
|
|
8450
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
8312
8451
|
|
|
8313
8452
|
/*
|
|
8314
8453
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8343,7 +8482,7 @@
|
|
|
8343
8482
|
const response = await invokeAsync(this.executeTokenRequest.bind(this), RefreshTokenClientExecuteTokenRequest, this.logger, this.performanceClient, request.correlationId)(request, this.authority);
|
|
8344
8483
|
// Retrieve requestId from response headers
|
|
8345
8484
|
const requestId = response.headers?.[HeaderNames.X_MS_REQUEST_ID];
|
|
8346
|
-
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin, this.config.tokenBindingKeyManager);
|
|
8485
|
+
const responseHandler = new ResponseHandler(this.config.authOptions.clientId, this.cacheManager, this.cryptoUtils, this.logger, this.performanceClient, this.config.serializableCache, this.config.persistencePlugin, this.config.tokenBindingKeyManager, this.config.dpopNonceProvider);
|
|
8347
8486
|
responseHandler.validateTokenResponse(response.body, request.correlationId);
|
|
8348
8487
|
return invokeAsync(responseHandler.handleServerTokenResponse.bind(responseHandler), HandleServerTokenResponse, this.logger, this.performanceClient, request.correlationId)(response.body, this.authority, reqTimestamp, request, apiId, undefined, undefined, true, request.forceCache, requestId);
|
|
8349
8488
|
}
|
|
@@ -8543,7 +8682,7 @@
|
|
|
8543
8682
|
}
|
|
8544
8683
|
}
|
|
8545
8684
|
|
|
8546
|
-
/*! @azure/msal-common v16.
|
|
8685
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
8547
8686
|
|
|
8548
8687
|
/*
|
|
8549
8688
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8836,7 +8975,7 @@
|
|
|
8836
8975
|
clearNativeBrokerErrorCode() { }
|
|
8837
8976
|
}
|
|
8838
8977
|
|
|
8839
|
-
/*! @azure/msal-common v16.
|
|
8978
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
8840
8979
|
|
|
8841
8980
|
/*
|
|
8842
8981
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8959,11 +9098,12 @@
|
|
|
8959
9098
|
return ResponseHandler.generateAuthenticationResult(this.cryptoUtils, this.authority, cacheRecord, true, request, this.performanceClient, {
|
|
8960
9099
|
idTokenClaims,
|
|
8961
9100
|
tokenBindingKeyManager: this.config.tokenBindingKeyManager,
|
|
9101
|
+
dpopNonceProvider: this.config.dpopNonceProvider,
|
|
8962
9102
|
});
|
|
8963
9103
|
}
|
|
8964
9104
|
}
|
|
8965
9105
|
|
|
8966
|
-
/*! @azure/msal-common v16.
|
|
9106
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
8967
9107
|
|
|
8968
9108
|
/*
|
|
8969
9109
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8979,7 +9119,7 @@
|
|
|
8979
9119
|
},
|
|
8980
9120
|
};
|
|
8981
9121
|
|
|
8982
|
-
/*! @azure/msal-common v16.
|
|
9122
|
+
/*! @azure/msal-common v16.18.0 2026-12-02 */
|
|
8983
9123
|
|
|
8984
9124
|
/*
|
|
8985
9125
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -9031,6 +9171,11 @@
|
|
|
9031
9171
|
* Internal API for acquireTokenSilent.
|
|
9032
9172
|
*/
|
|
9033
9173
|
const AcquireTokenSilentAsync = "acquireTokenSilentAsync";
|
|
9174
|
+
/**
|
|
9175
|
+
* loadDpopNonce API in StandardController (msal-browser).
|
|
9176
|
+
* Stores a resource-server DPoP nonce in controller-owned memory.
|
|
9177
|
+
*/
|
|
9178
|
+
const StandardControllerLoadDpopNonce = "standardControllerLoadDpopNonce";
|
|
9034
9179
|
/**
|
|
9035
9180
|
* provisionTokenBindingKey API in TokenBindingKeyManager class (msal-browser).
|
|
9036
9181
|
* Used to provision token-binding key material and return a key identifier.
|
|
@@ -9146,6 +9291,13 @@
|
|
|
9146
9291
|
const Encrypt = "encrypt";
|
|
9147
9292
|
const Decrypt = "decrypt";
|
|
9148
9293
|
const GenerateEarKey = "generateEarKey";
|
|
9294
|
+
const GenerateAsymmetricEarKey = "generateAsymmetricEarKey";
|
|
9295
|
+
const ImportAsymmetricEarKey = "importAsymmetricEarKey";
|
|
9296
|
+
const ImportAsymmetricEarPublicKey = "importAsymmetricEarPublicKey";
|
|
9297
|
+
const DeriveAsymmetricEarSecret = "deriveAsymmetricEarSecret";
|
|
9298
|
+
const AsymmetricEarConcatKdf = "asymmetricEarConcatKdf";
|
|
9299
|
+
const ImportAsymmetricEarContentKey = "importAsymmetricEarContentKey";
|
|
9300
|
+
const DecryptAsymmetricEarResponse = "decryptAsymmetricEarResponse";
|
|
9149
9301
|
const DecryptEarResponse = "decryptEarResponse";
|
|
9150
9302
|
const LoadAccount = "loadAccount";
|
|
9151
9303
|
const LoadIdToken = "loadIdToken";
|
|
@@ -9216,11 +9368,13 @@
|
|
|
9216
9368
|
const failedToBuildHeaders = "failed_to_build_headers";
|
|
9217
9369
|
const failedToParseHeaders = "failed_to_parse_headers";
|
|
9218
9370
|
const failedToDecryptEarResponse = "failed_to_decrypt_ear_response";
|
|
9371
|
+
const asymmetricEarKeyError = "asymmetric_ear_key_error";
|
|
9219
9372
|
const timedOut = "timed_out";
|
|
9220
9373
|
const emptyResponse = "empty_response";
|
|
9221
9374
|
|
|
9222
9375
|
var BrowserAuthErrorCodes = /*#__PURE__*/Object.freeze({
|
|
9223
9376
|
__proto__: null,
|
|
9377
|
+
asymmetricEarKeyError: asymmetricEarKeyError,
|
|
9224
9378
|
authCodeOrNativeAccountIdRequired: authCodeOrNativeAccountIdRequired,
|
|
9225
9379
|
authCodeRequired: authCodeRequired,
|
|
9226
9380
|
authRequestNotSetError: authRequestNotSetError,
|
|
@@ -9616,6 +9770,10 @@
|
|
|
9616
9770
|
const S256_HASH_ALG = "SHA-256";
|
|
9617
9771
|
// JWK values used by browser-internal WebCrypto helpers.
|
|
9618
9772
|
const JSON_WEB_KEY_CURVE_P256 = "P-256";
|
|
9773
|
+
const ECDH_P384_ALGORITHM = {
|
|
9774
|
+
name: "ECDH",
|
|
9775
|
+
namedCurve: "P-384",
|
|
9776
|
+
};
|
|
9619
9777
|
const JSON_WEB_KEY_TYPE_EC = "EC";
|
|
9620
9778
|
const JSON_WEB_KEY_TYPE_RSA = "RSA";
|
|
9621
9779
|
const MISSING_JWK_KTY_SUBERROR = "missing_jwk_kty";
|
|
@@ -9753,6 +9911,16 @@
|
|
|
9753
9911
|
async function exportJwk(key) {
|
|
9754
9912
|
return window.crypto.subtle.exportKey(KEY_FORMAT_JWK, key);
|
|
9755
9913
|
}
|
|
9914
|
+
/**
|
|
9915
|
+
* Imports key as Json Web Key (JWK), can set extractable and usages.
|
|
9916
|
+
* @param key
|
|
9917
|
+
* @param extractable
|
|
9918
|
+
* @param usages
|
|
9919
|
+
* @param algorithm
|
|
9920
|
+
*/
|
|
9921
|
+
async function importJwk(key, extractable, usages, algorithm) {
|
|
9922
|
+
return window.crypto.subtle.importKey(KEY_FORMAT_JWK, key, algorithm, extractable, usages);
|
|
9923
|
+
}
|
|
9756
9924
|
/**
|
|
9757
9925
|
* Signs given data with given key.
|
|
9758
9926
|
* @param key
|
|
@@ -9775,6 +9943,172 @@
|
|
|
9775
9943
|
};
|
|
9776
9944
|
return base64Encode(JSON.stringify(jwk));
|
|
9777
9945
|
}
|
|
9946
|
+
/**
|
|
9947
|
+
* Generates P-384 ECDH keys for request-scoped private sessionStorage and public wire metadata.
|
|
9948
|
+
* @internal
|
|
9949
|
+
*/
|
|
9950
|
+
async function generateAsymmetricEarKey() {
|
|
9951
|
+
const keyPair = await generateKeyPair(true, ["deriveBits"], ECDH_P384_ALGORITHM);
|
|
9952
|
+
const publicJwk = await exportJwk(keyPair.publicKey);
|
|
9953
|
+
const privateJwk = await exportJwk(keyPair.privateKey);
|
|
9954
|
+
return {
|
|
9955
|
+
privateJwk,
|
|
9956
|
+
publicJwk,
|
|
9957
|
+
};
|
|
9958
|
+
}
|
|
9959
|
+
/**
|
|
9960
|
+
* Restores a private EAR key as non-exportable. The serialized sessionStorage copy remains exportable.
|
|
9961
|
+
* @internal
|
|
9962
|
+
*/
|
|
9963
|
+
async function importAsymmetricEarKey(privateJwk, correlationId = "") {
|
|
9964
|
+
if (privateJwk?.kty !== "EC" ||
|
|
9965
|
+
privateJwk.crv !== "P-384" ||
|
|
9966
|
+
!privateJwk.d) {
|
|
9967
|
+
throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "invalid_private_key" /* AsymmetricEarSubErrors.InvalidPrivateKey */);
|
|
9968
|
+
}
|
|
9969
|
+
try {
|
|
9970
|
+
return await importJwk(privateJwk, false, ["deriveBits"], ECDH_P384_ALGORITHM);
|
|
9971
|
+
}
|
|
9972
|
+
catch {
|
|
9973
|
+
throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "private_key_import_failed" /* AsymmetricEarSubErrors.PrivateKeyImportFailed */);
|
|
9974
|
+
}
|
|
9975
|
+
}
|
|
9976
|
+
/**
|
|
9977
|
+
* Encodes the EAR client party information with a fresh 192-bit nonce.
|
|
9978
|
+
* @internal
|
|
9979
|
+
*/
|
|
9980
|
+
function generateAsymmetricEarApv(publicJwk) {
|
|
9981
|
+
const point = new Uint8Array(concatEarBytes(new Uint8Array([4]), decodeEarBase64Url(publicJwk.x || ""), decodeEarBase64Url(publicJwk.y || "")));
|
|
9982
|
+
if (point.length !== 97) {
|
|
9983
|
+
throw createBrowserAuthError(asymmetricEarKeyError, "", "invalid_public_key_coordinates" /* AsymmetricEarSubErrors.InvalidPublicKeyCoordinates */);
|
|
9984
|
+
}
|
|
9985
|
+
const nonce = new Uint8Array(24);
|
|
9986
|
+
window.crypto.getRandomValues(nonce);
|
|
9987
|
+
return urlEncodeArr(new Uint8Array(concatEarBytes(lengthPrefixEarBytes(new TextEncoder().encode("EarClient")), lengthPrefixEarBytes(point), lengthPrefixEarBytes(nonce))));
|
|
9988
|
+
}
|
|
9989
|
+
/**
|
|
9990
|
+
* Authenticates and decrypts direct ECDH-ES/P-384/A256GCM using JOSE Concat KDF.
|
|
9991
|
+
* Party information is used byte-for-byte; the service need not echo the request APV.
|
|
9992
|
+
* @internal
|
|
9993
|
+
*/
|
|
9994
|
+
async function decryptAsymmetricEarResponse(privateJwk, apv, earJwe, requestApv = apv, telemetry) {
|
|
9995
|
+
const correlationId = telemetry?.correlationId || "";
|
|
9996
|
+
const measure = (eventName, operation) => telemetry
|
|
9997
|
+
? invokeAsync(operation, eventName, telemetry.logger, telemetry.performanceClient, correlationId)()
|
|
9998
|
+
: operation();
|
|
9999
|
+
if (apv !== requestApv) {
|
|
10000
|
+
throw createBrowserAuthError(asymmetricEarKeyError, correlationId, "request_apv_mismatch" /* AsymmetricEarSubErrors.RequestApvMismatch */);
|
|
10001
|
+
}
|
|
10002
|
+
const parts = earJwe.split(".");
|
|
10003
|
+
if (parts.length !== 5 || parts[1] !== "") {
|
|
10004
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
10005
|
+
}
|
|
10006
|
+
let header;
|
|
10007
|
+
try {
|
|
10008
|
+
header = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(decodeEarBase64Url(parts[0], correlationId)));
|
|
10009
|
+
}
|
|
10010
|
+
catch {
|
|
10011
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
10012
|
+
}
|
|
10013
|
+
if (!header ||
|
|
10014
|
+
header.alg !== "ECDH-ES" ||
|
|
10015
|
+
header.enc !== "A256GCM" ||
|
|
10016
|
+
header.crit !== undefined ||
|
|
10017
|
+
header.zip !== undefined ||
|
|
10018
|
+
header.epk?.kty !== "EC" ||
|
|
10019
|
+
header.epk.crv !== "P-384" ||
|
|
10020
|
+
header.epk.d !== undefined ||
|
|
10021
|
+
(header.apv !== undefined && header.apv !== apv)) {
|
|
10022
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
10023
|
+
}
|
|
10024
|
+
const x = decodeEarBase64Url(header.epk.x, correlationId);
|
|
10025
|
+
const y = decodeEarBase64Url(header.epk.y, correlationId);
|
|
10026
|
+
const apuBytes = decodeEarBase64Url(header.apu, correlationId);
|
|
10027
|
+
const apvBytes = decodeEarBase64Url(apv, correlationId);
|
|
10028
|
+
const iv = decodeEarBase64Url(parts[2], correlationId);
|
|
10029
|
+
const ciphertext = decodeEarBase64Url(parts[3], correlationId);
|
|
10030
|
+
const tag = decodeEarBase64Url(parts[4], correlationId);
|
|
10031
|
+
if (x.length !== 48 ||
|
|
10032
|
+
y.length !== 48 ||
|
|
10033
|
+
iv.length !== 12 ||
|
|
10034
|
+
tag.length !== 16) {
|
|
10035
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
10036
|
+
}
|
|
10037
|
+
let key;
|
|
10038
|
+
try {
|
|
10039
|
+
const privateKey = await measure(ImportAsymmetricEarKey, () => importAsymmetricEarKey(privateJwk, correlationId));
|
|
10040
|
+
const publicKey = await measure(ImportAsymmetricEarPublicKey, () => importJwk({
|
|
10041
|
+
kty: "EC",
|
|
10042
|
+
crv: "P-384",
|
|
10043
|
+
x: header.epk.x,
|
|
10044
|
+
y: header.epk.y,
|
|
10045
|
+
}, false, [], ECDH_P384_ALGORITHM));
|
|
10046
|
+
const secret = new Uint8Array(await measure(DeriveAsymmetricEarSecret, () => window.crypto.subtle.deriveBits({ name: "ECDH", public: publicKey }, privateKey, 384)));
|
|
10047
|
+
// RFC 7518 section 4.6.2: one SHA-256 round produces the 256-bit content key.
|
|
10048
|
+
const input = new Uint8Array(concatEarBytes(earUint32(1), secret, lengthPrefixEarBytes(new TextEncoder().encode("A256GCM")), lengthPrefixEarBytes(apuBytes), lengthPrefixEarBytes(apvBytes), earUint32(256)));
|
|
10049
|
+
let derivedKey;
|
|
10050
|
+
try {
|
|
10051
|
+
derivedKey = await measure(AsymmetricEarConcatKdf, () => window.crypto.subtle.digest(S256_HASH_ALG, input));
|
|
10052
|
+
}
|
|
10053
|
+
finally {
|
|
10054
|
+
secret.fill(0);
|
|
10055
|
+
input.fill(0);
|
|
10056
|
+
}
|
|
10057
|
+
try {
|
|
10058
|
+
key = await measure(ImportAsymmetricEarContentKey, () => window.crypto.subtle.importKey(RAW, derivedKey, AES_GCM, false, [DECRYPT]));
|
|
10059
|
+
}
|
|
10060
|
+
finally {
|
|
10061
|
+
new Uint8Array(derivedKey).fill(0);
|
|
10062
|
+
}
|
|
10063
|
+
}
|
|
10064
|
+
catch (error) {
|
|
10065
|
+
if (error instanceof AuthError) {
|
|
10066
|
+
throw error;
|
|
10067
|
+
}
|
|
10068
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "content_encryption_key_derivation_failed" /* AsymmetricEarSubErrors.ContentEncryptionKeyDerivationFailed */);
|
|
10069
|
+
}
|
|
10070
|
+
try {
|
|
10071
|
+
const plaintext = await measure(DecryptAsymmetricEarResponse, () => window.crypto.subtle.decrypt({
|
|
10072
|
+
name: AES_GCM,
|
|
10073
|
+
iv,
|
|
10074
|
+
tagLength: 128,
|
|
10075
|
+
additionalData: new TextEncoder().encode(parts[0]),
|
|
10076
|
+
}, key, concatEarBytes(ciphertext, tag)));
|
|
10077
|
+
return new TextDecoder("utf-8", { fatal: true }).decode(plaintext);
|
|
10078
|
+
}
|
|
10079
|
+
catch {
|
|
10080
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "jwe_decryption_failed" /* AsymmetricEarSubErrors.JweDecryptionFailed */);
|
|
10081
|
+
}
|
|
10082
|
+
}
|
|
10083
|
+
/** Decodes canonical, unpadded JOSE base64url for asymmetric EAR only. */
|
|
10084
|
+
function decodeEarBase64Url(value, correlationId = "") {
|
|
10085
|
+
// Match the unpadded base64url alphabet only: letters, digits, '-' and '_'.
|
|
10086
|
+
if (typeof value !== "string" || !/^[A-Za-z0-9_-]+$/.test(value)) {
|
|
10087
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
10088
|
+
}
|
|
10089
|
+
const bytes = new Uint8Array(base64DecToArr(value));
|
|
10090
|
+
if (urlEncodeArr(bytes) !== value) {
|
|
10091
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, correlationId, "invalid_jwe_format_or_header" /* AsymmetricEarSubErrors.InvalidJweFormatOrHeader */);
|
|
10092
|
+
}
|
|
10093
|
+
return bytes;
|
|
10094
|
+
}
|
|
10095
|
+
function earUint32(value) {
|
|
10096
|
+
const bytes = new Uint8Array(4);
|
|
10097
|
+
new DataView(bytes.buffer).setUint32(0, value);
|
|
10098
|
+
return bytes;
|
|
10099
|
+
}
|
|
10100
|
+
function concatEarBytes(...parts) {
|
|
10101
|
+
const bytes = new Uint8Array(parts.reduce((length, part) => length + part.length, 0));
|
|
10102
|
+
let offset = 0;
|
|
10103
|
+
for (const part of parts) {
|
|
10104
|
+
bytes.set(part, offset);
|
|
10105
|
+
offset += part.length;
|
|
10106
|
+
}
|
|
10107
|
+
return bytes.buffer;
|
|
10108
|
+
}
|
|
10109
|
+
function lengthPrefixEarBytes(bytes) {
|
|
10110
|
+
return new Uint8Array(concatEarBytes(earUint32(bytes.length), bytes));
|
|
10111
|
+
}
|
|
9778
10112
|
/**
|
|
9779
10113
|
* Parses earJwk for encryption key and returns CryptoKey object
|
|
9780
10114
|
* @param earJwk
|
|
@@ -9808,7 +10142,9 @@
|
|
|
9808
10142
|
const iv = base64DecToArr(earJweParts[2]);
|
|
9809
10143
|
const ciphertext = base64DecToArr(earJweParts[3]);
|
|
9810
10144
|
const tag = base64DecToArr(earJweParts[4]);
|
|
9811
|
-
|
|
10145
|
+
if (tag.byteLength !== 16) {
|
|
10146
|
+
throw new Error("Invalid AES-GCM authentication tag length");
|
|
10147
|
+
}
|
|
9812
10148
|
// Concat ciphertext and tag
|
|
9813
10149
|
const encryptedData = new Uint8Array(ciphertext.length + tag.length);
|
|
9814
10150
|
encryptedData.set(ciphertext);
|
|
@@ -9816,7 +10152,7 @@
|
|
|
9816
10152
|
const decryptedData = await window.crypto.subtle.decrypt({
|
|
9817
10153
|
name: AES_GCM,
|
|
9818
10154
|
iv: iv,
|
|
9819
|
-
tagLength:
|
|
10155
|
+
tagLength: 128,
|
|
9820
10156
|
additionalData: header,
|
|
9821
10157
|
}, key, encryptedData);
|
|
9822
10158
|
return new TextDecoder().decode(decryptedData);
|
|
@@ -11714,7 +12050,7 @@
|
|
|
11714
12050
|
|
|
11715
12051
|
/* eslint-disable header/header */
|
|
11716
12052
|
const name = "@azure/msal-browser";
|
|
11717
|
-
const version = "5.
|
|
12053
|
+
const version = "5.31.0";
|
|
11718
12054
|
|
|
11719
12055
|
/*
|
|
11720
12056
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -11736,6 +12072,7 @@
|
|
|
11736
12072
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
11737
12073
|
* Licensed under the MIT License.
|
|
11738
12074
|
*/
|
|
12075
|
+
const MAX_RESOURCE_SERVER_NONCES = 50;
|
|
11739
12076
|
/**
|
|
11740
12077
|
* Reason an old-schema cache entry was removed during migration.
|
|
11741
12078
|
*/
|
|
@@ -11751,6 +12088,7 @@
|
|
|
11751
12088
|
class BrowserCacheManager extends CacheManager {
|
|
11752
12089
|
constructor(clientId, cacheConfig, cryptoImpl, logger, performanceClient, eventHandler, staticAuthorityOptions, tokenBindingKeyManager = DEFAULT_TOKEN_BINDING_KEY_MANAGER) {
|
|
11753
12090
|
super(clientId, cryptoImpl, logger, performanceClient, staticAuthorityOptions, tokenBindingKeyManager);
|
|
12091
|
+
this.dpopNonces = new Map();
|
|
11754
12092
|
this.cacheConfig = cacheConfig;
|
|
11755
12093
|
this.logger = logger;
|
|
11756
12094
|
this.internalStorage = new MemoryStorage();
|
|
@@ -12771,6 +13109,40 @@
|
|
|
12771
13109
|
const version = this.internalStorage.getItem(InMemoryCacheKeys.WRAPPER_VER) || "";
|
|
12772
13110
|
return [sku, version];
|
|
12773
13111
|
}
|
|
13112
|
+
/**
|
|
13113
|
+
* Stores a validated resource-server DPoP nonce in PCA-local memory.
|
|
13114
|
+
* @internal
|
|
13115
|
+
*/
|
|
13116
|
+
setDpopNonce(resourceRequestUri, dpopNonce, correlationId = "") {
|
|
13117
|
+
const resourceServer = canonicalizeDpopResourceServer(resourceRequestUri, correlationId);
|
|
13118
|
+
const validatedNonce = validateDpopNonce(dpopNonce, correlationId);
|
|
13119
|
+
// Reinsert replacements so eviction remains oldest-write ordered.
|
|
13120
|
+
this.dpopNonces.delete(resourceServer);
|
|
13121
|
+
this.dpopNonces.set(resourceServer, validatedNonce);
|
|
13122
|
+
if (this.dpopNonces.size > MAX_RESOURCE_SERVER_NONCES) {
|
|
13123
|
+
const oldestResourceServer = this.dpopNonces.keys().next().value;
|
|
13124
|
+
if (oldestResourceServer) {
|
|
13125
|
+
this.dpopNonces.delete(oldestResourceServer);
|
|
13126
|
+
}
|
|
13127
|
+
this.performanceClient.incrementFields({ "ext.dpopNonceCacheEvictionCount": 1 }, correlationId);
|
|
13128
|
+
}
|
|
13129
|
+
}
|
|
13130
|
+
/**
|
|
13131
|
+
* Reads the current resource-server DPoP nonce from PCA-local memory.
|
|
13132
|
+
* This optional structural capability is consumed by msal-common without
|
|
13133
|
+
* adding methods to the CacheManager abstraction.
|
|
13134
|
+
* @internal
|
|
13135
|
+
*/
|
|
13136
|
+
getDpopNonce(resourceRequestUri, correlationId = "") {
|
|
13137
|
+
return this.dpopNonces.get(canonicalizeDpopResourceServer(resourceRequestUri, correlationId));
|
|
13138
|
+
}
|
|
13139
|
+
/**
|
|
13140
|
+
* Clears all PCA-local DPoP nonce state.
|
|
13141
|
+
* @internal
|
|
13142
|
+
*/
|
|
13143
|
+
clearDpopNonces() {
|
|
13144
|
+
this.dpopNonces.clear();
|
|
13145
|
+
}
|
|
12774
13146
|
/**
|
|
12775
13147
|
*
|
|
12776
13148
|
* @param key
|
|
@@ -12915,6 +13287,7 @@
|
|
|
12915
13287
|
}
|
|
12916
13288
|
});
|
|
12917
13289
|
this.internalStorage.clear();
|
|
13290
|
+
this.dpopNonces.clear();
|
|
12918
13291
|
}
|
|
12919
13292
|
/**
|
|
12920
13293
|
* Prepend msal.<client-id> to each key
|
|
@@ -13021,8 +13394,7 @@
|
|
|
13021
13394
|
}
|
|
13022
13395
|
}
|
|
13023
13396
|
catch (e) {
|
|
13024
|
-
this.logger.
|
|
13025
|
-
this.logger.error(`0tvdic ${e}`, correlationId);
|
|
13397
|
+
this.logger.error("023ixj", correlationId);
|
|
13026
13398
|
throw createBrowserAuthError(unableToParseTokenRequestCacheError, "");
|
|
13027
13399
|
}
|
|
13028
13400
|
return [parsedRequest, verifier];
|
|
@@ -13446,7 +13818,7 @@
|
|
|
13446
13818
|
* Licensed under the MIT License.
|
|
13447
13819
|
*/
|
|
13448
13820
|
class BaseInteractionClient {
|
|
13449
|
-
constructor(config, storageImpl, browserCrypto, logger, eventHandler, navigationClient, performanceClient, correlationId, platformAuthProvider, tokenBindingKeyManager) {
|
|
13821
|
+
constructor(config, storageImpl, browserCrypto, logger, eventHandler, navigationClient, performanceClient, correlationId, platformAuthProvider, tokenBindingKeyManager, dpopNonceProvider) {
|
|
13450
13822
|
this.config = config;
|
|
13451
13823
|
this.browserStorage = storageImpl;
|
|
13452
13824
|
this.browserCrypto = browserCrypto;
|
|
@@ -13460,6 +13832,7 @@
|
|
|
13460
13832
|
this.tokenBindingKeyManager =
|
|
13461
13833
|
tokenBindingKeyManager ||
|
|
13462
13834
|
new TokenBindingKeyManager(this.logger, this.performanceClient);
|
|
13835
|
+
this.dpopNonceProvider = dpopNonceProvider ?? storageImpl;
|
|
13463
13836
|
}
|
|
13464
13837
|
}
|
|
13465
13838
|
/**
|
|
@@ -13558,6 +13931,7 @@
|
|
|
13558
13931
|
* @returns A promise that resolves when the cache has been cleared.
|
|
13559
13932
|
*/
|
|
13560
13933
|
async function clearCacheOnLogout(browserStorage, browserCrypto, logger, correlationId, account) {
|
|
13934
|
+
browserStorage.clearDpopNonces();
|
|
13561
13935
|
if (account) {
|
|
13562
13936
|
// Clear given account.
|
|
13563
13937
|
try {
|
|
@@ -13705,6 +14079,7 @@
|
|
|
13705
14079
|
}
|
|
13706
14080
|
logger.verbose(`1ecmns ${validatedRequest.authenticationScheme}`, correlationId);
|
|
13707
14081
|
}
|
|
14082
|
+
performanceClient.addFields({ authenticationScheme: validatedRequest.authenticationScheme }, correlationId);
|
|
13708
14083
|
return validatedRequest;
|
|
13709
14084
|
}
|
|
13710
14085
|
async function initializeSilentRequest(request, account, config, performanceClient, logger) {
|
|
@@ -13979,6 +14354,7 @@
|
|
|
13979
14354
|
},
|
|
13980
14355
|
cryptoInterface: this.browserCrypto,
|
|
13981
14356
|
tokenBindingKeyManager: this.tokenBindingKeyManager,
|
|
14357
|
+
dpopNonceProvider: this.dpopNonceProvider,
|
|
13982
14358
|
networkInterface: this.networkClient,
|
|
13983
14359
|
storageInterface: this.browserStorage,
|
|
13984
14360
|
serverTelemetryManager: serverTelemetryManager,
|
|
@@ -14096,30 +14472,42 @@
|
|
|
14096
14472
|
* page (see `runPopupRelay`) back to the embedded frame that opened it. See
|
|
14097
14473
|
* {@link BrowserAuthOptions.popupRelayUri}.
|
|
14098
14474
|
*
|
|
14099
|
-
*
|
|
14100
|
-
*
|
|
14101
|
-
* pulling in the other's dependencies.
|
|
14475
|
+
* Shared by the relay-page entry and client helpers without importing either
|
|
14476
|
+
* implementation into the other bundle.
|
|
14102
14477
|
*
|
|
14103
14478
|
* @internal
|
|
14104
14479
|
*/
|
|
14105
|
-
const POPUP_RELAY_RESPONSE_TYPE = "msal:popup-relay-response:v1";
|
|
14480
|
+
const POPUP_RELAY_RESPONSE_TYPE = "msal:popup-relay-response:v1";
|
|
14481
|
+
/** @internal Response bound to an authenticated v2 relay document. */
|
|
14482
|
+
const POPUP_RELAY_V2_RESPONSE_TYPE = "msal:popup-relay-response:v2";
|
|
14483
|
+
/** @internal Ready signal for the authenticated popup-relay request handoff. */
|
|
14484
|
+
const POPUP_RELAY_READY_TYPE = "msal:popup-relay-ready:v2";
|
|
14485
|
+
/** @internal Request delivered only to the same-origin relay window. */
|
|
14486
|
+
const POPUP_RELAY_REQUEST_TYPE = "msal:popup-relay-request:v2";
|
|
14487
|
+
/** @internal Resolve the compatibility default without downgrading invalid versions. */
|
|
14488
|
+
function getPopupRelayProtocolVersion(version, correlationId = "") {
|
|
14489
|
+
if (version === undefined) {
|
|
14490
|
+
return 1;
|
|
14491
|
+
}
|
|
14492
|
+
if (version !== 1 && version !== 2) {
|
|
14493
|
+
throw createBrowserAuthError(popupRelayUnsupportedFlow, correlationId, "popup_relay_invalid_protocol");
|
|
14494
|
+
}
|
|
14495
|
+
return version;
|
|
14496
|
+
}
|
|
14106
14497
|
|
|
14107
14498
|
/*
|
|
14108
14499
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
14109
14500
|
* Licensed under the MIT License.
|
|
14110
14501
|
*/
|
|
14111
14502
|
/**
|
|
14112
|
-
* Builds the
|
|
14113
|
-
*
|
|
14114
|
-
*
|
|
14115
|
-
* library-state `id` so the relay page can listen on the right BroadcastChannel
|
|
14116
|
-
* and echo the id back. The relay URI is resolved against the app origin, so it
|
|
14117
|
-
* must be same-origin as the embedded frame. See `runPopupRelay`.
|
|
14503
|
+
* Builds the same-origin relay URL. V1 preserves the fragment descriptor;
|
|
14504
|
+
* explicitly selected v2 carries only the id and retains the navigation for
|
|
14505
|
+
* the authenticated handoff.
|
|
14118
14506
|
*
|
|
14119
14507
|
* @internal
|
|
14120
14508
|
*/
|
|
14121
|
-
function buildPopupRelayUrl(popupRelayUri, id, action, correlationId) {
|
|
14122
|
-
const
|
|
14509
|
+
function buildPopupRelayUrl(popupRelayUri, id, action, correlationId, protocolVersion) {
|
|
14510
|
+
const version = getPopupRelayProtocolVersion(protocolVersion, correlationId);
|
|
14123
14511
|
const target = new URL(popupRelayUri, window.location.origin);
|
|
14124
14512
|
/*
|
|
14125
14513
|
* The relay page must be same-origin as the embedded frame: the response is
|
|
@@ -14132,7 +14520,12 @@
|
|
|
14132
14520
|
throw createBrowserAuthError(popupRelayUnsupportedFlow, correlationId, "popup_relay_cross_origin");
|
|
14133
14521
|
}
|
|
14134
14522
|
const hashParams = new URLSearchParams();
|
|
14135
|
-
|
|
14523
|
+
if (version === 1) {
|
|
14524
|
+
hashParams.set("req", JSON.stringify({ id, ...action }));
|
|
14525
|
+
}
|
|
14526
|
+
else {
|
|
14527
|
+
hashParams.set("id", id);
|
|
14528
|
+
}
|
|
14136
14529
|
target.hash = hashParams.toString();
|
|
14137
14530
|
return target.toString();
|
|
14138
14531
|
}
|
|
@@ -14143,21 +14536,30 @@
|
|
|
14143
14536
|
* partitioning blocks the BroadcastChannel the redirect bridge uses from
|
|
14144
14537
|
* reaching the embedded frame.
|
|
14145
14538
|
*
|
|
14146
|
-
*
|
|
14147
|
-
*
|
|
14148
|
-
*
|
|
14539
|
+
* In v2, the retained navigation is sent once, after a ready signal from the popup
|
|
14540
|
+
* window we opened on our own origin with the matching library-state id.
|
|
14541
|
+
* Successful responses must also carry that handoff's relay-document nonce.
|
|
14542
|
+
* Setup failures can reject the request before the handoff completes.
|
|
14149
14543
|
*
|
|
14150
14544
|
* @internal
|
|
14151
14545
|
*/
|
|
14152
|
-
async function waitForPopupRelayResponse(timeoutMs, logger, request, popupWindow, performanceClient) {
|
|
14546
|
+
async function waitForPopupRelayResponse(timeoutMs, logger, request, popupWindow, performanceClient, action, protocolVersion) {
|
|
14547
|
+
const version = getPopupRelayProtocolVersion(protocolVersion, request.correlationId);
|
|
14548
|
+
if (version === 2 && !action) {
|
|
14549
|
+
throw createBrowserAuthError(popupRelayUnsupportedFlow, request.correlationId, "popup_relay_bad_request");
|
|
14550
|
+
}
|
|
14153
14551
|
return new Promise((resolve, reject) => {
|
|
14154
14552
|
const correlationId = request.correlationId;
|
|
14155
14553
|
logger.verbose("1d05g9", correlationId);
|
|
14156
|
-
performanceClient.addFields({
|
|
14554
|
+
performanceClient.addFields({
|
|
14555
|
+
redirectBridgeTimeoutMs: timeoutMs,
|
|
14556
|
+
popupRelayProtocolVersion: version,
|
|
14557
|
+
}, correlationId);
|
|
14157
14558
|
const { libraryState } = parseRequestState(base64Decode, request.state || "", correlationId);
|
|
14158
14559
|
const expectedId = libraryState.id;
|
|
14159
14560
|
const expectedOrigin = window.location.origin;
|
|
14160
14561
|
let settled = false;
|
|
14562
|
+
let handoffNonce = "";
|
|
14161
14563
|
const cleanup = () => {
|
|
14162
14564
|
window.removeEventListener("message", onMessage);
|
|
14163
14565
|
clearTimeout(timeoutId);
|
|
@@ -14169,20 +14571,52 @@
|
|
|
14169
14571
|
return;
|
|
14170
14572
|
}
|
|
14171
14573
|
const data = event.data;
|
|
14172
|
-
if (!data ||
|
|
14173
|
-
data.type !== POPUP_RELAY_RESPONSE_TYPE ||
|
|
14174
|
-
data.id !== expectedId) {
|
|
14574
|
+
if (!data || data.id !== expectedId) {
|
|
14175
14575
|
return;
|
|
14176
14576
|
}
|
|
14177
14577
|
if (settled) {
|
|
14178
14578
|
return;
|
|
14179
14579
|
}
|
|
14580
|
+
if (version === 2 && data.type === POPUP_RELAY_READY_TYPE) {
|
|
14581
|
+
if (handoffNonce ||
|
|
14582
|
+
typeof data.nonce !== "string" ||
|
|
14583
|
+
!data.nonce) {
|
|
14584
|
+
return;
|
|
14585
|
+
}
|
|
14586
|
+
handoffNonce = data.nonce;
|
|
14587
|
+
try {
|
|
14588
|
+
popupWindow.postMessage({
|
|
14589
|
+
type: POPUP_RELAY_REQUEST_TYPE,
|
|
14590
|
+
id: expectedId,
|
|
14591
|
+
nonce: handoffNonce,
|
|
14592
|
+
request: { id: expectedId, ...action },
|
|
14593
|
+
}, expectedOrigin);
|
|
14594
|
+
performanceClient.addFields({ "ext.popupRelayRequestSent": true }, correlationId);
|
|
14595
|
+
}
|
|
14596
|
+
catch {
|
|
14597
|
+
settled = true;
|
|
14598
|
+
cleanup();
|
|
14599
|
+
logger.error("0sx3jz", correlationId);
|
|
14600
|
+
reject(createBrowserAuthError(popupWindowError, correlationId, "popup_relay_handoff_failed"));
|
|
14601
|
+
}
|
|
14602
|
+
return;
|
|
14603
|
+
}
|
|
14604
|
+
const hasError = typeof data.error === "string" && data.error.length > 0;
|
|
14605
|
+
const responseType = version === 1
|
|
14606
|
+
? POPUP_RELAY_RESPONSE_TYPE
|
|
14607
|
+
: POPUP_RELAY_V2_RESPONSE_TYPE;
|
|
14608
|
+
if (data.type !== responseType ||
|
|
14609
|
+
(version === 2 &&
|
|
14610
|
+
((!handoffNonce && !hasError) ||
|
|
14611
|
+
(handoffNonce && data.nonce !== handoffNonce)))) {
|
|
14612
|
+
return;
|
|
14613
|
+
}
|
|
14180
14614
|
settled = true;
|
|
14181
14615
|
cleanup();
|
|
14182
|
-
if (
|
|
14183
|
-
reject(createBrowserAuthError(data.error, correlationId));
|
|
14616
|
+
if (hasError) {
|
|
14617
|
+
reject(createBrowserAuthError(data.error, correlationId, data.subError));
|
|
14184
14618
|
}
|
|
14185
|
-
else if (data.payload) {
|
|
14619
|
+
else if (typeof data.payload === "string" && data.payload) {
|
|
14186
14620
|
resolve(data.payload);
|
|
14187
14621
|
}
|
|
14188
14622
|
else {
|
|
@@ -14561,7 +14995,7 @@
|
|
|
14561
14995
|
this.accountId = accountId;
|
|
14562
14996
|
this.platformAuthProvider = provider;
|
|
14563
14997
|
this.nativeStorageManager = nativeStorageImpl;
|
|
14564
|
-
this.silentCacheClient = new SilentCacheClient(config, this.nativeStorageManager, browserCrypto, logger, eventHandler, navigationClient, performanceClient, correlationId, provider, this.tokenBindingKeyManager);
|
|
14998
|
+
this.silentCacheClient = new SilentCacheClient(config, this.nativeStorageManager, browserCrypto, logger, eventHandler, navigationClient, performanceClient, correlationId, provider, this.tokenBindingKeyManager, browserStorage);
|
|
14565
14999
|
const extensionName = this.platformAuthProvider.getExtensionName();
|
|
14566
15000
|
this.skus = ServerTelemetryManager.makeExtraSkuString({
|
|
14567
15001
|
libraryName: BrowserConstants.MSAL_SKU,
|
|
@@ -14946,6 +15380,11 @@
|
|
|
14946
15380
|
const shouldRemoveGeneratedDpopKey = isL3DpopResponse ||
|
|
14947
15381
|
(this.isDpopBrokerRequest(request) &&
|
|
14948
15382
|
storeInCache?.accessToken === false);
|
|
15383
|
+
if (dpopBrokerOutcome === "L1" &&
|
|
15384
|
+
!shouldRemoveGeneratedDpopKey &&
|
|
15385
|
+
request.keyId) {
|
|
15386
|
+
ResponseHandler.setDpopKeyId(result, request.keyId);
|
|
15387
|
+
}
|
|
14949
15388
|
if (shouldRemoveGeneratedDpopKey) {
|
|
14950
15389
|
await this.resetGeneratedDpopRequestKey(request);
|
|
14951
15390
|
}
|
|
@@ -15214,7 +15653,12 @@
|
|
|
15214
15653
|
const configClaims = request.skipBrokerClaims && !!request.embeddedClientId
|
|
15215
15654
|
? undefined
|
|
15216
15655
|
: this.config.auth.clientCapabilities;
|
|
15217
|
-
const { scopes, claims
|
|
15656
|
+
const { scopes, claims } = request;
|
|
15657
|
+
const dpopNonce = request.authenticationScheme ===
|
|
15658
|
+
AuthenticationScheme$1.DPOP &&
|
|
15659
|
+
request.resourceRequestUri
|
|
15660
|
+
? this.browserStorage.getDpopNonce(request.resourceRequestUri, this.correlationId)
|
|
15661
|
+
: undefined;
|
|
15218
15662
|
const scopeSet = new ScopeSet([...(scopes || []), ...OIDC_DEFAULT_SCOPES$1], this.correlationId);
|
|
15219
15663
|
const mergedClaims = buildMergedClaims$1(claims, configClaims?.length ? configClaims : undefined);
|
|
15220
15664
|
const hasAttributeTokens = !!request.attributeTokens?.length;
|
|
@@ -15524,11 +15968,14 @@
|
|
|
15524
15968
|
return brokerProof;
|
|
15525
15969
|
}
|
|
15526
15970
|
const dpopProofGenerator = new DpopProofGenerator(this.browserCrypto, this.tokenBindingKeyManager);
|
|
15971
|
+
const currentNonce = request.resourceRequestUri
|
|
15972
|
+
? this.browserStorage.getDpopNonce(request.resourceRequestUri, this.correlationId)
|
|
15973
|
+
: undefined;
|
|
15527
15974
|
return dpopProofGenerator.generateResourceProof({
|
|
15528
15975
|
htu: request.resourceRequestUri,
|
|
15529
15976
|
htm: request.resourceRequestMethod,
|
|
15530
15977
|
accessToken: response.access_token,
|
|
15531
|
-
nonce: request.extraParametersNoCache?.pop_nonce,
|
|
15978
|
+
nonce: currentNonce ?? request.extraParametersNoCache?.pop_nonce,
|
|
15532
15979
|
}, request.keyId, this.correlationId);
|
|
15533
15980
|
}
|
|
15534
15981
|
/**
|
|
@@ -15851,6 +16298,36 @@
|
|
|
15851
16298
|
addCorrelationId(queryParams, request.correlationId);
|
|
15852
16299
|
return getAuthorizeUrl(authority, queryParams);
|
|
15853
16300
|
}
|
|
16301
|
+
/**
|
|
16302
|
+
* Prepares the selected EAR construction.
|
|
16303
|
+
* @internal
|
|
16304
|
+
*/
|
|
16305
|
+
async function initializeEarRequest(config, request, logger, performanceClient) {
|
|
16306
|
+
if (!config.experimental.enableAsymmetricEar) {
|
|
16307
|
+
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, logger, performanceClient, request.correlationId)();
|
|
16308
|
+
return {
|
|
16309
|
+
...request,
|
|
16310
|
+
earJwk,
|
|
16311
|
+
asymmetricEar: undefined,
|
|
16312
|
+
};
|
|
16313
|
+
}
|
|
16314
|
+
try {
|
|
16315
|
+
const { privateJwk, publicJwk } = await invokeAsync(generateAsymmetricEarKey, GenerateAsymmetricEarKey, logger, performanceClient, request.correlationId)();
|
|
16316
|
+
const apv = generateAsymmetricEarApv(publicJwk);
|
|
16317
|
+
const earJwk = base64Encode(JSON.stringify(publicJwk));
|
|
16318
|
+
return {
|
|
16319
|
+
...request,
|
|
16320
|
+
earJwk,
|
|
16321
|
+
asymmetricEar: { privateJwk, apv },
|
|
16322
|
+
};
|
|
16323
|
+
}
|
|
16324
|
+
catch (error) {
|
|
16325
|
+
if (error instanceof AuthError) {
|
|
16326
|
+
throw error;
|
|
16327
|
+
}
|
|
16328
|
+
throw createBrowserAuthError(asymmetricEarKeyError, request.correlationId, "request_initialization_failed" /* AsymmetricEarSubErrors.RequestInitializationFailed */);
|
|
16329
|
+
}
|
|
16330
|
+
}
|
|
15854
16331
|
/**
|
|
15855
16332
|
* Builds the action URL + POST-body fields for the EAR /authorize form.
|
|
15856
16333
|
*/
|
|
@@ -15860,7 +16337,18 @@
|
|
|
15860
16337
|
}
|
|
15861
16338
|
const parameters = await getStandardParameters(config, authority, request, logger, performanceClient);
|
|
15862
16339
|
addResponseType(parameters, OAuthResponseType.IDTOKEN_TOKEN_REFRESHTOKEN);
|
|
15863
|
-
|
|
16340
|
+
try {
|
|
16341
|
+
addEARParameters(parameters, request.earJwk, request.asymmetricEar
|
|
16342
|
+
? base64Encode(JSON.stringify({
|
|
16343
|
+
alg: "ECDH-ES",
|
|
16344
|
+
enc: "A256GCM",
|
|
16345
|
+
apv: request.asymmetricEar.apv,
|
|
16346
|
+
}))
|
|
16347
|
+
: undefined);
|
|
16348
|
+
}
|
|
16349
|
+
catch {
|
|
16350
|
+
throw createBrowserAuthError(asymmetricEarKeyError, request.correlationId, "request_encoding_failed" /* AsymmetricEarSubErrors.RequestEncodingFailed */);
|
|
16351
|
+
}
|
|
15864
16352
|
// Also add codeChallenge as backup in case EAR is not supported
|
|
15865
16353
|
addCodeChallengeParams(parameters, request.codeChallenge, S256_CODE_CHALLENGE_METHOD);
|
|
15866
16354
|
addExtraParameters(parameters, {
|
|
@@ -15944,12 +16432,14 @@
|
|
|
15944
16432
|
const browserCrypto = new CryptoOps(logger, performanceClient);
|
|
15945
16433
|
const nativeInteractionClient = new PlatformAuthInteractionClient(config, browserStorage, browserCrypto, logger, eventHandler, config.system.navigationClient, apiId, performanceClient, platformAuthProvider, accountId, nativeStorage, request.correlationId, tokenBindingKeyManager);
|
|
15946
16434
|
const { userRequestState } = parseRequestState(browserCrypto.base64Decode, request.state, request.correlationId);
|
|
16435
|
+
const brokerRequest = {
|
|
16436
|
+
...request,
|
|
16437
|
+
state: userRequestState,
|
|
16438
|
+
prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
|
|
16439
|
+
};
|
|
16440
|
+
delete brokerRequest.asymmetricEar;
|
|
15947
16441
|
try {
|
|
15948
|
-
return await invokeAsync(nativeInteractionClient.acquireToken.bind(nativeInteractionClient), NativeInteractionClientAcquireToken, logger, performanceClient, request.correlationId)(
|
|
15949
|
-
...request,
|
|
15950
|
-
state: userRequestState,
|
|
15951
|
-
prompt: undefined, // Server should handle the prompt, ideally native broker can do this part silently
|
|
15952
|
-
});
|
|
16442
|
+
return await invokeAsync(nativeInteractionClient.acquireToken.bind(nativeInteractionClient), NativeInteractionClientAcquireToken, logger, performanceClient, request.correlationId)(brokerRequest);
|
|
15953
16443
|
}
|
|
15954
16444
|
catch (e) {
|
|
15955
16445
|
await removeTokenBindingKeyOnFailure(request, tokenBindingKeyManager, logger, performanceClient);
|
|
@@ -15973,6 +16463,7 @@
|
|
|
15973
16463
|
// Instrument clientdata telemetry fields from the authorize response
|
|
15974
16464
|
instrumentClientData(response, request.correlationId, performanceClient);
|
|
15975
16465
|
if (response.accountId) {
|
|
16466
|
+
validateAuthorizationResponse(response, request.state, request.correlationId);
|
|
15976
16467
|
return invokeAsync(handleResponsePlatformBroker, HandleResponsePlatformBroker, logger, performanceClient, request.correlationId)(request, response.accountId, apiId, config, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider, tokenBindingKeyManager);
|
|
15977
16468
|
}
|
|
15978
16469
|
const authCodeRequest = {
|
|
@@ -16014,7 +16505,20 @@
|
|
|
16014
16505
|
if (!request.earJwk) {
|
|
16015
16506
|
throw createBrowserAuthError(earJwkEmpty, request.correlationId);
|
|
16016
16507
|
}
|
|
16017
|
-
|
|
16508
|
+
let plaintext;
|
|
16509
|
+
if (request.asymmetricEar) {
|
|
16510
|
+
plaintext = await invokeAsync(decryptAsymmetricEarResponse, DecryptEarResponse, logger, performanceClient, request.correlationId)(request.asymmetricEar.privateJwk, request.asymmetricEar.apv, response.ear_jwe, request.asymmetricEar.apv, { logger, performanceClient, correlationId: request.correlationId });
|
|
16511
|
+
}
|
|
16512
|
+
else {
|
|
16513
|
+
plaintext = await invokeAsync(decryptEarResponse, DecryptEarResponse, logger, performanceClient, request.correlationId)(request.earJwk, response.ear_jwe);
|
|
16514
|
+
}
|
|
16515
|
+
let decryptedData;
|
|
16516
|
+
try {
|
|
16517
|
+
decryptedData = JSON.parse(plaintext);
|
|
16518
|
+
}
|
|
16519
|
+
catch {
|
|
16520
|
+
throw createBrowserAuthError(failedToDecryptEarResponse, request.correlationId, "invalid_decrypted_response_payload" /* AsymmetricEarSubErrors.InvalidDecryptedResponsePayload */);
|
|
16521
|
+
}
|
|
16018
16522
|
if (decryptedData.accountId) {
|
|
16019
16523
|
return invokeAsync(handleResponsePlatformBroker, HandleResponsePlatformBroker, logger, performanceClient, request.correlationId)(request, decryptedData.accountId, apiId, config, browserStorage, nativeStorage, eventHandler, logger, performanceClient, platformAuthProvider, tokenBindingKeyManager);
|
|
16020
16524
|
}
|
|
@@ -16305,6 +16809,7 @@
|
|
|
16305
16809
|
: "",
|
|
16306
16810
|
postLogoutRedirectUri: "",
|
|
16307
16811
|
popupRelayUri: "",
|
|
16812
|
+
popupRelayProtocolVersion: 1,
|
|
16308
16813
|
clientCapabilities: [],
|
|
16309
16814
|
OIDCOptions: {
|
|
16310
16815
|
responseMode: ResponseMode$1.FRAGMENT,
|
|
@@ -16371,6 +16876,7 @@
|
|
|
16371
16876
|
client: new StubPerformanceClient(),
|
|
16372
16877
|
};
|
|
16373
16878
|
const DEFAULT_EXPERIMENTAL_OPTIONS = {
|
|
16879
|
+
enableAsymmetricEar: false,
|
|
16374
16880
|
iframeTimeoutTelemetry: false,
|
|
16375
16881
|
allowPlatformBrokerWithDOM: false,
|
|
16376
16882
|
};
|
|
@@ -16424,9 +16930,16 @@
|
|
|
16424
16930
|
experimental: {
|
|
16425
16931
|
...DEFAULT_EXPERIMENTAL_OPTIONS,
|
|
16426
16932
|
...userInputExperimental,
|
|
16933
|
+
enableAsymmetricEar: userInputExperimental?.enableAsymmetricEar ?? false,
|
|
16427
16934
|
},
|
|
16428
16935
|
telemetry: { ...DEFAULT_TELEMETRY_OPTIONS, ...userInputTelemetry },
|
|
16429
16936
|
};
|
|
16937
|
+
if (overlayedConfig.experimental.enableAsymmetricEar &&
|
|
16938
|
+
overlayedConfig.system.protocolMode !== ProtocolMode.EAR) {
|
|
16939
|
+
const logger = new Logger(providedSystemOptions.loggerOptions, name, version);
|
|
16940
|
+
logger.warning("07xxx7", "");
|
|
16941
|
+
overlayedConfig.experimental.enableAsymmetricEar = false;
|
|
16942
|
+
}
|
|
16430
16943
|
return overlayedConfig;
|
|
16431
16944
|
}
|
|
16432
16945
|
|
|
@@ -16808,7 +17321,6 @@
|
|
|
16808
17321
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
16809
17322
|
* Licensed under the MIT License.
|
|
16810
17323
|
*/
|
|
16811
|
-
const PLATFORM_AUTH_DOM_DPOP_NOT_SUPPORTED = "platform_auth_dom_dpop_not_supported";
|
|
16812
17324
|
class PlatformAuthDOMHandler {
|
|
16813
17325
|
constructor(logger, performanceClient, correlationId) {
|
|
16814
17326
|
this.logger = logger;
|
|
@@ -16888,11 +17400,9 @@
|
|
|
16888
17400
|
});
|
|
16889
17401
|
this.logger.trace(`02bcil ${this.platformAuthType}`, correlationId);
|
|
16890
17402
|
try {
|
|
16891
|
-
if (request.tokenType?.trim().toLowerCase() ===
|
|
16892
|
-
PlatformAuthTokenType.DPOP_WITH_PROOF) {
|
|
16893
|
-
throw createBrowserAuthError(PLATFORM_AUTH_DOM_DPOP_NOT_SUPPORTED, correlationId);
|
|
16894
|
-
}
|
|
16895
17403
|
const platformDOMRequest = invoke(this.initializePlatformDOMRequest.bind(this), PlatformAuthDOMInitializeRequest, this.logger, this.performanceClient, correlationId)(request);
|
|
17404
|
+
request.bindingPreferenceSent =
|
|
17405
|
+
platformDOMRequest.preferBinding !== undefined;
|
|
16896
17406
|
const response =
|
|
16897
17407
|
// @ts-ignore
|
|
16898
17408
|
await window.navigator.platformAuthentication.executeGetToken(platformDOMRequest);
|
|
@@ -16937,8 +17447,12 @@
|
|
|
16937
17447
|
preferBinding: preferBinding,
|
|
16938
17448
|
enclave: enclave,
|
|
16939
17449
|
requestConfirmation: reqCnf,
|
|
16940
|
-
extraParametersNoCache
|
|
17450
|
+
extraParametersNoCache: extraParametersNoCache && {
|
|
17451
|
+
...extraParametersNoCache,
|
|
17452
|
+
},
|
|
16941
17453
|
};
|
|
17454
|
+
delete platformDOMRequest.extraParameters?.bindingPreferenceSent;
|
|
17455
|
+
delete platformDOMRequest.extraParametersNoCache?.bindingPreferenceSent;
|
|
16942
17456
|
return platformDOMRequest;
|
|
16943
17457
|
}
|
|
16944
17458
|
validatePlatformBrokerResponse(response, correlationId) {
|
|
@@ -16955,7 +17469,8 @@
|
|
|
16955
17469
|
requiredKeys.every((key) => Object.prototype.hasOwnProperty.call(response, key));
|
|
16956
17470
|
if (response &&
|
|
16957
17471
|
Object.prototype.hasOwnProperty.call(response, "isSuccess")) {
|
|
16958
|
-
if (isValid
|
|
17472
|
+
if (isValid &&
|
|
17473
|
+
response.isSuccess === true) {
|
|
16959
17474
|
this.logger.trace(`0h4vei ${this.platformAuthType}`, correlationId);
|
|
16960
17475
|
try {
|
|
16961
17476
|
const validatedResponse = this.convertToPlatformBrokerResponse(response, correlationId);
|
|
@@ -17008,7 +17523,6 @@
|
|
|
17008
17523
|
convertToPlatformBrokerResponse(response, correlationId) {
|
|
17009
17524
|
this.logger.trace(`14913t ${this.platformAuthType}`, correlationId);
|
|
17010
17525
|
const responseProperties = response.properties || {};
|
|
17011
|
-
const bindingAttested = this.parseDOMBoolean(responseProperties.binding_attested, "binding_attested", correlationId);
|
|
17012
17526
|
const nativeResponse = {
|
|
17013
17527
|
access_token: response.accessToken,
|
|
17014
17528
|
id_token: response.idToken,
|
|
@@ -17020,21 +17534,9 @@
|
|
|
17020
17534
|
properties: responseProperties,
|
|
17021
17535
|
extendedLifetimeToken: response.extendedLifetimeToken ?? false,
|
|
17022
17536
|
shr: response.proofOfPossessionPayload,
|
|
17023
|
-
token_type: responseProperties.token_type,
|
|
17024
|
-
DPoP: responseProperties.dpop_proof,
|
|
17025
|
-
binding_attested: bindingAttested,
|
|
17026
17537
|
};
|
|
17027
17538
|
return nativeResponse;
|
|
17028
17539
|
}
|
|
17029
|
-
parseDOMBoolean(value, propertyName, correlationId) {
|
|
17030
|
-
if (value === undefined) {
|
|
17031
|
-
return undefined;
|
|
17032
|
-
}
|
|
17033
|
-
if (value === "true" || value === "false") {
|
|
17034
|
-
return value === "true";
|
|
17035
|
-
}
|
|
17036
|
-
throw createAuthError(unexpectedError, correlationId, `Platform broker returned invalid ${propertyName} value.`);
|
|
17037
|
-
}
|
|
17038
17540
|
getDOMExtraParams(extraParameters, correlationId) {
|
|
17039
17541
|
try {
|
|
17040
17542
|
const stringifiedProperties = {};
|
|
@@ -17147,8 +17649,7 @@
|
|
|
17147
17649
|
const schemeSupported = !authenticationScheme ||
|
|
17148
17650
|
authenticationScheme === AuthenticationScheme$1.BEARER ||
|
|
17149
17651
|
authenticationScheme === AuthenticationScheme$1.POP ||
|
|
17150
|
-
|
|
17151
|
-
!(platformAuthProvider instanceof PlatformAuthDOMHandler));
|
|
17652
|
+
authenticationScheme === AuthenticationScheme$1.DPOP;
|
|
17152
17653
|
const fields = {
|
|
17153
17654
|
allowPlatformBroker: config.system.allowPlatformBroker,
|
|
17154
17655
|
...(config.system.allowPlatformBroker && {
|
|
@@ -17331,19 +17832,21 @@
|
|
|
17331
17832
|
/*
|
|
17332
17833
|
* When a popup-relay page is configured, open it top-level
|
|
17333
17834
|
* (same first-party origin) instead of navigating the popup
|
|
17334
|
-
* straight to the IdP
|
|
17835
|
+
* straight to the IdP. V1 carries the action in the hash; v2
|
|
17836
|
+
* retains it for the authenticated handoff.
|
|
17335
17837
|
* The relay page opens the IdP child popup and relays the
|
|
17336
17838
|
* response back via postMessage (see waitForPopupResponse).
|
|
17337
17839
|
*/
|
|
17338
17840
|
const popupRelayUri = this.config.auth.popupRelayUri;
|
|
17841
|
+
popupParams.relayAction = { method: "GET", url: navigateUrl };
|
|
17339
17842
|
const popupNavigateUrl = popupRelayUri
|
|
17340
|
-
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId),
|
|
17843
|
+
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId), popupParams.relayAction, correlationId, this.config.auth.popupRelayProtocolVersion)
|
|
17341
17844
|
: navigateUrl;
|
|
17342
17845
|
// Show the UI once the url has been created. Get the window handle for the popup.
|
|
17343
17846
|
const popupWindow = this.initiateAuthRequest(popupNavigateUrl, popupParams);
|
|
17344
17847
|
this.eventHandler.emitEvent(EventType.POPUP_OPENED, correlationId, exports.InteractionType.Popup, { popupWindow }, null);
|
|
17345
17848
|
// Wait for the redirect bridge response
|
|
17346
|
-
const responseString = await this.waitForPopupResponse(request, popupWindow, popupParams.popupWindowParent);
|
|
17849
|
+
const responseString = await this.waitForPopupResponse(request, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
|
|
17347
17850
|
const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
|
|
17348
17851
|
return await invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, correlationId)(popupRequest, serverParams, pkce.verifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider, this.tokenBindingKeyManager);
|
|
17349
17852
|
}
|
|
@@ -17367,21 +17870,20 @@
|
|
|
17367
17870
|
const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
|
|
17368
17871
|
// Get the frame handle for the silent request
|
|
17369
17872
|
const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger, authority, azureCloudOptions, extraQueryParameters, account);
|
|
17370
|
-
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
|
|
17371
17873
|
const pkce = pkceCodes ||
|
|
17372
17874
|
(await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId));
|
|
17373
17875
|
const tokenBindingParams = await getTokenBindingRequestParams(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
|
|
17374
|
-
|
|
17876
|
+
let popupRequest = {
|
|
17375
17877
|
...request,
|
|
17376
|
-
earJwk: earJwk,
|
|
17377
17878
|
codeChallenge: pkce.challenge,
|
|
17378
17879
|
...tokenBindingParams,
|
|
17379
17880
|
popupOriginCheckDone: this.getPopupOriginCheckDone(popupParams.popupWindowParent),
|
|
17380
17881
|
};
|
|
17381
17882
|
try {
|
|
17883
|
+
popupRequest = await initializeEarRequest(this.config, popupRequest, this.logger, this.performanceClient);
|
|
17382
17884
|
const popupWindow = await this.openPostFormPopup(popupRequest, discoveredAuthority, popupParams, correlationId, true);
|
|
17383
17885
|
// Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
17384
|
-
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(popupRequest, popupWindow, popupParams.popupWindowParent);
|
|
17886
|
+
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(popupRequest, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
|
|
17385
17887
|
const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
|
|
17386
17888
|
if (!serverParams.ear_jwe && serverParams.code) {
|
|
17387
17889
|
const authClient = await invokeAsync(this.createAuthCodeClient.bind(this), StandardInteractionClientCreateAuthCodeClient, this.logger, this.performanceClient, correlationId)({
|
|
@@ -17409,7 +17911,7 @@
|
|
|
17409
17911
|
const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger);
|
|
17410
17912
|
const popupWindow = await this.openPostFormPopup(request, discoveredAuthority, popupParams, correlationId, false);
|
|
17411
17913
|
// Monitor the popup for the hash. Return the string value and close the popup when the hash is received. Default timeout is 60 seconds.
|
|
17412
|
-
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(request, popupWindow, popupParams.popupWindowParent);
|
|
17914
|
+
const responseString = await invokeAsync(this.waitForPopupResponse.bind(this), SilentHandlerMonitorIframeForHash, this.logger, this.performanceClient, correlationId)(request, popupWindow, popupParams.popupWindowParent, popupParams.relayAction);
|
|
17413
17915
|
const serverParams = invoke(deserializeResponse, DeserializeResponse, this.logger, this.performanceClient, this.correlationId)(responseString, this.config.auth.OIDCOptions.responseMode, this.logger, this.correlationId);
|
|
17414
17916
|
return invokeAsync(handleResponseCode, HandleResponseCode, this.logger, this.performanceClient, correlationId)(request, serverParams, pkceVerifier, ApiId.acquireTokenPopup, this.config, authClient, this.browserStorage, this.nativeStorage, this.eventHandler, this.logger, this.performanceClient, this.platformAuthProvider, this.tokenBindingKeyManager);
|
|
17415
17917
|
}
|
|
@@ -17465,21 +17967,22 @@
|
|
|
17465
17967
|
this.eventHandler.emitEvent(EventType.LOGOUT_SUCCESS, validRequest.correlationId, exports.InteractionType.Popup, validRequest);
|
|
17466
17968
|
/*
|
|
17467
17969
|
* When a popup-relay page is configured, open it top-level (same
|
|
17468
|
-
* first-party origin)
|
|
17469
|
-
*
|
|
17970
|
+
* first-party origin), using the configured wire protocol for the
|
|
17971
|
+
* end-session URL. The relay page opens the IdP child
|
|
17470
17972
|
* popup and the post-logout redirect page (running the redirect
|
|
17471
17973
|
* bridge) relays completion back via postMessage — so logout works
|
|
17472
17974
|
* from an embedded, cross-origin iframe where a direct popup to the
|
|
17473
17975
|
* IdP cannot. See runPopupRelay / waitForPopupResponse.
|
|
17474
17976
|
*/
|
|
17475
17977
|
const popupRelayUri = this.config.auth.popupRelayUri;
|
|
17978
|
+
popupParams.relayAction = { method: "GET", url: logoutUri };
|
|
17476
17979
|
const popupNavigateUrl = popupRelayUri
|
|
17477
|
-
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(validRequest.state || "", this.correlationId),
|
|
17980
|
+
? buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(validRequest.state || "", this.correlationId), popupParams.relayAction, this.correlationId, this.config.auth.popupRelayProtocolVersion)
|
|
17478
17981
|
: logoutUri;
|
|
17479
17982
|
// Open the popup window to requestUrl.
|
|
17480
17983
|
const popupWindow = this.openPopup(popupNavigateUrl, popupParams);
|
|
17481
17984
|
this.eventHandler.emitEvent(EventType.POPUP_OPENED, validRequest.correlationId, exports.InteractionType.Popup, { popupWindow }, null);
|
|
17482
|
-
await this.waitForPopupResponse(validRequest, popupWindow, popupParams.popupWindowParent).catch(() => {
|
|
17985
|
+
await this.waitForPopupResponse(validRequest, popupWindow, popupParams.popupWindowParent, popupParams.relayAction).catch(() => {
|
|
17483
17986
|
// Swallow any errors related to monitoring the window. Server logout is best effort
|
|
17484
17987
|
});
|
|
17485
17988
|
if (mainWindowRedirectUri) {
|
|
@@ -17691,11 +18194,12 @@
|
|
|
17691
18194
|
? getEARFormData
|
|
17692
18195
|
: getCodeFormData;
|
|
17693
18196
|
const formData = await getFormData(this.config, discoveredAuthority, request, this.logger, this.performanceClient);
|
|
17694
|
-
|
|
18197
|
+
popupParams.relayAction = {
|
|
17695
18198
|
method: "POST",
|
|
17696
18199
|
action: formData.action,
|
|
17697
18200
|
fields: formData.fields,
|
|
17698
|
-
}
|
|
18201
|
+
};
|
|
18202
|
+
const relayUrl = buildPopupRelayUrl(popupRelayUri, this.getRelayStateId(request.state, correlationId), popupParams.relayAction, correlationId, this.config.auth.popupRelayProtocolVersion);
|
|
17699
18203
|
return this.initiateAuthRequest(relayUrl, popupParams);
|
|
17700
18204
|
}
|
|
17701
18205
|
const popupWindow = popupParams.popup || this.openPopup("about:blank", popupParams);
|
|
@@ -17704,7 +18208,7 @@
|
|
|
17704
18208
|
form.submit();
|
|
17705
18209
|
return popupWindow;
|
|
17706
18210
|
}
|
|
17707
|
-
async waitForPopupResponse(request, popupWindow, popupWindowParent) {
|
|
18211
|
+
async waitForPopupResponse(request, popupWindow, popupWindowParent, relayAction) {
|
|
17708
18212
|
/*
|
|
17709
18213
|
* When a popup-relay page is configured the response is relayed back to
|
|
17710
18214
|
* this frame by the relay page via postMessage, and the relay popup's
|
|
@@ -17714,7 +18218,11 @@
|
|
|
17714
18218
|
* frame and which does not track the relay popup.
|
|
17715
18219
|
*/
|
|
17716
18220
|
if (this.config.auth.popupRelayUri) {
|
|
17717
|
-
|
|
18221
|
+
if (this.config.auth.popupRelayProtocolVersion === 2 &&
|
|
18222
|
+
!relayAction) {
|
|
18223
|
+
throw createBrowserAuthError(popupRelayUnsupportedFlow, this.correlationId, "popup_relay_bad_request");
|
|
18224
|
+
}
|
|
18225
|
+
return waitForPopupRelayResponse(this.config.system.popupBridgeTimeout, this.logger, request, popupWindow, this.performanceClient, relayAction, this.config.auth.popupRelayProtocolVersion);
|
|
17718
18226
|
}
|
|
17719
18227
|
if (this.waitForPopupResponseHook) {
|
|
17720
18228
|
return this.waitForPopupResponseHook(request, popupWindow, popupWindowParent);
|
|
@@ -17839,16 +18347,15 @@
|
|
|
17839
18347
|
const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
|
|
17840
18348
|
// Get the frame handle for the silent request
|
|
17841
18349
|
const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger, authority, azureCloudOptions, extraQueryParameters, account);
|
|
17842
|
-
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
|
|
17843
18350
|
const pkceCodes = await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId);
|
|
17844
18351
|
const tokenBindingParams = await getTokenBindingRequestParams(request, this.tokenBindingKeyManager, this.logger, this.performanceClient);
|
|
17845
|
-
|
|
18352
|
+
let redirectRequest = {
|
|
17846
18353
|
...request,
|
|
17847
|
-
earJwk: earJwk,
|
|
17848
18354
|
codeChallenge: pkceCodes.challenge,
|
|
17849
18355
|
...tokenBindingParams,
|
|
17850
18356
|
};
|
|
17851
18357
|
try {
|
|
18358
|
+
redirectRequest = await initializeEarRequest(this.config, redirectRequest, this.logger, this.performanceClient);
|
|
17852
18359
|
if (!(await isTokenBindingKeyPersistedForRedirect(redirectRequest, this.tokenBindingKeyManager))) {
|
|
17853
18360
|
throw createBrowserAuthError(cryptoKeyNotFound, this.correlationId);
|
|
17854
18361
|
}
|
|
@@ -17861,9 +18368,10 @@
|
|
|
17861
18368
|
}, this.config.system.redirectNavigationTimeout);
|
|
17862
18369
|
});
|
|
17863
18370
|
}
|
|
17864
|
-
catch (
|
|
18371
|
+
catch (error) {
|
|
18372
|
+
this.browserStorage.resetRequestCache(correlationId);
|
|
17865
18373
|
await removeTokenBindingKeyOnFailure(redirectRequest, this.tokenBindingKeyManager, this.logger, this.performanceClient);
|
|
17866
|
-
throw
|
|
18374
|
+
throw error;
|
|
17867
18375
|
}
|
|
17868
18376
|
}
|
|
17869
18377
|
/**
|
|
@@ -18052,7 +18560,6 @@
|
|
|
18052
18560
|
/**
|
|
18053
18561
|
* Redirects window to given URL.
|
|
18054
18562
|
* @param urlNavigate
|
|
18055
|
-
* @param onRedirectNavigateRequest - onRedirectNavigate callback provided on the request
|
|
18056
18563
|
*/
|
|
18057
18564
|
async initiateAuthRequest(requestUrl) {
|
|
18058
18565
|
this.logger.verbose("0yaw2e", this.correlationId);
|
|
@@ -18340,13 +18847,11 @@
|
|
|
18340
18847
|
async executeEarFlow(request) {
|
|
18341
18848
|
const { correlationId, authority, azureCloudOptions, extraQueryParameters, account, } = request;
|
|
18342
18849
|
const discoveredAuthority = await invokeAsync(getDiscoveredAuthority, StandardInteractionClientGetDiscoveredAuthority, this.logger, this.performanceClient, correlationId)(this.config, this.correlationId, this.performanceClient, this.browserStorage, this.logger, authority, azureCloudOptions, extraQueryParameters, account);
|
|
18343
|
-
const earJwk = await invokeAsync(generateEarKey, GenerateEarKey, this.logger, this.performanceClient, correlationId)();
|
|
18344
18850
|
const pkceCodes = await invokeAsync(generatePkceCodes, GeneratePkceCodes, this.logger, this.performanceClient, correlationId)(this.performanceClient, this.logger, correlationId);
|
|
18345
|
-
const silentRequest = {
|
|
18851
|
+
const silentRequest = await initializeEarRequest(this.config, {
|
|
18346
18852
|
...request,
|
|
18347
|
-
earJwk: earJwk,
|
|
18348
18853
|
codeChallenge: pkceCodes.challenge,
|
|
18349
|
-
};
|
|
18854
|
+
}, this.logger, this.performanceClient);
|
|
18350
18855
|
// Create the iframe, register the response listener, then navigate, so the listener is active before the iframe can respond.
|
|
18351
18856
|
const iframe = createHiddenIframe();
|
|
18352
18857
|
const responseType = this.config.auth.OIDCOptions.responseMode;
|
|
@@ -18708,6 +19213,7 @@
|
|
|
18708
19213
|
return {
|
|
18709
19214
|
key: JSON.stringify({
|
|
18710
19215
|
...thumbprint,
|
|
19216
|
+
accountTenantId: account.tenantId,
|
|
18711
19217
|
forceRefresh: !!request.forceRefresh,
|
|
18712
19218
|
cacheLookupPolicy: request.cacheLookupPolicy ?? CacheLookupPolicy.Default,
|
|
18713
19219
|
extraParameters: canonicalizeStringDict(request.extraParameters),
|
|
@@ -18726,7 +19232,10 @@
|
|
|
18726
19232
|
account,
|
|
18727
19233
|
});
|
|
18728
19234
|
return {
|
|
18729
|
-
key:
|
|
19235
|
+
key: platformRequest.authenticationScheme ===
|
|
19236
|
+
AuthenticationScheme$1.DPOP
|
|
19237
|
+
? undefined
|
|
19238
|
+
: `platform:${getPlatformSilentRequestKey(platformRequest, config)}`,
|
|
18730
19239
|
request: platformRequest,
|
|
18731
19240
|
account: platformRequest.account,
|
|
18732
19241
|
};
|
|
@@ -18758,7 +19267,6 @@
|
|
|
18758
19267
|
loginHint: request.loginHint,
|
|
18759
19268
|
popKid: request.popKid,
|
|
18760
19269
|
shrNonce: request.shrNonce,
|
|
18761
|
-
dpopNonce: request.dpopNonce,
|
|
18762
19270
|
skipBrokerClaims: request.embeddedClientId
|
|
18763
19271
|
? !!request.skipBrokerClaims
|
|
18764
19272
|
: undefined,
|
|
@@ -20007,6 +20515,16 @@
|
|
|
20007
20515
|
getLogger() {
|
|
20008
20516
|
return this.logger;
|
|
20009
20517
|
}
|
|
20518
|
+
/**
|
|
20519
|
+
* Stores a resource-server DPoP nonce for the matching HTTPS origin.
|
|
20520
|
+
*/
|
|
20521
|
+
async loadDpopNonce(resourceRequestUri, dpopNonce) {
|
|
20522
|
+
blockNonBrowserEnvironment();
|
|
20523
|
+
const correlationId = createNewGuid();
|
|
20524
|
+
return invokeAsync(async () => {
|
|
20525
|
+
this.browserStorage.setDpopNonce(resourceRequestUri, dpopNonce, correlationId);
|
|
20526
|
+
}, StandardControllerLoadDpopNonce, this.logger, this.performanceClient, correlationId)();
|
|
20527
|
+
}
|
|
20010
20528
|
/**
|
|
20011
20529
|
* Replaces the default logger set in configurations with new Logger with new configurations
|
|
20012
20530
|
* @param logger Logger instance
|
|
@@ -20161,32 +20679,55 @@
|
|
|
20161
20679
|
correlationId,
|
|
20162
20680
|
config: this.config,
|
|
20163
20681
|
}, this.platformAuthProvider, this.logger, this.performanceClient);
|
|
20164
|
-
const
|
|
20165
|
-
|
|
20682
|
+
const requestKey = preparedRequest.key;
|
|
20683
|
+
const shouldDeduplicate = requestKey !== undefined;
|
|
20166
20684
|
const inProgressRequest = shouldDeduplicate
|
|
20167
|
-
? this.activeSilentTokenRequests.get(
|
|
20685
|
+
? this.activeSilentTokenRequests.get(requestKey)
|
|
20168
20686
|
: undefined;
|
|
20169
20687
|
if (typeof inProgressRequest === "undefined") {
|
|
20170
20688
|
this.logger.verbose(shouldDeduplicate
|
|
20171
20689
|
? "0fcjbk"
|
|
20172
|
-
: "acquireTokenSilent called for DPoP request, starting an independent operation", correlationId);
|
|
20690
|
+
: "acquireTokenSilent called for platform DPoP request, starting an independent operation", correlationId);
|
|
20173
20691
|
this.performanceClient.addFields({ deduped: false }, correlationId);
|
|
20174
20692
|
const activeRequest = invokeAsync(this.acquireTokenSilentAsync.bind(this), AcquireTokenSilentAsync, this.logger, this.performanceClient, correlationId)({
|
|
20175
20693
|
...preparedRequest.request,
|
|
20176
20694
|
correlationId,
|
|
20177
20695
|
}, preparedRequest.account);
|
|
20178
|
-
if (
|
|
20696
|
+
if (requestKey === undefined) {
|
|
20179
20697
|
return activeRequest;
|
|
20180
20698
|
}
|
|
20181
|
-
this.activeSilentTokenRequests.set(
|
|
20699
|
+
this.activeSilentTokenRequests.set(requestKey, activeRequest);
|
|
20182
20700
|
return activeRequest.finally(() => {
|
|
20183
|
-
this.activeSilentTokenRequests.delete(
|
|
20701
|
+
this.activeSilentTokenRequests.delete(requestKey);
|
|
20184
20702
|
});
|
|
20185
20703
|
}
|
|
20186
20704
|
else {
|
|
20187
20705
|
this.logger.verbose("1yq7nb", correlationId);
|
|
20188
20706
|
this.performanceClient.addFields({ deduped: true }, correlationId);
|
|
20189
|
-
|
|
20707
|
+
const joiningRequest = {
|
|
20708
|
+
...preparedRequest.request,
|
|
20709
|
+
correlationId,
|
|
20710
|
+
};
|
|
20711
|
+
const result = await inProgressRequest;
|
|
20712
|
+
if (joiningRequest.authenticationScheme !==
|
|
20713
|
+
AuthenticationScheme$1.DPOP) {
|
|
20714
|
+
return result;
|
|
20715
|
+
}
|
|
20716
|
+
if (result.fromPlatformBroker &&
|
|
20717
|
+
!ResponseHandler.hasDpopKeyId(result)) {
|
|
20718
|
+
return invokeAsync(this.acquireTokenSilentAsync.bind(this), AcquireTokenSilentAsync, this.logger, this.performanceClient, correlationId)(joiningRequest, result.account || preparedRequest.account);
|
|
20719
|
+
}
|
|
20720
|
+
const dpopProof = await ResponseHandler.generateDpopResourceProof(this.browserCrypto, result, {
|
|
20721
|
+
...joiningRequest,
|
|
20722
|
+
authority: joiningRequest.authority || this.config.auth.authority,
|
|
20723
|
+
}, this.performanceClient, {
|
|
20724
|
+
tokenBindingKeyManager: this.tokenBindingKeyManager,
|
|
20725
|
+
dpopNonceProvider: this.browserStorage,
|
|
20726
|
+
});
|
|
20727
|
+
return {
|
|
20728
|
+
...result,
|
|
20729
|
+
dpopProof,
|
|
20730
|
+
};
|
|
20190
20731
|
}
|
|
20191
20732
|
}
|
|
20192
20733
|
/**
|
|
@@ -20954,8 +21495,21 @@
|
|
|
20954
21495
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20955
21496
|
isBroker) {
|
|
20956
21497
|
const initCorrelationId = request?.correlationId || createNewGuid();
|
|
20957
|
-
|
|
20958
|
-
|
|
21498
|
+
const initMeasurement = this.performanceClient.startMeasurement(InitializeClientApplication, initCorrelationId);
|
|
21499
|
+
initMeasurement.add({
|
|
21500
|
+
nestedAppAuthRequest: true,
|
|
21501
|
+
bridgeType: "NAA",
|
|
21502
|
+
});
|
|
21503
|
+
try {
|
|
21504
|
+
await invokeAsync(this.browserStorage.initialize.bind(this.browserStorage), InitializeCache, this.logger, this.performanceClient, initCorrelationId)(initCorrelationId);
|
|
21505
|
+
}
|
|
21506
|
+
catch (error) {
|
|
21507
|
+
initMeasurement.discard();
|
|
21508
|
+
throw error;
|
|
21509
|
+
}
|
|
21510
|
+
initMeasurement.end({
|
|
21511
|
+
success: true,
|
|
21512
|
+
});
|
|
20959
21513
|
}
|
|
20960
21514
|
/**
|
|
20961
21515
|
* Validate the incoming request and add correlationId if not present
|
|
@@ -21364,6 +21918,13 @@
|
|
|
21364
21918
|
async clearCache(logoutRequest) {
|
|
21365
21919
|
throw NestedAppAuthError.createUnsupportedError(logoutRequest?.correlationId);
|
|
21366
21920
|
}
|
|
21921
|
+
/**
|
|
21922
|
+
* Rejects DPoP nonce loading until nested app authentication supports
|
|
21923
|
+
* forwarding the complete resource proof context.
|
|
21924
|
+
*/
|
|
21925
|
+
loadDpopNonce() {
|
|
21926
|
+
return Promise.reject(NestedAppAuthError.createUnsupportedError());
|
|
21927
|
+
}
|
|
21367
21928
|
async hydrateCache(result, request) {
|
|
21368
21929
|
this.logger.verbose("16jycr", result.correlationId);
|
|
21369
21930
|
const accountEntity = createAccountEntityFromAccountInfo(result.account, result.cloudGraphHostName, result.msGraphHost);
|
|
@@ -21993,6 +22554,12 @@
|
|
|
21993
22554
|
getActiveAccount() {
|
|
21994
22555
|
return this.controller.getActiveAccount();
|
|
21995
22556
|
}
|
|
22557
|
+
/**
|
|
22558
|
+
* Stores an opaque resource-server DPoP nonce for the matching HTTPS origin.
|
|
22559
|
+
*/
|
|
22560
|
+
loadDpopNonce(resourceRequestUri, dpopNonce) {
|
|
22561
|
+
return this.controller.loadDpopNonce(resourceRequestUri, dpopNonce);
|
|
22562
|
+
}
|
|
21996
22563
|
/**
|
|
21997
22564
|
* Called by wrapper libraries (Angular & React) to set SKU and Version passed down to telemetry, logger, etc.
|
|
21998
22565
|
* @param sku
|
|
@@ -22039,10 +22606,11 @@
|
|
|
22039
22606
|
* @param configuration
|
|
22040
22607
|
* @param correlationId
|
|
22041
22608
|
* @param pcaFactory
|
|
22609
|
+
* @param standardPcaFactory
|
|
22042
22610
|
* @returns IPublicClientApplication
|
|
22043
22611
|
*
|
|
22044
22612
|
*/
|
|
22045
|
-
async function createNestablePublicClientApplication(configuration, correlationId, pcaFactory) {
|
|
22613
|
+
async function createNestablePublicClientApplication(configuration, correlationId, pcaFactory, standardPcaFactory) {
|
|
22046
22614
|
const nestedAppAuth = new NestedAppOperatingContext(configuration);
|
|
22047
22615
|
await nestedAppAuth.initialize(correlationId);
|
|
22048
22616
|
if (nestedAppAuth.isAvailable()) {
|
|
@@ -22054,6 +22622,11 @@
|
|
|
22054
22622
|
await nestablePCA.initialize({ correlationId: cid });
|
|
22055
22623
|
return nestablePCA;
|
|
22056
22624
|
}
|
|
22625
|
+
if (standardPcaFactory) {
|
|
22626
|
+
const standardPCA = standardPcaFactory(configuration);
|
|
22627
|
+
await standardPCA.initialize(correlationId ? { correlationId } : undefined);
|
|
22628
|
+
return standardPCA;
|
|
22629
|
+
}
|
|
22057
22630
|
return createStandardPublicClientApplication(configuration);
|
|
22058
22631
|
}
|
|
22059
22632
|
/**
|
|
@@ -22186,6 +22759,9 @@
|
|
|
22186
22759
|
clearCache: () => {
|
|
22187
22760
|
return Promise.reject(createBrowserConfigurationAuthError(stubbedPublicClientApplicationCalled, ""));
|
|
22188
22761
|
},
|
|
22762
|
+
loadDpopNonce: () => {
|
|
22763
|
+
return Promise.reject(createBrowserConfigurationAuthError(stubbedPublicClientApplicationCalled, ""));
|
|
22764
|
+
},
|
|
22189
22765
|
};
|
|
22190
22766
|
|
|
22191
22767
|
/*
|