]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/passwordauth.pm
added getsetup hooks for all plugins up to recentchanges
[ikiwiki.git] / IkiWiki / Plugin / passwordauth.pm
index f3f1aa4bf2b7b5f761859d7a75a2c0d68f8b4eb7..a3fd2d4ede3ce5e446b68dba28b13f7f4965471e 100644 (file)
@@ -7,13 +7,30 @@ use strict;
 use IkiWiki 2.00;
 
 sub import { #{{{
-        hook(type => "formbuilder_setup", id => "passwordauth",
-               call => \&formbuilder_setup);
-        hook(type => "formbuilder", id => "passwordauth",
-               call => \&formbuilder);
+       hook(type => "getsetup", id => "passwordauth", "call" => \&getsetup);
+        hook(type => "formbuilder_setup", id => "passwordauth", call => \&formbuilder_setup);
+        hook(type => "formbuilder", id => "passwordauth", call => \&formbuilder);
        hook(type => "sessioncgi", id => "passwordauth", call => \&sessioncgi);
 } # }}}
 
+sub getsetup () { #{{{
+       return
+               account_creation_password => {
+                       type => "string",
+                       default => "",
+                       description => "a password that must be entered when signing up for an account",
+                       safe => 1,
+                       rebuild => 0,
+               },
+               password_cost => {
+                       type => "integer",
+                       default => 8,
+                       description => "cost of generating a password using Authen::Passphrase::BlowfishCrypt",
+                       safe => 1,
+                       rebuild => 0,
+               },
+} #}}}
+
 # Checks if a string matches a user's password, and returns true or false.
 sub checkpassword ($$;$) { #{{{
        my $user=shift;