summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3522ca5)
del request.session['assoc_key']
del request.session['auth_provider']
del request.session['assoc_key']
del request.session['auth_provider']
- if user_.email_isvalid:
- return login_and_forward(request, user_)
- else:
- return HttpResponseRedirect(reverse('index'))
+ return login_and_forward(request, user_)
else:
provider_class = AUTH_PROVIDERS[request.session['auth_provider']].consumer
user_data = provider_class.get_user_data(request.session['assoc_key'])
else:
provider_class = AUTH_PROVIDERS[request.session['auth_provider']].consumer
user_data = provider_class.get_user_data(request.session['assoc_key'])
dataype2ax_schema = {
#'username': ('http://schema.openid.net/namePerson/friendly', 'friendly'),
'email': 'http://schema.openid.net/contact/email',
dataype2ax_schema = {
#'username': ('http://schema.openid.net/namePerson/friendly', 'friendly'),
'email': 'http://schema.openid.net/contact/email',
- 'web': 'http://schema.openid.net/contact/web/default',
- 'birthdate': ('http://schema.openid.net/birthDate', 'birthDate'),
+ #'web': 'http://schema.openid.net/contact/web/default',
+ #'birthdate': ('http://schema.openid.net/birthDate', 'birthDate'),
}
def get_user_url(self, request):
}
def get_user_url(self, request):
class OpenIdAbstractAuthConsumer(AuthenticationConsumer):
dataype2ax_schema = {
class OpenIdAbstractAuthConsumer(AuthenticationConsumer):
dataype2ax_schema = {
- 'username': 'http://axschema.org/namePerson/friendly',
+ #'username': 'http://axschema.org/namePerson/friendly',
'email': 'http://axschema.org/contact/email',
'email': 'http://axschema.org/contact/email',
- 'web': 'http://axschema.org/contact/web/default',
+ #'web': 'http://axschema.org/contact/web/default',
#'firstname': 'http://axschema.org/namePerson/first',
#'lastname': 'http://axschema.org/namePerson/last',
#'firstname': 'http://axschema.org/namePerson/first',
#'lastname': 'http://axschema.org/namePerson/last',
- 'birthdate': 'http://axschema.org/birthDate',
+ #'birthdate': 'http://axschema.org/birthDate',
}
def get_user_url(self, request):
}
def get_user_url(self, request):
for n, s in axargs.items() if s in ax_schema2data_type
])
for n, s in axargs.items() if s in ax_schema2data_type
])
- #available_data = dict([
- # (t, axargs["value.%s.1" % s]) for t, s in available_types.items()
- #])
-
- #print available_data
-
-
- #email = ax.getExtensionArgs()['value.ext0.1']
- #username = ax.getExtensionArgs()['value.ext0.2']
+ available_data = dict([
+ (t, axargs["value.%s.1" % s]) for t, s in available_types.items()
+ ])
request.session['auth_consumer_data'] = {
request.session['auth_consumer_data'] = {
- 'email': '',
- 'username': ''
+ 'email': available_data.get('email', None),