summary refs log tree commit diff
path: root/tests/storage/test_registration.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Replace assertEquals and friends with non-deprecated versions. (#12092)Patrick Cloke2022-02-281-3/+3
|
* Remove `HomeServer.get_datastore()` (#12031)Richard van der Hoff2022-02-231-1/+1
| | | | | | | The presence of this method was confusing, and mostly present for backwards compatibility. Let's get rid of it. Part of #11733
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Convert storage test cases to HomeserverTestCase. (#9736)Patrick Cloke2021-04-061-65/+43
|
* Add the shadow-banning status to the display user admin API. (#9400)Dirk Klimpel2021-02-171-0/+1
|
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-2/+8
| | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
* Add ability for access tokens to belong to one user but grant access to ↵Erik Johnston2020-10-291-6/+4
| | | | | | | | | | another user. (#8616) We do it this way round so that only the "owner" can delete the access token (i.e. `/logout/all` by the "owner" also deletes that token, but `/logout/all` by the "target user" doesn't). A future PR will add an API for creating such a token. When the target user and authenticated entity are different the `Processed request` log line will be logged with a: `{@admin:server as @bob:server} ...`. I'm not convinced by that format (especially since it adds spaces in there, making it harder to use `cut -d ' '` to chop off the start of log lines). Suggestions welcome.
* Do not yield on awaitables in tests. (#8193)Patrick Cloke2020-08-271-16/+28
|
* Convert simple_select_one and simple_select_one_onecol to async (#8162)Patrick Cloke2020-08-261-1/+1
|
* Don't fail /submit_token requests on incorrect session ID if ↵Brendan Abolivier2020-08-241-0/+31
| | | | | | | | | | | | | | | | | | | request_token_inhibit_3pid_errors is turned on (#7991) * Don't raise session_id errors on submit_token if request_token_inhibit_3pid_errors is set * Changelog * Also wait some time before responding to /requestToken * Incorporate review * Update synapse/storage/databases/main/registration.py Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> * Incorporate review Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
* Converts event_federation and registration databases to async/await (#8061)Patrick Cloke2020-08-111-6/+12
|
* Allow admin users to create or modify users without a shared secret (#6495)Manuel Stahl2020-01-091-0/+2
| | | Signed-off-by: Manuel Stahl <manuel.stahl@awesome-technologies.de>
* Add database config class (#6513)Erik Johnston2019-12-181-1/+0
| | | | | This encapsulates config for a given database and is the way to get new connections.
* Fix registration testHalf-Shot2019-08-231-0/+1
|
* Implement access token expiry (#5660)Richard van der Hoff2019-07-121-3/+5
| | | | 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-24/+7
| | | | | The 'token' param is no longer used anywhere except the tests, so let's kill that off too.
* Run Black. (#5482)Amber Brown2019-06-201-1/+1
|
* Run Black on the tests again (#5170)Amber Brown2019-05-101-1/+1
|
* create support user (#4141)Neil Johnson2018-12-141-0/+22
| | | | | | 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.
* Implement trail usersErik Johnston2018-08-231-0/+1
|
* Run tests under PostgreSQL (#3423)Amber Brown2018-08-131-1/+1
|
* Run black.black2018-08-101-25/+13
|
* run isortAmber Brown2018-07-091-1/+1
|
* fix testsRichard van der Hoff2018-05-291-0/+1
|
* Send users a server notice about consentRichard van der Hoff2018-05-221-3/+8
| | | | | When a user first syncs, we will send them a server notice asking them to consent to the privacy policy if they have not already done so.
* Fix tests for refresh_token removalRichard van der Hoff2017-11-011-3/+3
|
* fix importsRichard van der Hoff2016-11-301-3/+0
|
* Rip out more refresh_token codeRichard van der Hoff2016-11-301-55/+0
| | | | | | | | We might as well treat all refresh_tokens as invalid. Just return a 403 from /tokenrefresh, so that we don't have a load of dead, untestable code hanging around. Still TODO: removing the table from the schema.
* Delete refresh tokens when deleting devicesRichard van der Hoff2016-07-261-0/+34
|
* Add device_id support to /loginRichard van der Hoff2016-07-181-7/+14
| | | | | | | | | | | | | Add a 'devices' table to the storage, as well as a 'device_id' column to refresh_tokens. Allow the client to pass a device_id, and initial_device_display_name, to /login. If login is successful, then register the device in the devices table if it wasn't known already. If no device_id was supplied, make one up. Associate the device_id with the access token and refresh token, so that we can get at it again later. Ensure that the device_id is copied from the refresh token to the access_token when the token is refreshed.
* Fix flake8 warnings for testsMark Haines2016-02-191-2/+4
|
* Fix testsErik Johnston2016-01-271-2/+1
|
* Merge pull request #456 from matrix-org/store_event_actionsDavid Baker2016-01-081-1/+1
|\ | | | | Send unread notification counts
| * fix testsDavid Baker2016-01-061-1/+1
| |
* | copyrightsMatthew Hodgson2016-01-071-1/+1
|/
* Stop looking up "admin", which we never readDaniel Wagner-Hall2015-08-251-4/+2
|
* Remove completely unused concepts from codebaseDaniel Wagner-Hall2015-08-251-2/+0
| | | | | | | | | | Removes device_id and ClientInfo device_id is never actually written, and the matrix.org DB has no non-null entries for it. Right now, it's just cluttering up code. This doesn't remove the columns from the database, because that's fiddly.
* /tokenrefresh POST endpointDaniel Wagner-Hall2015-08-201-0/+55
| | | | | | | | This allows refresh tokens to be exchanged for (access_token, refresh_token). It also starts issuing them on login, though no clients currently interpret them.
* s/by_token/by_access_token/gDaniel Wagner-Hall2015-08-201-2/+2
| | | | We're about to have two kinds of token, access and refresh
* Caches should be bound to instances.Erik Johnston2015-06-031-1/+1
| | | | | Before, caches were global and so different instances of the stores would share caches. This caused problems in the unit tests.
* Make work in both Maria and SQLite. Fix testsErik Johnston2015-04-011-13/+23
|
* Factor out some of the common homeserver setup code into aMark Haines2015-02-111-8/+2
| | | | setup_test_homeserver function in utils.
* Extract the id token of the token when authing users, include the token and ↵Mark Haines2015-01-281-2/+8
| | | | device_id in the internal meta data for the event along with the transaction id when sending events
* Unbreak tests after changing storage APIErik Johnston2014-09-291-2/+2
|
* Use new 'tests.unittest' in new storage level testsPaul "LeoNerd" Evans2014-09-151-1/+1
|
* Unit-test for RegistrationStore using SQLiteMemoryDbPoolPaul "LeoNerd" Evans2014-09-111-0/+69