From 4a7e29b6eae34f34016c9b409bd887c74b949ca4 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Fri, 11 Aug 2017 03:21:35 +0200 Subject: [feature] add vpn list command --- src/leap/bitmask/core/dispatcher.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/leap/bitmask/core') diff --git a/src/leap/bitmask/core/dispatcher.py b/src/leap/bitmask/core/dispatcher.py index 3d6f670..7a2d48a 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): -- cgit v1.2.3