~michael.nelson/django-openid-auth/701489-rename-signal-provide-openid-response

« back to all changes in this revision

Viewing changes to django_openid_auth/views.py

myOpenID's attribute exchange implementation uses non-standard attribute 
names from an old draft of the specification.  Ask for these attributes 
in addition to the standard ones to support that provider.

Fixes bug #607553.

Show diffs side-by-side

added added

removed removed

Lines of Context:
177
177
            ('http://axschema.org/namePerson', 'fullname'),
178
178
            ('http://axschema.org/namePerson/first', 'firstname'),
179
179
            ('http://axschema.org/namePerson/last', 'lastname'),
180
 
            ('http://axschema.org/namePerson/friendly', 'nickname')]:
 
180
            ('http://axschema.org/namePerson/friendly', 'nickname'),
 
181
            # The myOpenID provider advertises AX support, but uses
 
182
            # attribute names from an obsolete draft of the
 
183
            # specification.  We request them for compatibility.
 
184
            ('http://schema.openid.net/contact/email', 'old_email'),
 
185
            ('http://schema.openid.net/namePerson', 'old_fullname'),
 
186
            ('http://schema.openid.net/namePerson/friendly', 'old_nickname')]:
181
187
            fetch_request.add(ax.AttrInfo(attr, alias=alias, required=True))
182
188
        openid_request.addExtension(fetch_request)
183
189
    else: