summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/core
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2017-08-11 03:21:35 +0200
committerKali Kaneko <kali@leap.se>2017-08-11 14:21:58 -0400
commit4a7e29b6eae34f34016c9b409bd887c74b949ca4 (patch)
treea343c5de481f888c45c527401e13672ade0ab041 /src/leap/bitmask/core
parentd64f3c22c132c5de0d759d1e76ff7ced054bfcaa (diff)
[feature] add vpn list command
Diffstat (limited to 'src/leap/bitmask/core')
-rw-r--r--src/leap/bitmask/core/dispatcher.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/leap/bitmask/core/dispatcher.py b/src/leap/bitmask/core/dispatcher.py
index 3d6f6704..7a2d48a2 100644
--- a/src/leap/bitmask/core/dispatcher.py
+++ b/src/leap/bitmask/core/dispatcher.py
@@ -108,8 +108,7 @@ class UserCmd(SubCommand):
label = 'bonafide.user'
- @register_method("{'srp_token': unicode, 'uuid': unicode "
- "'lcl_token': unicode}")
+ @register_method("{'srp_token': unicode, 'uuid': unicode}")
def do_AUTHENTICATE(self, bonafide, *parts):
try:
user, password = parts[2], parts[3]
@@ -122,15 +121,8 @@ class UserCmd(SubCommand):
if parts[4] == 'True':
autoconf = True
- # FIXME We still SHOULD pass a local token
- # even if the SRP authentication times out!!!
- def add_local_token(result):
- result['lcl_token'] = bonafide.local_tokens.get(user)
- return result
-
d = defer.maybeDeferred(
bonafide.do_authenticate, user, password, autoconf)
- d.addCallback(add_local_token)
return d
@register_method("{'signup': 'ok', 'user': str}")
@@ -240,6 +232,11 @@ class VPNCmd(SubCommand):
d = vpn.do_uninstall()
return d
+ @register_method('dict')
+ def do_LIST(self, vpn, *parts):
+ d = vpn.do_list()
+ return d
+
class MailCmd(SubCommand):