Note that there are some explanatory texts on larger screens.

plurals
  1. PODjango & google openid authentication (openid.ax) with socialauth
    primarykey
    data
    text
    <p>I am trying to use django-socialauth (<a href="http://github.com/uswaretech/Django-Socialauth" rel="nofollow noreferrer">http://github.com/uswaretech/Django-Socialauth</a>) for authenticating users for my django project. </p> <p>This is firs time working with openid and i've had to figure out how exactly this open id works. I have more or less understood it, by now, but there are few things that elude me. </p> <p>The authentication process starts when the request is put together in in django-socialauth.openid_consumer.views.begin. I can see that the outgoing authentication request is more or less something like this:</p> <pre><code>https://www.google.com/accounts/o8/ud?openid.assoc_handle=AOQobUckRThPUj3K1byG280Aze-dnfc9Iu6AEYaBwvHE11G0zy8kY8GZ&amp; openid.ax.if_available=fname&amp; openid.ax.mode=fetch_request&amp; openid.ax.required=email&amp; openid.ax.type.email=http://axschema.org/contact/email&amp; openid.ax.type.fname=http://example.com/schema/fullname&amp; openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&amp; openid.identity=http://specs.openid.net/auth/2.0/identifier_select&amp; openid.mode=checkid_setup&amp;openid.ns=http://specs.openid.net/auth/2.0&amp; openid.ns.ax=http://openid.net/srv/ax/1.0&amp; openid.ns.sreg=http://openid.net/extensions/sreg/1.1&amp; openid.realm=http://localhost/&amp; openid.return_to=http://localhost/social/gmail_login/complete/?janrain_nonce=2010-03-20T11%3A19%3A44ZPZCjNc&amp;openid.sreg.optional=postcode,country,nickname,email </code></pre> <p>This is lot like 2nd example here: <a href="http://code.google.com/apis/accounts/docs/OpenID.html#Samples" rel="nofollow noreferrer">http://code.google.com/apis/accounts/docs/OpenID.html#Samples</a></p> <p>The problem is, that the request, i get back, is nothing like the corresponding example from code.google.com (look at the 3rd example in example responses. Response dict i get is like this:</p> <pre><code>{ 'openid.op_endpoint': 'https://www.google.com/accounts/o8/ud', 'openid.sig': 'QWMa4x4ruMUvSCfLwKV6CZRuo0E=', 'openid.ext1.type.email': 'http://axschema.org/contact/email', 'openid.return_to': 'http://localhost/social/gmail_login/complete/?janrain_nonce=2010-03-20T17%3A54%3A06ZHV4cqh', 'janrain_nonce': '2010-03-20T17:54:06ZHV4cqh', 'openid.response_nonce': '2010-03-20T17:54:06ZdC5mMu9M_6O4pw', 'openid.claimed_id': 'https://www.google.com/accounts/o8/id?id=AItOghawkFz0aNzk91vaQWhD-DxRJo6sS09RwM3SE', 'openid.mode': 'id_res', 'openid.ns.ext1': 'http://openid.net/srv/ax/1.0', 'openid.signed': 'op_endpoint,claimed_id,identity,return_to,response_nonce,assoc_handle,ns.ext1,ext1.mode,ext1.type.email,ext1.value.email', 'openid.ext1.value.email': 'my.emailaddress@gmail.com', 'openid.assoc_handle': 'AOQobUfssTJ2IxRlxrIvU4Xg8HHQKKTEuqwGxvwwuPR5rNvag0elGlYL', 'openid.ns': 'http://specs.openid.net/auth/2.0', 'openid.identity': 'https://www.google.com/accounts/o8/id?id=AItOawkghgfhf1FkvaQWhD-DxRJo6sS09RwMKjASE', 'openid.ext1.mode': 'fetch_response'} </code></pre> <p>The socialauth itself has been built to accept my email address this way:</p> <pre><code> elif request.openid and request.openid.ax: email = request.openid.ax.get('email') </code></pre> <p>And obviously this fails.</p> <p>Why i am asking all this is, that perhaps i am doing something wrong and my outgoing request is wrong? Or am i doing all correctly and should change the socialaouth module to accept info in a new way and then commit the change?</p> <p>Alan</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload