summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2016-11-30 17:40:18 +0000
committerRichard van der Hoff <richard@matrix.org>2016-11-30 17:40:18 +0000
commitaa09d6b8f0a8f3f006f08b8816b3f2a0fe7eb167 (patch)
tree2b63610291843d6b24c9baa44cb6f18e163357b3 /synapse/handlers
parentMerge branch 'develop' into rav/no_more_refresh_tokens (diff)
downloadsynapse-aa09d6b8f0a8f3f006f08b8816b3f2a0fe7eb167.tar.xz
Rip out more refresh_token code
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.
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/auth.py10
1 files changed, 0 insertions, 10 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py
index 91e7e725b9..9d8e6f19bc 100644
--- a/synapse/handlers/auth.py
+++ b/synapse/handlers/auth.py
@@ -539,16 +539,6 @@ class AuthHandler(BaseHandler):
             macaroon.add_first_party_caveat(caveat)
         return macaroon.serialize()
 
-    def generate_refresh_token(self, user_id):
-        m = self._generate_base_macaroon(user_id)
-        m.add_first_party_caveat("type = refresh")
-        # Important to add a nonce, because otherwise every refresh token for a
-        # user will be the same.
-        m.add_first_party_caveat("nonce = %s" % (
-            stringutils.random_string_with_symbols(16),
-        ))
-        return m.serialize()
-
     def generate_short_term_login_token(self, user_id, duration_in_ms=(2 * 60 * 1000)):
         macaroon = self._generate_base_macaroon(user_id)
         macaroon.add_first_party_caveat("type = login")