(params)
| 40 | |
| 41 | # Lambda for handling login |
| 42 | def 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. |
no test coverage detected
searching dependent graphs…