summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/bonafide/service.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/bonafide/service.py')
-rw-r--r--src/leap/bitmask/bonafide/service.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/leap/bitmask/bonafide/service.py b/src/leap/bitmask/bonafide/service.py
index 5e3b0f1..797e606 100644
--- a/src/leap/bitmask/bonafide/service.py
+++ b/src/leap/bitmask/bonafide/service.py
@@ -103,6 +103,17 @@ class BonafideService(HookableService):
d.addCallback(lambda response: {'logout': 'ok'})
return d
+ def do_change_password(self, username, current_password, new_password):
+ def notify_passphrase_change(_):
+ data = dict(username=username, password=new_password)
+ self.trigger_hook('on_passphrase_change', **data)
+
+ d = self._bonafide.do_change_password(username, current_password,
+ new_password)
+ d.addCallback(notify_passphrase_change)
+ d.addCallback(lambda _: {'update': 'ok'})
+ return d
+
def do_provider_create(self, domain):
return self._bonafide.do_get_provider(domain, autoconf=True)