Skip to content

Commit

Permalink
[project @ djopenid.consumer.views: correct ax bugs]
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Turner committed Jul 23, 2008
1 parent 74ad7ef commit 08afbfd
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions examples/djopenid/consumer/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from openid.consumer import consumer
from openid.consumer.discover import DiscoveryFailure
from openid.extensions import pape, sreg
from openid.extensions import ax, pape, sreg
from openid.yadis.constants import YADIS_HEADER_NAME, YADIS_CONTENT_TYPE
from openid.server.trustroot import RP_RETURN_TO_URL_TYPE

Expand Down Expand Up @@ -167,12 +167,13 @@ def finishOpenID(request):
sreg_response = sreg.SRegResponse.fromSuccessResponse(response)

ax_response = ax.FetchResponse.fromSuccessResponse(response)
ax_items = {
'fullname': ax_response.get(
'http://schema.openid.net/namePerson'),
'web': ax_response.get(
'http://schema.openid.net/contact/web/default'),
}
if ax_response:
ax_items = {
'fullname': ax_response.get(
'http://schema.openid.net/namePerson'),
'web': ax_response.get(
'http://schema.openid.net/contact/web/default'),
}

# Get a PAPE response object if response information was
# included in the OpenID response.
Expand Down

0 comments on commit 08afbfd

Please sign in to comment.