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

Function save_cookie

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

Source from the content-addressed store, hash-verified

57
58# Save cookie to file after successful login.
59def save_cookie(params):
60 if params == None:
61 return
62
63 try:
64 cookie = open('.tn-cli-cookie', 'w')
65 json.dump(handle_login(params), cookie)
66 cookie.close()
67 except Exception as err:
68 stdoutln("Failed to save authentication cookie", err)
69
70
71# Read cookie file for logging in with the cookie.

Callers 1

loginMsgFunction · 0.90

Calls 3

stdoutlnFunction · 0.90
handle_loginFunction · 0.85
dumpMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…