OpenID Attribute Exchange Configuration

75 views
Skip to first unread message

Erik Ankrom

unread,
Jul 8, 2012, 1:12:13 AM7/8/12
to django-so...@googlegroups.com
I want to get values from the AX response of my employer's Associate OpenID provider, but I'm confused on what values belong in the <backend>_AX_EXTRA_DATA setting as documented here: http://django-social-auth.readthedocs.org/en/latest/backends/openid.html

Can anyone provide an example of what these values should be?  For example, how do I update the nickname (username), First Name, and Last name, to the default Django user model, given the attributes conform to the following schema?


The pluggable backend I have so far is documented here: http://erikankrom.github.com/django-cerner-auth/

Matías Aguirre

unread,
Jul 9, 2012, 12:03:37 AM7/9/12
to django-social-auth
Hi Erik,

Honestly, never used that feature, but the idea is that you define a set of AX
names for your backend in the form:

CERNER_PROF_OPENID_AX_EXTRA_DATA = (
('http://axschema.org/name/resoures', 'alias_name'),
(...)
)

The "alias" shouldn't collide with other alias defined or an exception will be
raised.

Anyway, first and last names are already requested on any OpenId backend [1],
and I don't see any override on your backends, so it should just work.

Does the provider respect Attribute Exchange URLs? Maybe they use openid.org
schemas, trying these ones maybe?

CERNER_PROF_OPENID_AX_EXTRA_DATA = (
('http://openid.net/schema/namePerson/first', 'first_name2'),
('http://openid.net/schema/namePerson/last', 'last_name2'),
('http://openid.net/schema/namePerson/friendly', 'nickname2'),
('http://openid.net/schema/contact/internet/email', 'email2'),
)

I know for sure that google doesn't send email when using openid.org URLs, but
it does when using axschema.org one. Sadly the openid doc is a mess on this
area and axschema.org is down for a while already :D

Regards,
Matías

[1]: https://github.com/omab/django-social-auth/blob/master/social_auth/backends/__init__.py#L57

Excerpts from Erik Ankrom's message of 2012-07-08 02:12:13 -0300:
> I want to get values from the AX response of my employer's Associate OpenID
> provider, but I'm confused on what values belong in the
> <backend>_AX_EXTRA_DATA setting as documented
> here: http://django-social-auth.readthedocs.org/en/latest/backends/openid.html
>
> Can anyone provide an example of what these values should be? For example,
> how do I update the nickname (username), First Name, and Last name, to the
> default Django user model, given the attributes conform to the following
> schema?
>
>
> - http://axschema.org/namePerson/first - Associate's preferred first name
> - http://axschema.org/namePerson/last - Associate's preferred last name
>
>
> The pluggable backend I have so far is documented
> here: http://erikankrom.github.com/django-cerner-auth/
--
Matías Aguirre (matias...@gmail.com)

Erik Ankrom

unread,
Jul 13, 2012, 6:57:43 PM7/13/12
to django-so...@googlegroups.com
Still no luck after attempting multiple _AX_EXTRA_DATA schema configs.

I'm working with estebistec on trying to figure out why either the Cerner OpenID provider is not returning AX attributes, or DSA isn't recognizing them.

Erik Ankrom

unread,
Oct 3, 2012, 11:25:43 PM10/3/12
to django-so...@googlegroups.com
Just now getting around to posting a solution, but the provider was not publishing AX capabilities as expected.  Working as expected after the provider updated their capabilities. 

Thanks!

Matías Aguirre

unread,
Oct 4, 2012, 12:56:42 PM10/4/12
to Erik Ankrom, django-social-auth
Awesome, thanks for the update.

Excerpts from Erik Ankrom's message of 2012-10-04 00:25:43 -0300:
> Just now getting around to posting a solution, but the provider was not
> publishing AX capabilities as expected. Working as expected after the
> provider updated their capabilities.
>
> Thanks!
>
> On Friday, July 13, 2012 5:57:43 PM UTC-5, Erik Ankrom wrote:
> >
> > Still no luck after attempting multiple _AX_EXTRA_DATA schema configs.
> >
> > I'm working with estebistec <https://github.com/estebistec> on trying to
> >> I know for sure that google doesn't send email when using openid.orgURLs, but
--
Matías Aguirre (matias...@gmail.com)
Reply all
Reply to author
Forward
0 new messages