Fix openid attribute fetching using Credential::OpenID
[scpubgit/stemmaweb.git] / lib / stemmaweb.pm
index 6cf1729..dc96b2b 100644 (file)
@@ -67,16 +67,28 @@ __PACKAGE__->config(
             },
             store => {
                 class => 'Model::KiokuDB',
-                model_name => 'User',
+                model_name => 'Directory',
             },
         },
         openid => {
             credential => {
                 class => 'OpenID',
+                extensions => ['http://openid.net/srv/ax/1.0' => 
+                    {
+                        ns          => 'ax',
+                        uri         => 'http://openid.net/srv/ax/1.0',
+                        mode        => 'fetch_request',
+                        required    => 'email',
+                        'type.email' => 'http://axschema.org/contact/email',
+                        # type        => {
+                        #     email => 'http://axschema.org/contact/email'
+                        # }
+                    }
+                    ],
             },
             store => {
                 class => 'Model::KiokuDB',
-                model_name => 'User',
+                model_name => 'Directory',
             },
             auto_create_user => 1,
         },
@@ -89,7 +101,7 @@ __PACKAGE__->config(
         action_after_login => '/index',
         send_register_email => 0,
         realm => 'openid',
-        login_fields => { openid => [], # qw/openid_identifier/],
+        login_fields => { openid => [qw/openid_identifier/],
                           default => [qw/username password/],
         },
     },