Looking at all the GAE Users documentation - it seems quite straight
forward to
authenticate a user using GAE User class. Using the code:

from google.appengine.api import users
user = users.get_current_user()
if user:
#user.email()
else:
#redirect to login: users.create_login_url()

If anyone has any ideas how you could map the users.get_current_user()
to the auth.id
then maybe we could use the web2py authorization methods using the
google account??

Looking at google docs you should not do this by saving the username
and nicname to the datastore
and then matching this to a auth.id as the user can change their
profile (email adress) and there
is no mechanism to track this so the web2py data and google account
data could become unsync.'

I am just thinking in words here to stimulate this topic, with more
experienced developers, as I would like to add this feature to my wiki
app, and it would not be easy to retrofit this kind of thing without
problems at a later stage.

chrism



On Mar 21, 2:58 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
> I'd love if somebody could port Auth to GAE.
>
> On Mar 20, 9:06 pm, Tito Garrido <titogarr...@gmail.com> wrote:
>
> > Yeah Joseph, something like that!
>
> > Thanks!
>
> > But, I'd like something more web2pythonic :D I think that we don't this
> > implemented yet...
>
> > Like
>
> > auth = Auth(GAE(), db)
>
> > I don't know... but here is an idea... :)
>
> > Regards,
>
> > Tito
>
> > On Fri, Mar 20, 2009 at 6:58 AM, Joseph Jude <ceph...@gmail.com> wrote:
>
> > > I'm assuming that you want to validate the user via google auth and
> > > then allow the authenticated user into your application. Sometime
> > > back, i did this for a desktop based application updating a
> > > application hosted in appengine (after authentication). I wrote abt it
> > > here:
> > >http://www.jjude.com/2008/09/18/authenticating-in-gae/
>
> > > At first I obtained the uid/pwd from the user and sent it via header
> > > to authenticate. By one of the comments from the user, I realized that
> > > it is not a safe manner. Later I let the google auth to validate the
> > > user and then allow the access accordingly. The code is also shared in
> > > google code. You can pick it up.
>
> > > Hope this helps.
>
> > > Joseph
>
> > > On Mar 20, 7:09 am, NguyendHEX <i...@dohoangnguyen.com> wrote:
> > > > You can use user class from google
>
> > > > from google.appengine.api import users
> > > > user = users.get_current_user()
> > > > if user:
> > > > #user.email()
> > > > else:
> > > > #redirect to login: users.create_login_url()
>
> > > > Hope this help
>
> > > > On Mar 20, 6:56 am, Tito Garrido <titogarr...@gmail.com> wrote:
>
> > > > > Is there a way to use Google Authentication + web2py on GAE?
>
> > > > > Regards,
>
> > > > > Tito
>
> > > > > --
> > > > > Linux User #387870
> > > > > .........____
> > > > > .... _/_õ|__|
> > > > > ..º[ .-.___.-._| . . . .
> > > > > .__( o)__( o).:_______
>
> > --
> > Linux User #387870
> > .........____
> > .... _/_õ|__|
> > ..º[ .-.___.-._| . . . .
> > .__( o)__( o).:_______
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to