summary refs log tree commit diff
path: root/synapse/storage/registration.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add appservice workerErik Johnston2016-08-181-11/+22
|
* Refactor user_delete_access_tokens. Invalidate get_user_by_access_token to ↵Erik Johnston2016-08-151-38/+32
| | | | slaves.
* Fix typoRichard van der Hoff2016-07-261-1/+1
|
* Delete refresh tokens when deleting devicesRichard van der Hoff2016-07-261-13/+45
|
* Implement deleting devicesRichard van der Hoff2016-07-261-4/+22
|
* Further registration refactoringRichard van der Hoff2016-07-191-2/+4
| | | | | | | | | | | | | | * `RegistrationHandler.appservice_register` no longer issues an access token: instead it is left for the caller to do it. (There are two of these, one in `synapse/rest/client/v1/register.py`, which now simply calls `AuthHandler.issue_access_token`, and the other in `synapse/rest/client/v2_alpha/register.py`, which is covered below). * In `synapse/rest/client/v2_alpha/register.py`, move the generation of access_tokens into `_create_registration_details`. This means that the normal flow no longer needs to call `AuthHandler.issue_access_token`; the shared-secret flow can tell `RegistrationHandler.register` not to generate a token; and the appservice flow continues to work despite the above change.
* Add device_id support to /loginRichard van der Hoff2016-07-181-10/+18
| | | | | | | | | | | | | 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.
* Add a comment explaining allow_noneMark Haines2016-07-081-0/+2
|
* Ensure that the guest user is in the database when upgrading accountsMark Haines2016-07-081-0/+13
|
* Remove spurious txnErik Johnston2016-07-051-9/+0
|
* Fix for postgresErik Johnston2016-07-051-2/+2
|
* Add an admin option to shared secret registrationErik Johnston2016-07-051-23/+38
|
* Feature: Add deactivate account admin APIErik Johnston2016-06-301-0/+9
| | | | | | | | | | Allows server admins to "deactivate" accounts, which: - Revokes all access tokens - Removes all threepids - Removes password The API is a POST to `/admin/deactivate/<user_id>`
* Remove registered_users from the distributor.Mark Haines2016-06-171-3/+14
| | | | | | | | | | The only place that was observed was to set the profile. I've made it so that the profile is set within store.register in the same transaction that creates the user. This required some slight changes to the registration code for upgrading guest users, since it previously relied on the distributor swallowing errors if the profile already existed.
* Add cache to get_user_by_idErik Johnston2016-05-091-0/+3
|
* pep8David Baker2016-04-061-1/+1
|
* Make pushers use the event_push_actions table instead of listening on an ↵David Baker2016-04-061-20/+0
| | | | | | | event stream & running the rules again. Sytest passes, but remaining to do: * Make badges work again * Remove old, unused code
* Use google style doc strings.Mark Haines2016-04-011-6/+9
| | | | | | | pycharm supports them so there is no need to use the other format. Might as well convert the existing strings to reduce the risk of people accidentally cargo culting the wrong doc string format.
* Thats not how transactions work.Erik Johnston2016-03-111-13/+16
|
* Implement logoutErik Johnston2016-03-111-14/+35
|
* Fix SQL statementErik Johnston2016-03-111-1/+1
|
* more pep8David Baker2016-03-111-1/+1
|
* Make select more sensible when dseleting access tokens, rename pusher ↵David Baker2016-03-111-5/+3
| | | | deletion to match access token deletion and make exception arg optional.
* Delete old, unused methods and rename new one to just be ↵David Baker2016-03-111-15/+2
| | | | `user_delete_access_tokens` with an `except_token_ids` argument doing what it says on the tin.
* Dear PyCharm, please indent sensibly for me. Thx.David Baker2016-03-111-1/+1
|
* Fix cache invalidation so deleting access tokens (which we did when changing ↵David Baker2016-03-111-8/+20
| | | | password) actually takes effect without HS restart. Reinstate the code to avoid logging out the session that changed the password, removed in 415c2f05491ce65a4fc34326519754cd1edd9c54
* Store appservice ID on registerDaniel Wagner-Hall2016-03-101-6/+34
|
* Load the current id in the IdGenerator constructorMark Haines2016-03-011-3/+3
| | | | | | | | | Rather than loading them lazily. This allows us to remove all the yield statements and spurious arguments for the get_next methods. It also allows us to replace all instances of get_next_txn with get_next since get_next no longer needs to access the db.
* Generate guest access token on 3pid invitesDaniel Wagner-Hall2016-02-241-0/+44
| | | | | | | | | This means that following the same link across multiple sessions or devices can re-use the same guest account. Note that this is somewhat of an abuse vector; we can't throw up captchas on this flow, so this is a way of registering ephemeral accounts for spam, whose sign-up we don't rate limit.
* Allocate guest user IDs numericcallyDaniel Wagner-Hall2016-02-051-0/+36
| | | | | | | | | The current random IDs are ugly and confusing when presented in UIs. This makes them prettier and easier to read. Also, disable non-automated registration of numeric IDs so that we don't need to worry so much about people carving out our automated address space and us needing to keep retrying ID registration.
* Add descriptionsErik Johnston2016-02-031-0/+1
|
* Make notifications go quickerErik Johnston2016-01-181-3/+23
|
* Postgres doesn't like booleansDavid Baker2016-01-111-2/+2
|
* This comma is actually importantDavid Baker2016-01-071-1/+1
|
* Adding is_guest here won't work because it just constructs a dict of uid -> ↵David Baker2016-01-061-1/+1
| | | | password hash
* Add is_guest flag to users db to track whether a user is a guest user or ↵David Baker2016-01-061-11/+29
| | | | not. Use this so we can run _filter_events_for_client when calculating event_push_actions.
* Allow guests to upgrade their accountsDaniel Wagner-Hall2016-01-051-7/+16
|
* Allow users to change which account a 3pid is bound toMark Haines2015-12-151-1/+1
|
* Allow guests to register and call /events?room_id=Daniel Wagner-Hall2015-11-041-7/+8
| | | | | | | This follows the same flows-based flow as regular registration, but as the only implemented flow has no requirements, it auto-succeeds. In the future, other flows (e.g. captcha) may be required, so clients should treat this like the regular registration flow choices.
* Add some docstringsDaniel Wagner-Hall2015-09-221-0/+1
|
* Implement configurable stats reportingDaniel Wagner-Hall2015-09-221-0/+12
| | | | | | | | | | SYN-287 This requires that HS owners either opt in or out of stats reporting. When --generate-config is passed, --report-stats must be specified If an already-generated config is used, and doesn't have the report_stats key, it is requested to be set.
* Merge erikj/user_dedup to developDaniel Wagner-Hall2015-08-261-0/+14
|
* Stop looking up "admin", which we never readDaniel Wagner-Hall2015-08-251-3/+2
|
* Remove completely unused concepts from codebaseDaniel Wagner-Hall2015-08-251-3/+2
| | | | | | | | | | 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/+62
| | | | | | | | 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-3/+3
| | | | We're about to have two kinds of token, access and refresh
* Merge pull request #221 from matrix-org/authDaniel Wagner-Hall2015-08-141-6/+6
|\ | | | | Simplify LoginHander and AuthHandler
| * Simplify LoginHander and AuthHandlerDaniel Wagner-Hall2015-08-121-6/+6
| | | | | | | | | | | | | | | | | | * Merge LoginHandler -> AuthHandler * Add a bunch of documentation * Improve some naming * Remove unused branches I will start merging the actual logic of the two handlers shortly
| * Change Cache to not use *args in its interfaceErik Johnston2015-08-071-1/+1
| |
* | Move all the caches into their own package, synapse.util.cachesErik Johnston2015-08-111-1/+2
| |
* | Change Cache to not use *args in its interfaceErik Johnston2015-08-071-1/+1
|/
* user_id now in user_threepidsDavid Baker2015-05-011-3/+3
|
* Don't use self.execute: it's designed for fetching stuffDavid Baker2015-05-011-3/+8
|
* No id field on userDavid Baker2015-05-011-5/+1
|
* More missed get_user_by_id API changesDavid Baker2015-05-011-3/+3
|
* Be more postgressiveDavid Baker2015-04-291-2/+2
|
* Merge branch 'develop' of github.com:matrix-org/synapse into postgresErik Johnston2015-04-281-8/+72
|\
| * pep8David Baker2015-04-171-1/+1
| |
| * Password reset, finally.David Baker2015-04-171-1/+15
| |
| * Add endpoint to get threepids from serverDavid Baker2015-04-171-0/+11
| |
| * pep8David Baker2015-04-171-1/+1
| |
| * make add3pid servlet workDavid Baker2015-04-171-0/+11
| |
| * 1) Pushers are now associated with an access tokenDavid Baker2015-03-241-1/+1
| | | | | | | | 2) Change places where we mean unauthenticated to 401, not 403, in C/S v2: hack so it stays as 403 in v1 because web client relies on it.
| * Make deleting other access tokens when you change your password actually workDavid Baker2015-03-241-5/+11
| |
| * Implement password changing (finally) along with a start on making ↵David Baker2015-03-231-4/+29
| | | | | | | | client/server auth more general.
* | Go back to storing JSON in TEXTErik Johnston2015-04-161-5/+0
| |
* | Add missing yield in storage funcErik Johnston2015-04-151-1/+1
| |
* | Handle the fact that in sqlite binary data might be stored as unicode or bytesErik Johnston2015-04-101-1/+3
| |
* | Use generic db exceptions rather than sqlite3 specific onesErik Johnston2015-04-081-3/+1
| |
* | PEP8Erik Johnston2015-04-071-1/+0
| |
* | Don't use AUTOINCREMENT, use an in memory versionErik Johnston2015-04-071-3/+7
| |
* | Make work in both Maria and SQLite. Fix testsErik Johnston2015-04-011-2/+6
| |
* | Fix unicode database supportErik Johnston2015-03-251-4/+14
| |
* | Merge branch 'develop' of github.com:matrix-org/synapse into mysqlErik Johnston2015-03-201-2/+9
|\|
| * Give sensible names for '_simple_...' transactionsErik Johnston2015-03-201-2/+7
| |
| * @cached() annotate get_user_by_token() - achieves a minor DB performance ↵Paul "LeoNerd" Evans2015-03-171-1/+6
| | | | | | | | improvement
* | Convert storage layer to be mysql compatibleErik Johnston2015-03-191-9/+5
|/
* Also give _execute() a descriptionPaul "LeoNerd" Evans2015-03-111-2/+1
|
* Extract the id token of the token when authing users, include the token and ↵Mark Haines2015-01-281-1/+2
| | | | device_id in the internal meta data for the event along with the transaction id when sending events
* Update copyright noticesMark Haines2015-01-061-1/+1
|
* Fix pep8 codestyle warningsMark Haines2014-11-201-7/+9
|
* Add an EventValidator. Fix bugs in auth ++ storageErik Johnston2014-11-101-1/+5
|
* Add transaction level logging and timing information. Add a _simple_delete ↵Erik Johnston2014-10-281-2/+5
| | | | method
* Update docstringErik Johnston2014-09-291-1/+2
|
* SYN-48: Implement WHOIS rest servletErik Johnston2014-09-291-11/+15
|
* Add auth check to test if a user is an admin or not.Erik Johnston2014-09-291-0/+8
|
* Add a .runInteraction() method on SQLBaseStore itself to wrap the .db_poolPaul "LeoNerd" Evans2014-09-121-2/+2
|
* fix the copyright holder from matrix.org to OpenMarket Ltd, as matrix.org ↵Matthew Hodgson2014-09-031-1/+1
| | | | hasn't been incorporated in time for launch.
* Be more helpful when failing to register/login, stating why (communication ↵Kegan Dougal2014-08-141-2/+2
| | | | error, user in user, wrong credentials, etc). Make the HS send M_USER_IN_USE.
* add in whitespace after copyright statements to improve legibilityMatthew Hodgson2014-08-131-0/+1
|
* Reference Matrix Home Servermatrix.org2014-08-121-0/+113