diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 21:41:05 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 21:41:05 +0000 |
commit | d409efc2563bf8b647dac1af324c26778809985c (patch) | |
tree | 934a8893c98e12696344693d7b56151e8273e8b5 /remoting/tools | |
parent | f00acccb2ede3c82c0fda8de0db0d42f2f29a54c (diff) | |
download | chromium_src-d409efc2563bf8b647dac1af324c26778809985c.zip chromium_src-d409efc2563bf8b647dac1af324c26778809985c.tar.gz chromium_src-d409efc2563bf8b647dac1af324c26778809985c.tar.bz2 |
Token-based authentication for chromoting.
BUG=none
TEST=none
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=49298
Review URL: http://codereview.chromium.org/2749004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49326 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() |