diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 19:01:08 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 19:01:08 +0000 |
commit | 722d8eab5034806b347a17cd5c6a10a98feb35f9 (patch) | |
tree | 5f9ae56c70ae1a815a519e1f6de652560138da55 /remoting/tools | |
parent | c551e2fcd56d5c05305414d6384aa74a359e22df (diff) | |
download | chromium_src-722d8eab5034806b347a17cd5c6a10a98feb35f9.zip chromium_src-722d8eab5034806b347a17cd5c6a10a98feb35f9.tar.gz chromium_src-722d8eab5034806b347a17cd5c6a10a98feb35f9.tar.bz2 |
Token-based authentication for chromoting.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2749004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49298 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/tools')
-rwxr-xr-x | remoting/tools/gettoken.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/remoting/tools/gettoken.py b/remoting/tools/gettoken.py new file mode 100755 index 0000000..853d09b --- /dev/null +++ b/remoting/tools/gettoken.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python +# +# Copyright (c) 2010 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# +# gettoken.py can be used to get auth token from Gaia. It asks username and +# password and then prints token on the screen. + +import urllib +import getpass +url = "https://www.google.com:443/accounts/ClientLogin" + +print "Email:", +email = raw_input() + +passwd = getpass.getpass("Password: ") + +params = urllib.urlencode({'Email': email, 'Passwd': passwd, + 'source': 'chromoting', 'service': 'chromiumsync', + 'PersistentCookie': 'true', 'accountType': 'GOOGLE'}) +f = urllib.urlopen(url, params); +print f.read() |