MCPcopy
hub / github.com/tinode/chat / handle_login

Function handle_login

tn-cli/client.py:42–55  ·  view source on GitHub ↗
(params)

Source from the content-addressed store, hash-verified

40
41# Lambda for handling login
42def handle_login(params):
43 if params == None:
44 return None
45
46 # Protobuf map 'params' is a map which is not a python object or a dictionary. Convert it.
47 nice = {}
48 for p in params:
49 nice[p] = json.loads(params[p])
50
51 stdoutln("Authenticated as", nice.get('user'))
52
53 tn_globals.AuthToken = nice.get('token')
54
55 return nice
56
57
58# Save cookie to file after successful login.

Callers 2

loginMsgFunction · 0.90
save_cookieFunction · 0.85

Calls 2

stdoutlnFunction · 0.90
getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…