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
--
Matías Aguirre (
matias...@gmail.com)