Finally got it. 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. The OpenID plugin for Authkit contains a patch written by PJ Kershaw that adds ax support. However, it's pretty much undocumented. So a combination of studying the code, trial-and-error, and googling finally made it happen: The relevant part of my development.ini file: authkit.setup.enable = true authkit.setup.method = openid, cookie authkit.openid.store.baseurl = http://localhost authkit.openid.store.type = file authkit.openid.store.config = authkit.openid.ax.typeuri.email = http://axschema.org/contact/email authkit.openid.ax.alias.email = email authkit.openid.ax.required.email = true authkit.openid.charset = UTF-8 authkit.openid.path.signedin = /auth/signin authkit.cookie.signoutpath = /auth/signout authkit.cookie.secret = somesecret To access the user's email address from within a controller, I use: exec ("user_data=" + request.environ['REMOTE_USER_DATA']) email = user_data['ax']['value.email.1'] Hopefully this saves at least one other person a few hours. On Jan 16, 2:17 am, Jamie <[email protected]> wrote: > I've spent the past couple of days learning about OpenID and my brain > hurts. My goal is to allow users to sign into my app using a Google > account. I've gotten OpenID and Authkit to play nicely, but I'd like > to be able to retrieve the user's email address so I can use it for > authorization purposes. > > There's some info here (http://code.google.com/apis/accounts/docs/ > OpenID.html#endpoint) about using an attribute exchange extension > named "openid.ax.type.email". However, I have no idea what this means > or whether this is doable with Authkit? Any ideas?
-- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
