views:

108

answers:

2

i used pinax,the user who login my site use openid is successful now , i only want to get the username and email when they return .

the google openid url is :https://www.google.com/accounts/o8/id

and yahoo openid url is :http://yahoo.com/

how can i get it .

thanks

+1  A: 

Use http://code.google.com/p/django-openid/ (documentation available at http://django-openid.googlecode.com/svn/trunk/openid.html)

kb
i already use pinax that contains django-openid
zjm1126
first of all, the code in that repository is _ancient_. The new code is at http://github.com/simonw/django-openid. Second of all, django-openid doesn't support Attribute Exchange, which is the only way to get registration data (only the email address) back from Google.
piquadrat
+1 @piquadrat duly noted.
kb
+1  A: 

There are two main methods to do this. One is using the "simple registration" (sreg) extension of OpenID. This seems like the easiest way, and while it worked when using myopenid.net as my endpoint, but I couldn't get it to work with Google.

The second method is by using the "attribute exchange" (ax) extension. I was able to get it working using Authkit under Pylons with a bit of tweaking. I'm sure you can do the same with Django. I would recommend that you start with the Google docs regarding their AX support: http://code.google.com/apis/accounts/docs/OpenID.html

jamieb