[google-appengine] Re: clientlogin on localhost

2009-04-08 Thread dubi . gregersen

Hi Jeff,

After trying some time, I realized that the when connecting to the
localhost - I don't need a valid token. I found this in(upload.py line
455):
http://code.google.com/p/soc/source/browse/tags/0-5-20090331/thirdparty/rietveld/upload.py

extra_headers={Cookie:
   'dev_appserver_login=%s:False' % email},

Also, this goes hand in hand with that fact that we can use whatever
login, when logging in to localhost from a browser.

Therefore I am thinking, it could be that when connecting to the
localhost, we just need to pass in a fake cookie - like the following:

// Code start
NSURL* url = [NSURL URLWithString:@http://localhost:9995;];

NSMutableURLRequest* request = [[NSMutableURLRequest alloc]
initWithURL:url];
 [request setHTTPMethod:@GET];
 [request setValue:@Cookie
forHTTPHeaderField:@dev_appserver_login=t...@example.com:False];

NSURLConnection *connectionResponse = [[NSURLConnection alloc]
initWithRequest:request delegate:self];
// Code end

I might neeed the cookie from:
- NSURL* cookieUrl = [NSURL URLWithString:[NSString
stringWithFormat:@%@/_ah/login?continue=%@/auth=%@, @def_url,
@def_url, strToken]];
But this don't even work with a valid token?


Thanks for your reply
Regards
Christian



On Apr 8, 2:54 am, Jeff S j...@google.com wrote:
 Hi!

 Sounds like a useful combination, and I'd need to know a bit more.
 When you are requesting the client login token, what are the
 parameters you are sending (minus email and password)? Also, when
 sending the token, what server are you making the request to, is it
 appengine.google.com, yourapp.appspot.com, or one of the Google Data
 APIs?

 Thank you,

 Jeff

 On Apr 6, 8:13 am, c_greger...@mac.com c_greger...@mac.com wrote:



  Hi there,

  Using Eclipse on GAE and debugging a clientlogin from an iPhone.

  I can login on the appspot server but when working on the local server
  with localhost I get the login screen and therefore not able to use
  clientlogin.

  appspot.com procedure
  1) get token
  2) get cookie
  3) call the method with token

  but on local host?

  Any idea?
  Thanks in advance!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: clientlogin on localhost

2009-04-07 Thread Jeff S

Hi!

Sounds like a useful combination, and I'd need to know a bit more.
When you are requesting the client login token, what are the
parameters you are sending (minus email and password)? Also, when
sending the token, what server are you making the request to, is it
appengine.google.com, yourapp.appspot.com, or one of the Google Data
APIs?

Thank you,

Jeff

On Apr 6, 8:13 am, c_greger...@mac.com c_greger...@mac.com wrote:
 Hi there,

 Using Eclipse on GAE and debugging a clientlogin from an iPhone.

 I can login on the appspot server but when working on the local server
 with localhost I get the login screen and therefore not able to use
 clientlogin.

 appspot.com procedure
 1) get token
 2) get cookie
 3) call the method with token

 but on local host?

 Any idea?
 Thanks in advance!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---