Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# This file is part of Xpra. 

2# Copyright (C) 2019 Antoine Martin <antoine@xpra.org> 

3# Xpra is released under the terms of the GNU GPL v2, or, at your option, any 

4# later version. See the file COPYING for details. 

5 

6from xpra.util import std 

7from xpra.os_util import bytestostr 

8 

9 

10class Handler: 

11 

12 def __init__(self, client, **_kwargs): 

13 self.client = client 

14 

15 def __repr__(self): 

16 return "prompt" 

17 

18 def get_digest(self) -> str: 

19 return None 

20 

21 def handle(self, packet) -> bool: 

22 prompt = "password" 

23 digest = bytestostr(packet[3]) 

24 if digest.startswith("gss:") or digest.startswith("kerberos:"): 

25 prompt = "%s token" % (digest.split(":", 1)[0]) 

26 if len(packet)>=6: 

27 prompt = std(bytestostr(packet[5])) 

28 return self.client.do_process_challenge_prompt(packet, prompt)