|
CookieAuth<< Page Drafts | Cookbook-V1 | Restricting Edits >> Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.
GoalPmWiki's default method for handling password authentication does not work on some web hosts (such as Powweb). This recipe provides some rudimetary authentication that should work on all hosts. Umm, how is this functionally different from the sessionauth.php script that comes with a PmWiki distribution?
SolutionCookieAuth uses a login form that stores two cookies, one containing the user name and one containing an MD5 hash of the user name and a secret key. PmWiki's authentication function is replaced with one that checks the presence of these cookies. This technique is presented in chapter 44 of the book PHP4 and MySQL Bible(approve links). While this seems secure to me, I am not a security expert so I make no guarantees. FilesInstallation
Usage
LimitationsUnlike PmWiki's default authentication system, CookieAuth uses only a single admin password. It could easily be adapted to support multiple users, but it will never do different passwords on each page very effectively because there is only a single login page rather than the pop-up login boxes. Comments & BugsNone so far... Contributors
pmwiki-2.2.0-beta68 -- Last modified by {{Pm}}
|