Add autocreate user and add openid login back
Errietta Kostala [Wed, 21 Jan 2015 11:07:57 +0000 (11:07 +0000)]
lib/stemmaweb.pm
root/src/auth/login.tt

index b200635..1a9da7d 100644 (file)
@@ -103,7 +103,8 @@ __PACKAGE__->config(
             store => {
                 class => 'Model::KiokuDB',
                 model_name => 'Directory',
-            }
+            },
+            auto_create_user => 1,
         },
     },
     ## Auth with CatalystX::Controller::Auth
index 7e3437e..1d1a6c2 100644 (file)
@@ -96,6 +96,16 @@ $(document).ready(function() {
                </form>
        </div>
 
+       <h3><a href="#">Sign in with OpenID</a></h3>
+       <div>
+               <p>If you have an account with an <a href="http://openid.net/get-an-openid/" target="_blank">OpenID provider</a> (e.g. WordPress, Blogger, Flickr, Yahoo), you may use it to sign into Stemmaweb.
+               <form class="openid_form" method="post" action="[% c.uri_for_action('/users/login') | html %]" autocomplete="off">
+                       <input type="hidden" name="realm" value="openid"/>
+                       <input type="text" name="openid_identifier" id="openid_input"/>
+                       <input type="submit" class="login_button" id="login_openid" value="Sign in with OpenID"/>
+               </form>
+       </div>
+
 [% UNLESS c.req.param('realm') == 'openid' %]
        <h3><a href="#">Sign in with Stemmaweb</a></h3>
        <div>