summary refs log tree commit diff
path: root/synapse/handlers/auth.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-06-02 11:44:15 +0100
committerDavid Baker <dave@matrix.org>2016-06-02 11:44:15 +0100
commita15ad608496fd29fb8bf289152c23adca822beca (patch)
tree6212e5db2f0c45a3c9bca6e15a882d4366f4cfc6 /synapse/handlers/auth.py
parentWIP on unsubscribing email notifs without logging in (diff)
downloadsynapse-a15ad608496fd29fb8bf289152c23adca822beca.tar.xz
Email unsubscribing that may in theory, work
Were it not for that fact that you can't use the base handler in the pusher because it pulls in the world. Comitting while I fix that on a different branch.
Diffstat (limited to 'synapse/handlers/auth.py')
-rw-r--r--synapse/handlers/auth.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py
index 26c865e171..200793b5ed 100644
--- a/synapse/handlers/auth.py
+++ b/synapse/handlers/auth.py
@@ -529,6 +529,11 @@ class AuthHandler(BaseHandler):
         macaroon.add_first_party_caveat("time < %d" % (expiry,))
         return macaroon.serialize()
 
+    def generate_delete_pusher_token(self, user_id):
+        macaroon = self._generate_base_macaroon(user_id)
+        macaroon.add_first_party_caveat("type = delete_pusher")
+        return macaroon.serialize()
+
     def validate_short_term_login_token_and_get_user_id(self, login_token):
         try:
             macaroon = pymacaroons.Macaroon.deserialize(login_token)