summary refs log tree commit diff
path: root/tests/handlers/test_register.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Pass SSO IdP information to spam checker's registration function (#9626)Andrew Morgan2021-03-161-0/+31
| | | | | | | 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`.
* Remove the deprecated Handlers object (#8494)Patrick Cloke2020-10-091-14/+8
| | | All handlers now available via get_*_handler() methods on the HomeServer.
* kill off `send_nonmember_event`Richard van der Hoff2020-10-051-1/+1
| | | | This is now redundant, and we can just call `handle_new_client_event` directly.
* Allow for make_awaitable's return value to be re-used. (#8261)Patrick Cloke2020-09-081-5/+5
|
* Convert stats and related calls to async/await (#8192)Patrick Cloke2020-08-271-7/+5
|
* Allow denying or shadow banning registrations via the spam checker (#8034)Patrick Cloke2020-08-201-1/+51
|
* Converts event_federation and registration databases to async/await (#8061)Patrick Cloke2020-08-111-5/+6
|
* Additional configuration options for auto-join rooms (#7763)Patrick Cloke2020-06-301-2/+210
|
* Add an option to disable autojoin for guest accounts (#6637)Travis Ralston2020-06-051-0/+10
| | | | Fixes https://github.com/matrix-org/synapse/issues/3177
* async/await is_server_admin (#7363)Andrew Morgan2020-05-011-15/+14
|
* Convert auth handler to async/await (#7261)Patrick Cloke2020-04-151-1/+3
|
* Remove spurious "name" parameter to `default_config`Richard van der Hoff2020-03-241-1/+1
| | | | | this is never set to anything other than "test", and is a source of unnecessary boilerplate.
* Kill off RegistrationError (#6691)Richard van der Hoff2020-01-131-2/+0
| | | This is pretty pointless. Let's just use SynapseError.
* Only count real users when checking for auto-creation of auto-join roomJason Robinson2019-09-091-2/+27
| | | | | | | | | | | | Previously if the first registered user was a "support" or "bot" user, when the first real user registers, the auto-join rooms were not created. Fix to exclude non-real (ie users with a special user type) users when counting how many users there are to determine whether we should auto-create a room. Signed-off-by: Jason Robinson <jasonr@matrix.org>
* Remove unnecessary parentheses around return statements (#5931)Andrew Morgan2019-08-301-1/+1
| | | | | Python will return a tuple whether there are parentheses around the returned values or not. I'm just sick of my editor complaining about this all over the place :)
* Remove non-functional 'expire_access_token' setting (#5782)Richard van der Hoff2019-07-301-1/+1
| | | | | | | | The `expire_access_token` didn't do what it sounded like it should do. What it actually did was make Synapse enforce the 'time' caveat on macaroons used as access tokens, but since our access token macaroons never contained such a caveat, it was always a no-op. (The code to add 'time' caveats was removed back in v0.18.5, in #1656)
* Replace returnValue with return (#5736)Amber Brown2019-07-231-1/+1
|
* Implement access token expiry (#5660)Richard van der Hoff2019-07-121-1/+4
| | | | Record how long an access token is valid for, and raise a soft-logout once it expires.
* Remove access-token support from RegistrationStore.register (#5642)Richard van der Hoff2019-07-101-5/+1
| | | | | The 'token' param is no longer used anywhere except the tests, so let's kill that off too.
* Remove access-token support from RegistrationHandler.register (#5641)Richard van der Hoff2019-07-081-25/+28
| | | | | | | | Nothing uses this now, so we can remove the dead code, and clean up the API. Since we're changing the shape of the return value anyway, we take the opportunity to give the method a better name.
* Move get_or_create_user to test code (#5628)Richard van der Hoff2019-07-081-9/+59
| | | This is only used in tests, so...
* Run Black. (#5482)Amber Brown2019-06-201-17/+14
|
* Limit UserIds to a length that fits in a state key (#5198)ReidAnderson2019-05-201-0/+7
|
* Migrate all tests to use the dict-based config format instead of hanging ↵Amber Brown2019-05-131-2/+6
| | | | items off HomeserverConfig (#5171)
* Some more porting to HomeserverTestCase and remove old RESTHelper (#4913)Amber Brown2019-03-221-66/+58
|
* Fix RegistrationTestCaseRichard van der Hoff2019-03-191-2/+9
| | | | turns out this relies on there being a `user_consent_version` set.
* fix test_auto_create_auto_join_where_no_consent (#4886)Neil Johnson2019-03-191-2/+22
|
* Fix registration on workers (#4682)Erik Johnston2019-02-201-1/+1
| | | | | | | | | | * Move RegistrationHandler init to HomeServer * Move post registration actions to RegistrationHandler * Add post regisration replication endpoint * Newsfile
* create support user (#4141)Neil Johnson2018-12-141-2/+28
| | | | | | Allow for the creation of a support user. A support user can access the server, join rooms, interact with other users, but does not appear in the user directory nor does it contribute to monthly active user limits.
* Rip out half-implemented m.login.saml2 support (#4265)Richard van der Hoff2018-12-061-15/+0
| | | | | | | | | | | | | * Rip out half-implemented m.login.saml2 support This was implemented in an odd way that left most of the work to the client, in a way that I really didn't understand. It's going to be a pain to maintain, so let's start by ripping it out. * drop undocumented dependency on dateutil It turns out we were relying on dateutil being pulled in transitively by pysaml2. There's no need for that bloat.
* Neilj/fix autojoin (#4223)Neil Johnson2018-11-281-1/+11
| | | | | | * Fix auto join failures for servers that require user consent * Fix auto join failures for servers that require user consent
* improve auto room join logic, comments and testsNeil Johnson2018-10-121-4/+17
|
* move logic into register, fix room alias localpart bug, testsNeil Johnson2018-10-041-19/+43
|
* add new error type ResourceLimitNeil Johnson2018-08-161-7/+7
|
* fix off by 1 errorsNeil Johnson2018-08-141-2/+14
|
* support admin_email config and pass through into blocking errors, return ↵Neil Johnson2018-08-141-4/+4
| | | | AuthError in all cases
* fix off by 1s on mauNeil Johnson2018-08-141-4/+10
|
* support admin_email config and pass through into blocking errors, return ↵Neil Johnson2018-08-131-4/+4
| | | | AuthError in all cases
* Revert "support admin_email config and pass through into blocking errors, ↵Neil Johnson2018-08-131-4/+4
| | | | | | return AuthError in all cases" This reverts commit 0d43f991a19840a224d3dac78d79f13d78212ee6.
* support admin_email config and pass through into blocking errors, return ↵Neil Johnson2018-08-131-4/+4
| | | | AuthError in all cases
* Run tests under PostgreSQL (#3423)Amber Brown2018-08-131-0/+1
|
* Run black.black2018-08-101-4/+8
|
* bug fixesNeil Johnson2018-08-031-1/+0
|
* do mau checks based on monthly_active_users tableNeil Johnson2018-08-021-37/+34
|
* make count_monthly_users async synapse/handlers/auth.pyNeil Johnson2018-08-011-4/+6
|
* limit register and sign in on number of monthly usersNeil Johnson2018-07-301-0/+49
|
* run isortAmber Brown2018-07-091-2/+3
|
* Split out profile handler to fix testsErik Johnston2017-08-251-2/+3
|
* Fix email push in pusher workerErik Johnston2017-02-021-5/+2
| | | | | | This was broken when device list updates were implemented, as Mailer could no longer instantiate an AuthHandler due to a dependency on federation sending.
* Stop putting a time caveat on access tokensRichard van der Hoff2016-11-291-4/+2
| | | | | | | | The 'time' caveat on the access tokens was something of a lie, since we weren't enforcing it; more pertinently its presence stops us ever adding useful time caveats. Let's move in the right direction by not lying in our caveats.
* rest/client/v1/register: use the correct requester in createUserPatrik Oldsberg2016-10-061-3/+5
| | | | Signed-off-by: Patrik Oldsberg <patrik.oldsberg@ericsson.com>
* Bug fix: expire invalid access tokensNegar Fazeli2016-07-131-2/+2
|
* Fix a bug caused by a change in auth_handler functionNegar Fazeli2016-06-081-6/+3
| | | | Fix the relevant unit test cases
* Fix set profile error with Requester.Negi Fazeli2016-05-231-9/+25
| | | | | Replace flush_user with delete access token due to function removal Add a new test case for if the user is already registered
* Create user with expiryNegi Fazeli2016-05-131-0/+67
- Add unittests for client, api and handler Signed-off-by: Negar Fazeli <negar.fazeli@ericsson.com>