Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>appcfg.py, the tool that uploads data to App Engine has to do exactly this to authenticate itself with the App Engine server. The relevant functionality is abstracted into appengine_rpc.py. In a nutshell, the solution is:</p> <ol> <li>Use the <a href="http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html" rel="noreferrer">Google ClientLogin API</a> to obtain an authentication token. appengine_rpc.py does this in <a href="http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/tools/appengine_rpc.py#180" rel="noreferrer">_GetAuthToken</a></li> <li>Send the auth token to a special URL on your App Engine app. That page then returns a cookie and a 302 redirect. Ignore the redirect and store the cookie. appcfg.py does this in <a href="http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/tools/appengine_rpc.py#228" rel="noreferrer">_GetAuthCookie</a></li> <li>Use the returned cookie in all future requests.</li> </ol> <p>You may also want to look at <a href="http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/tools/appengine_rpc.py#253" rel="noreferrer">_Authenticate</a>, to see how appcfg handles the various return codes from ClientLogin, and <a href="http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/tools/appengine_rpc.py#397" rel="noreferrer">_GetOpener</a>, to see how appcfg creates a urllib2 OpenerDirector that doesn't follow HTTP redirects. Or you could, in fact, just use the AbstractRpcServer and HttpRpcServer classes wholesale, since they do pretty much everything you need.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload