summary refs log tree commit diff
path: root/synapse/handlers/auth.py
diff options
context:
space:
mode:
authorNeil Johnson <neil@fragile.org.uk>2018-08-03 22:29:03 +0100
committerNeil Johnson <neil@fragile.org.uk>2018-08-03 22:29:03 +0100
commit886be75ad1bc60e016611b453b9644e8db17a9f1 (patch)
treee9989d64ec1c4af92ffdd00c6651145510aafbbe /synapse/handlers/auth.py
parentwip commit - tests failing (diff)
downloadsynapse-886be75ad1bc60e016611b453b9644e8db17a9f1.tar.xz
bug fixes
Diffstat (limited to 'synapse/handlers/auth.py')
-rw-r--r--synapse/handlers/auth.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py
index 8f9cff92e8..7ea8ce9f94 100644
--- a/synapse/handlers/auth.py
+++ b/synapse/handlers/auth.py
@@ -520,7 +520,7 @@ class AuthHandler(BaseHandler):
         """
         logger.info("Logging in user %s on device %s", user_id, device_id)
         access_token = yield self.issue_access_token(user_id, device_id)
-        yield self._check_mau_limits()
+        yield self.auth.check_auth_blocking()
 
         # the device *should* have been registered before we got here; however,
         # it's possible we raced against a DELETE operation. The thing we
@@ -734,7 +734,7 @@ class AuthHandler(BaseHandler):
 
     @defer.inlineCallbacks
     def validate_short_term_login_token_and_get_user_id(self, login_token):
-        yield self._check_mau_limits()
+        yield self.auth.check_auth_blocking()
         auth_api = self.hs.get_auth()
         user_id = None
         try:
@@ -907,17 +907,6 @@ class AuthHandler(BaseHandler):
         else:
             return defer.succeed(False)
 
-    @defer.inlineCallbacks
-    def _check_mau_limits(self):
-        """
-        Ensure that if mau blocking is enabled that invalid users cannot
-        log in.
-        """
-        error = AuthError(
-            403, "Monthly Active User limits exceeded", errcode=Codes.MAU_LIMIT_EXCEEDED
-        )
-        yield self.auth.check_auth_blocking(error)
-
 
 @attr.s
 class MacaroonGenerator(object):