GAE Google Account authentication for access by external server

43 views
Skip to first unread message

b0b

unread,
Aug 28, 2011, 3:18:32 AM8/28/11
to google-a...@googlegroups.com
HI,


I have a separate web server running Java servlets that I want to be able to make authenticated request to my GAE app, using regular Google acount authentication.

My problem is that I need  this web server to retrieve the auth token that allows to login to GAE and have subsequent requests authentified.
There's no problem doing that if the user enters is Google account l/p on the separate web server using a form. For example like documented here:
using the ClientLogin API: http://krasserm.blogspot.com/2010/01/accessing-security-enabled-google-app.html

However I want to avoid having doing that and instead have the user grant access to his Google account using the standard Google page (the one that is displayed with UserServiceFactory.getUserService().createLoginURL() on GAE). In short I'd like to have the same functionality that the createLoginURL() GAE API but triggered from my separate web server, to get the required auth token necessary for the server to do requests to the GAE app.
From what I tried, this doesnt seem possible. The Google page whose URL is returned by createLoginURL() works only if the request comes from a GAE app.

So my question is if it is possible for an external web server to redirect a user to a page for granting access this web server to make authentified request to GAE? Or will I have to directly ask the user for is Google account credentials ? Does OAuth allow such functionality ?

Robert Kluin

unread,
Sep 9, 2011, 2:12:44 AM9/9/11
to google-a...@googlegroups.com
Hi,
OAuth is meant to solve exactly this type of problem.
http://code.google.com/appengine/docs/python/oauth/overview.html

Robert

> --
> 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/-/hXoraM1_VZwJ.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengi...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

Reply all
Reply to author
Forward
0 new messages