OAuth integration issue with Google Apps

37 views
Skip to first unread message

Jean-Lou Dupont

unread,
Aug 28, 2010, 6:47:44 AM8/28/10
to Google App Engine
I am having trouble accessing "protected resources" through OAuth.

I have an AppEngine application (services-systemical) registered
through my Google Apps domain (systemical.com), a CNAME pointing to my
application ("services.systemical.com" , working perfectly with my
other non-Oauth services).

I have registered my application and got the "consumer key" and
"consumer secret" for "services.systemical.com".

With my desktop client application (I am using Leah Culver's oauth
v1.0a python library on the client side): I am able to get a "request
token", have the user "authorize" the application, upgrade the token
to an "access token" (with the verification code).

Now the issue is: when I make an OAuth HTTP POST (body containing the
request data) AppEngine always raises an "oauth.OAuthRequestError". I
am not doing anything fancy for starters:


class EndPoint(webapp.RequestHandler):
def post(self, fragment):
body=self.request.body
headers=self.request.headers
try:
user = oauth.get_current_user()
logging.info("EndPoint.post: fragment(%s) data=%s" %
(fragment, body))
except oauth.OAuthRequestError, e:
logging.info("EndPoint.post: headers: %s" % headers)
logging.info("EndPoint.post: body: %s" % body)

What step could I be missing? Any help would be greatly appreciated!
Thanks a million!


Jean-Lou Dupont

unread,
Aug 30, 2010, 9:16:26 PM8/30/10
to Google App Engine
bump.

Is it normal to see " {'Content-Length': '280', 'X-Appengine-Default-
Namespace': 'systemical.com', 'User-Agent':
'musync,gzip(gfe),gzip(gfe)', 'Host': 'services.systemical.com', 'X-
Google-Apps-Metadata': 'domain=systemical.com', 'X-Zoo': 'app-
id=services-systemical,domain=systemical.com', 'Content-Type':
'application/x-www-form-urlencoded'} " with 'X-Google-Apps-Metadata'
with a different domain name than the one I am making a call to,
namely " services.systemical.com " ?

Please help! I have been stuck on this for hours!

Vladimir Prudnikov

unread,
Oct 25, 2010, 11:47:21 AM10/25/10
to Google App Engine

On Aug 28, 12:47 pm, Jean-Lou Dupont <jeanlou.dup...@gmail.com> wrote:
>
> With my desktop client application (I am using Leah Culver'soauth
> v1.0a python library on the client side): I am able to get a "request
> token", have the user "authorize" the application, upgrade the token
> to an "access token" (with the verification code).
>

Hello,
I can't get even this working. Can you share your code for a client?
I'd be very grateful.
Did you get it working finally?
Reply all
Reply to author
Forward
0 new messages