Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Make it possible to extract extra data from the OpenIDResponse object
  • Loading branch information
puiterwijk committed Jan 24, 2015
commit 6c335210d05f1972b0f9593d127b0c08c49ab285
8 changes: 8 additions & 0 deletions velruse/providers/openid.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ def callback(self, request):
sreg_resp=sreg.SRegResponse.fromSuccessResponse(info),
ax_resp=ax.FetchResponse.fromSuccessResponse(info)
)
self._extract_extra_data(info, user_data)
# Did we get any OAuth info?
oauth = info.extensionResponse(
'http://specs.openid.net/extensions/oauth/1.0', False
Expand All @@ -273,6 +274,13 @@ def callback(self, request):
else:
raise ThirdPartyFailure("OpenID failed.")

def _extract_extra_data(self, info, user_data):
"""
This function does nothing, but can be used in subclasses
to extract extra information from the OpenIDResponse object
"""
pass


class AttribAccess(object):
"""Uniform attribute accessor for Simple Reg and Attribute Exchange
Expand Down