X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/03c567aede203158152a15a9f46e0e6711db4282..c1a4dfda807ca08de7d3370fc421abc39d411264:/forum_modules/openidauth/consumer.py diff --git a/forum_modules/openidauth/consumer.py b/forum_modules/openidauth/consumer.py index 650c6f6..cc1e97d 100644 --- a/forum_modules/openidauth/consumer.py +++ b/forum_modules/openidauth/consumer.py @@ -18,12 +18,12 @@ from store import OsqaOpenIDStore class OpenIdAbstractAuthConsumer(AuthenticationConsumer): dataype2ax_schema = { - 'username': 'http://axschema.org/namePerson/friendly', + #'username': 'http://axschema.org/namePerson/friendly', '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', - 'birthdate': 'http://axschema.org/birthDate', + #'birthdate': 'http://axschema.org/birthDate', } def get_user_url(self, request): @@ -107,24 +107,18 @@ class OpenIdAbstractAuthConsumer(AuthenticationConsumer): 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'] = { - 'email': '', - 'username': '' + 'email': available_data.get('email', None), } except Exception, e: - import sys, traceback - traceback.print_exc(file=sys.stdout) + pass + #import sys, traceback + #traceback.print_exc(file=sys.stdout) return request.GET['openid.identity'] elif openid_response.status == CANCEL: