def store_token(mx_id, token):
 AUTH_TOKENS[mx_id] = token
 with open(SESSION_FILE, 'w') as handle:
  handle.write(json.dumps(AUTH_TOKENS))

def store_token ( mx_id , token ) : AUTH_TOKENS [ mx_id ] = token with open ( SESSION_FILE , 'w' ) as handle : handle . write ( json . dumps ( AUTH_TOKENS ) )
store authentication token to session and persistent storage .