summary refs log tree commit diff
path: root/synapse/handlers/auth.py
diff options
context:
space:
mode:
authorDavid Baker <dbkr@users.noreply.github.com>2016-06-02 17:44:55 +0100
committerDavid Baker <dbkr@users.noreply.github.com>2016-06-02 17:44:55 +0100
commit6bb9aacf9d37831fe5c4cffa3583c5d2f917c2ae (patch)
treec0beb14f10d788212d85b1262f37797dfb88ffcd /synapse/handlers/auth.py
parentMerge pull request #820 from matrix-org/dbkr/email_notif_string_fmt_error (diff)
parentpeppate (diff)
downloadsynapse-6bb9aacf9d37831fe5c4cffa3583c5d2f917c2ae.tar.xz
Merge pull request #821 from matrix-org/dbkr/email_unsubscribe
Email unsubscribe links that don't require logging in
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)