File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3338,6 +3338,12 @@ async def signin_with_passkey(
33383338 raise MissingRequiredArgumentError ("auth_session" )
33393339 if authn_response is None :
33403340 raise MissingRequiredArgumentError ("authn_response" )
3341+ if self ._use_mtls and dpop_key is not None :
3342+ raise ConfigurationError (
3343+ "dpop_key cannot be combined with use_mtls. DPoP and mTLS bind tokens "
3344+ "differently; DPoP would take precedence and the token would not be "
3345+ "certificate-bound."
3346+ )
33413347
33423348 try :
33433349 domain = await self ._resolve_current_domain (store_options )
Original file line number Diff line number Diff line change @@ -9805,6 +9805,17 @@ async def test_apply_client_auth_mtls_returns_none_and_strips_creds():
98059805 assert "client_assertion_type" not in params
98069806
98079807
9808+ @pytest .mark .asyncio
9809+ async def test_signin_with_passkey_rejects_dpop_under_mtls (mocker ):
9810+ client = _mtls_client ()
9811+ with pytest .raises (ConfigurationError ):
9812+ await client .signin_with_passkey (
9813+ auth_session = "sess" ,
9814+ authn_response = mocker .Mock (),
9815+ dpop_key = object (),
9816+ )
9817+
9818+
98089819@pytest .mark .asyncio
98099820async def test_complete_interactive_login_uses_mtls_token_endpoint (mocker ):
98109821 mock_tx_store = AsyncMock ()
You can’t perform that action at this time.
0 commit comments