[google-appengine] OAuth Refuses to Authenticate Me

2010-06-16 Thread Paddy Foran
I'm working on an application that interfaces between App Engine, a
Chrome Extension, and Android. I've managed to get the Chrome
extension authenticating fine through OAuth (oddly, without ever using
the App Engine OAuth library...? It just detected
users.get_current_user()) but the Android client is giving me some
trouble. I'm using Apache's HttpPost to send the request, and SignPost
to sign it.

My request is as follows: "POST /links/add?
oauth_signature=VPt6v7SEJ0xGv7TDLjPe5vtoc7E%3D&oauth_token=1%2Fu0QvC-
RMgDC9lq3B3PjFHjBZZ39colyxwj9q96qm--
o&oauth_consumer_key=anonymous&oauth_signature_method=HMAC-
SHA1&oauth_timestamp=1276711674&oauth_nonce=-5410272903654758759 HTTP/
1.1" with a single key/value pair attached.

I keep receiving:

"Traceback (most recent call last):
  File "/base/python_runtime/python_lib/versions/1/google/appengine/
ext/webapp/__init__.py", line 513, in __call__
handler.post(*groups)
  File "/base/data/home/apps/android2cloud/1.342714137082534334/
main.py", line 44, in post
elif oauth.get_current_user():
  File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/oauth/oauth_api.py", line 86, in get_current_user
_maybe_call_get_oauth_user()
  File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/oauth/oauth_api.py", line 152, in _maybe_call_get_oauth_user
_maybe_raise_exception()
  File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/oauth/oauth_api.py", line 167, in _maybe_raise_exception
raise InvalidOAuthParametersError
InvalidOAuthParametersError"

Is this trying to tell me that my signature and token do not match, or
am I doing something else wrong? The request is virtually identical to
the Chrome extension that is working, so I can't figure out what the
issue could be.

Thanks,
Paddy Foran

-- 
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-appeng...@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] OAuth and Android

2010-09-06 Thread Paddy Foran
Hello, all.

I'm the developer behind the android2cloud project. I'm using Signpost
to connect via OAuth to Google App Engine, running on Python.

A single user has reported a weird OAuthExpectationFailed error.
What's weird about it is that it only appears when they're operating
on 3G-- not on WiFi. I've spoofed their account (with their express
permission) and haven't been able to reproduce the issue.

Can anyone give me more information on the OAuthExpectationFailed
exception? Is there any way to determine what was expected, what was
received, and how they differ?

Any information or help on this would be awesome. I've also put in a
request with the Signpost development group, and will be contacting
Orange, the carrier of the user, but any information is more than I
have right now. I'm stumped.

If anyone's curious, the history is here: 
http://code.google.com/p/android2cloud/issues/detail?id=31

Thanks,
Paddy Foran

-- 
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-appeng...@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] OAuth Refuses to Function for Non-HTTP(S) Callback URLs

2011-07-18 Thread Paddy Foran
I'm working on connecting my Android application to an App Engine server 
with the built-in OAuth provider for Python. I'm trying to set a callback 
for myappname://insert.host.here/oauth/callback, but every time I make a 
request, I authorise the token and instead of being redirected am given a 
message: Invalid Callback URL.

It looks like most OAuth providers don't currently restrict you to 
http/https in callbacks (possibly for this very reason). Every http/https 
request I make works, just the custom callback ones have an issue.

