synapse-product/synapse
Andrew Morgan 2c2e649be2
Move and refactor LoginRestServlet helper methods (#8182)
This is split out from https://github.com/matrix-org/synapse/pull/7438, which had gotten rather large.

`LoginRestServlet` has a couple helper methods, `login_submission_legacy_convert` and `login_id_thirdparty_from_phone`. They're primarily used for converting legacy user login submissions to "identifier" dicts ([see spec](https://matrix.org/docs/spec/client_server/r0.6.1#post-matrix-client-r0-login)). Identifying information such as usernames or 3PID information used to be top-level in the login body. They're now supposed to be put inside an [identifier](https://matrix.org/docs/spec/client_server/r0.6.1#identifier-types) parameter instead.

#7438's purpose is to allow using the new identifier parameter during User-Interactive Authentication, which is currently handled in AuthHandler. That's why I've moved these helper methods there. I also moved the refactoring of these method from #7438 as they're relevant.
2020-08-28 09:58:17 +01:00
..
_scripts Replace all remaining six usage with native Python 3 equivalents (#7704) 2020-06-16 08:51:47 -04:00
api Do not apply ratelimiting on joins to appservices (#8139) 2020-08-24 14:53:53 +01:00
app Change HomeServer definition to work with typing. 2020-08-11 18:00:17 +01:00
appservice Convert the SimpleHttpClient to async. (#8016) 2020-08-04 07:22:04 -04:00
config Allow capping a room's retention policy (#8104) 2020-08-24 18:21:04 +01:00
crypto Do not assume calls to runInteraction return Deferreds. (#8133) 2020-08-20 06:39:55 -04:00
events Allow capping a room's retention policy (#8104) 2020-08-24 18:21:04 +01:00
federation Convert calls of async database methods to async (#8166) 2020-08-27 13:38:41 -04:00
groups Convert groups and visibility code to async / await. (#7951) 2020-07-27 12:32:08 -04:00
handlers Move and refactor LoginRestServlet helper methods (#8182) 2020-08-28 09:58:17 +01:00
http Switch the JSON byte producer from a pull to a push producer. (#8116) 2020-08-19 08:07:57 -04:00
logging Use the JSON encoder without whitespace in more places. (#8124) 2020-08-20 10:32:33 -04:00
metrics Convert runWithConnection to async. (#8121) 2020-08-19 07:09:24 -04:00
module_api Do not assume calls to runInteraction return Deferreds. (#8133) 2020-08-20 06:39:55 -04:00
push Use the default templates when a custom template file cannot be found (#8037) 2020-08-17 17:05:00 +01:00
replication Make SlavedIdTracker.advance have same interface as MultiWriterIDGenerator (#8171) 2020-08-26 13:15:20 +01:00
res/templates Implement login blocking based on SAML attributes (#8052) 2020-08-11 16:08:10 +01:00
rest Move and refactor LoginRestServlet helper methods (#8182) 2020-08-28 09:58:17 +01:00
server_notices Fix some comments and types in service notices (#7996) 2020-07-31 16:22:06 -04:00
spam_checker_api Allow denying or shadow banning registrations via the spam checker (#8034) 2020-08-20 15:42:58 -04:00
state Add type hints for state. (#8140) 2020-08-24 14:25:27 -04:00
static Clean-up the fallback login code. (#7657) 2020-06-10 09:50:39 -04:00
storage Convert stats and related calls to async/await (#8192) 2020-08-27 17:24:37 -04:00
streams Remove ChainedIdGenerator. (#8123) 2020-08-19 13:41:51 +01:00
util Be stricter about JSON that is accepted by Synapse (#8106) 2020-08-19 07:26:03 -04:00
__init__.py 1.19.1 2020-08-27 10:50:39 +01:00
event_auth.py Convert events worker database to async/await. (#8071) 2020-08-18 16:20:49 -04:00
notifier.py Fix typing for notifier (#8064) 2020-08-12 14:03:08 +01:00
python_dependencies.py Iteratively encode JSON responses to avoid blocking the reactor. (#8013) 2020-08-18 08:49:59 -04:00
secrets.py Change HomeServer definition to work with typing. 2020-08-11 18:00:17 +01:00
server.py Add comment explaining cast 2020-08-11 22:01:12 +01:00
types.py Add a shadow-banned flag to users. (#8092) 2020-08-14 12:37:59 -04:00
visibility.py Convert groups and visibility code to async / await. (#7951) 2020-07-27 12:32:08 -04:00