synapse/tests/handlers
Andrew Morgan 847ecdd8fa
Pass SSO IdP information to spam checker's registration function (#9626)
Fixes https://github.com/matrix-org/synapse/issues/9572

When a SSO user logs in for the first time, we create a local Matrix user for them. This goes through the register_user flow, which ends up triggering the spam checker. Spam checker modules don't currently have any way to differentiate between a user trying to sign up initially, versus an SSO user (whom has presumably already been approved elsewhere) trying to log in for the first time.

This PR passes `auth_provider_id` as an argument to the `check_registration_for_spam` function. This argument will contain an ID of an SSO provider (`"saml"`, `"cas"`, etc.) if one was used, else `None`.
2021-03-16 12:41:41 +00:00
..
__init__.py Reference Matrix Home Server 2014-08-12 15:10:52 +01:00
oidc_test_key.p8 JWT OIDC secrets for Sign in with Apple (#9549) 2021-03-09 15:03:37 +00:00
oidc_test_key.pub.pem JWT OIDC secrets for Sign in with Apple (#9549) 2021-03-09 15:03:37 +00:00
test_admin.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
test_appservice.py Convert additional test-cases to homeserver test case. (#9396) 2021-02-16 08:04:15 -05:00
test_auth.py Record the SSO Auth Provider in the login token (#9510) 2021-03-04 14:44:22 +00:00
test_cas.py Record the SSO Auth Provider in the login token (#9510) 2021-03-04 14:44:22 +00:00
test_device.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
test_directory.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
test_e2e_keys.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
test_e2e_room_keys.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
test_federation.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
test_message.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
test_oidc.py JWT OIDC secrets for Sign in with Apple (#9549) 2021-03-09 15:03:37 +00:00
test_password_providers.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
test_presence.py Be smarter about which hosts to send presence to when processing room joins (#9402) 2021-02-19 11:37:29 +00:00
test_profile.py Add configs to make profile data more private (#9203) 2021-02-19 09:50:41 +00:00
test_register.py Pass SSO IdP information to spam checker's registration function (#9626) 2021-03-16 12:41:41 +00:00
test_saml.py Record the SSO Auth Provider in the login token (#9510) 2021-03-04 14:44:22 +00:00
test_stats.py Rename 'populate_stats_process_rooms_2' background job back to 'populate_stats_process_rooms' again (#8243) 2020-09-08 11:05:59 +01:00
test_sync.py Add admin API for logging in as a user (#8617) 2020-11-17 10:51:25 +00:00
test_typing.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
test_user_directory.py Fix style checking due to updated black. 2021-02-19 08:19:54 -05:00