Is the App Engine OAuth provider limited to a certain subset of protocols 
for callbacks? Is there any way to get a list of the allowed callbacks or, 
preferably, get the limitation lifted? Android and App Engine provide an 
amazing platform together, but if the OAuth flow is hobbled (e.g, making us 
use OOB, which isn't very user-friendly), it makes things a bit more 
difficult.

Thanks,
Paddy

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/B-J8f70lSOoJ.
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: Should I take my website somewhere else? - blocked in China

2009-04-06 Thread Paddy Foran

I'd just like to point out how funny it is that people keep banging on
for Google to respond, and in their banging on for Google to respond,
they missed Google's actual response.

>> Is there any google staff who is responsible for GAE promotion and
>> technology to say something here?
>
>> How can I access to my Google Apps via my own domain directly, e.g.
>> how can access via mail.my_domain.com instead of mail.google.com/a/
>> my_domain.com?
>
>One way to address this is to run a proxy server elsewhere, which will
>allow your site to have it's own unique IP, rather than the shared IPs
>of Google.
>
>-Brett
>App Engine Team

Please note the "App Engine Team" signature. That means Brett (at
least claims he) is from Google.

Poor Brett was ignored, as people clamoured for Brett to comment.

This is why I love the internet. It amuses me to no end.

On Apr 6, 12:48 am, Andy Freeman  wrote:
> > No company is willing to be a pawn in the game of politics between
> > Google and China.
>
> That sounds reasonable, but what can Google do to stop the Chinese
> govt from blocking?
>
> (1) Google can't tell the Chinese govt what to do.
>
> (2) The Chinese govt appears to be technically competent and controls
> the relevant connections, both from the outside and from internal
> datacenters.
>
> (3) Google can propose agreements, but China is a soverign entity and
> and can do what it pleases wrt internal matters.  (Other posters have
> suggested that buying dinner for the appropriate official would cause
> the blocking to go away.  I don't see why the Chinese govt would find
> such an agreement binding.)
>
> Yes, one can argue that Google "needs" the Chinese govt to not block,
> but that doesn't imply that Google can do anything to stop the Chinese
> govt from blocking.  Google's needs do not obligate the Chinese govt.
>
> On Apr 5, 3:16 pm, WallyDD  wrote:
>
> > Google is more or less obligated to solve this issue.
>
> > No company is willing to be a pawn in the game of politics between
> > Google and China.
> > Name a single company (that has any international presence) who would
> > be willing to use GAE knowing full well that it is blocked in its
> > current form?
> > This issue has nothing to do with the Chinese government and there is
> > no way Google will point the finger at them.
>
> > Perhaps google can also take on all the other countries that are
> > blocking GAE and while they are at it they can point fingers at
> > corporate america and their firewalls?
> > You have to remember that at the moment this is a "preview release".
>
> > I don't really understand why you persist with this argument. You have
> > raised some valid points which should be looked at and considered in
> > the scheme of things but most of the diatribe you present here seems
> > aimed at China/Chinese Government. I have always found prejudices
> > cloud peoples judgement.
>
> > To sumarise how this problem will probably be viewed;
> > Google created a dns based system (for GAE addressing) which puts
> > everything though ghs.google.com. This system works really well and
> > from my experience it was very clever and efficient. However it has an
> > issue with firewalls that got overlooked. Google has just recently
> > been made aware of this problem.
>
> > On Apr 5, 12:53 pm, Andy Freeman  wrote:
>
> > > > Feel free to hair-split the word "obligation".
>
> > > It's the plain meaning of the word.  I apologise for not knowing that
> > > you didn't know what it meant when you wrote that Google had an
> > > obligation to make GAE available in China.  Are there other statements
> > > that you made without understanding their meaning?
>
> > > China availability issue is one of the few issues where folks claim
> > > that/act like Google has an obligation even though it's an issue where
> > > Google has very little capability to change things.
>
> > > > That's why I want to hear from a Google representative on their plan.
>
> > > I predict that if Google says anything, it will be roughly equivalent
> > > to "we're doing what we can".  At that point, you'll have to decide if
> > > the results, which will vary with the whim of the Chinese govt, are
> > > adequate for your purposes.
>
> > > Of course, if you're better at dealing with the Chinese govt than
> > > Google is
>
> > > > Now just accept that fact and act accordingly.
>
> > > And the basis for this order is...
>
> > > On Apr 4, 6:11 pm, Andy  wrote:
>
> > > > > I'm someone who understands that obligations come from laws and
> > > > > contracts.  Feel free to point to the relevant chapter and verse that
>
> > > > > However, absent a contract and/or a law, Google isn't obligated to
> > > > > make GAE applications visible in China.
>
> > > > Feel free to hair-split the word "obligation".
>
> > > > Does Google have the legal obligation to solve this problem? No. Just
> > > > like Google doesn't have any legal obligation to improve this service
> > > > or add any new features. Does that me

[google-appengine] ReferenceProperty performance question

2009-06-22 Thread Paddy Foran

Suppose I have the following database:

class Model1(db.Model):
  att1 = db.IntegerProperty()

class Model2(db.Model):
  model1 = db.ReferenceProperty(Model1, collection_name='model2s')
  string = db.StringProperty()

Suppose I create a few Model1s and several Model2s, then have the
following code:

model1s = Model1.all()
for model1 in model1s:
  for model2 in model1.model2s:
self.response.out.write(model2.string)

Does model1.model2s cause a query to be run? I would imagine so. Is
this query run every time I ask for model1.model2s, or is it
automatically cached?

Any information on this would be helpful.

Thanks,
Paddy Foran

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---