]> git.openstreetmap.org Git - osqa.git/blobdiff - forum_modules/openidauth/consumer.py
fixes problem with always showing alert dialog in chrome. Still working out non...
[osqa.git] / forum_modules / openidauth / consumer.py
index 22e83d27dfafdb2d1647fcb610d9e7f0e7d4e614..cc1e97d78ef30c75bef87fd9258d623efd3fd5eb 100644 (file)
@@ -18,12 +18,12 @@ from store import OsqaOpenIDStore
 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):
@@ -107,19 +107,12 @@ class OpenIdAbstractAuthConsumer(AuthenticationConsumer):
                         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),
                     }
 
                 except Exception, e:
                     }
 
                 except Exception, e: