diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2019-06-06 16:03:10 +0100 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2019-06-06 16:03:10 +0100 |
commit | 2796afc188d98f08e9a17b4511b7d33963ea6ed6 (patch) | |
tree | ab41e57c734802cc58c18c5ed581ce6bb8ca240f | |
parent | Make servlet clearer (diff) | |
download | synapse-2796afc188d98f08e9a17b4511b7d33963ea6ed6.tar.xz |
Fix checkers, remove debug logging
-rw-r--r-- | synapse/handlers/auth.py | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py index 8dda8a7fd9..dd7c667e47 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py @@ -383,19 +383,11 @@ class AuthHandler(BaseHandler): if checker is not None: # XXX: Temporary workaround for having Synapse handle password resets # See AuthHandler.check_auth for further details - if login_type == LoginType.EMAIL_IDENTITY: - res = yield checker( - authdict, - clientip=clientip, - password_servlet=password_servlet, - ) - elif login_type == LoginType.RECAPTCHA: - res = yield checker( - authdict, - clientip, - ) - else: - res = yield checker(authdict) + res = yield checker( + authdict, + clientip=clientip, + password_servlet=password_servlet, + ) defer.returnValue(res) # build a v1-login-style dict out of the authdict and fall back to the @@ -409,7 +401,7 @@ class AuthHandler(BaseHandler): defer.returnValue(canonical_id) @defer.inlineCallbacks - def _check_recaptcha(self, authdict, clientip): + def _check_recaptcha(self, authdict, clientip, **kwargs): try: user_response = authdict["response"] except KeyError: @@ -458,13 +450,13 @@ class AuthHandler(BaseHandler): def _check_email_identity(self, authdict, **kwargs): return self._check_threepid('email', authdict, **kwargs) - def _check_msisdn(self, authdict, _): + def _check_msisdn(self, authdict, **kwargs): return self._check_threepid('msisdn', authdict) - def _check_dummy_auth(self, authdict, _): + def _check_dummy_auth(self, authdict, **kwargs): return defer.succeed(True) - def _check_terms_auth(self, authdict, _): + def _check_terms_auth(self, authdict, **kwargs): return defer.succeed(True) @defer.inlineCallbacks @@ -484,9 +476,6 @@ class AuthHandler(BaseHandler): sid=threepid_creds["sid"], ) - logger.info("STUFF: %s", medium) - logger.info("ROW: %s", row) - threepid = { "medium": row["medium"], "address": row["address"], |