|
Cookbook /
AuthUserCookieSummary: Persistent login for AuthUser
Version: 0.1
Prerequisites: Tested with pmwiki-2.1.3 and build-in AuthUser script
Status:
Maintainer: Elias Soong
Categories: Security
GoalIf you use the build-in script AuthUser, PmWiki store username and password in session, that means you will be logged out when you close your browser. This module use cookie to help AuthUser have the persistent login ability. FilesInstallation
$AuthUserCookieKey = 'abcdefghijklmnopqrstuvwx';
if ($action != 'captchaimage') include_once(" $FarmD/cookbook/authusercookie.php");
'''$[Password required]''' (:messages:) (:if enabled InvalidLogin:)* $[Name/password not recognized] (:if:) (:input auth_form:) (:if enabled EnableAuthUser:)$[Name]: (:input text name=authid:)\\ (:if:)$[Password]: (:input password name=authpw:)\\ (:if2 enabled AuthUserCookie:)$[Persistent]: (:input checkbox name=persistent checked=true:)\\(:if2:) (:input submit value='OK':) (:input end:)
ConfigurationThe following variables can be defined before userauth.php is included in config.php: $AuthUserCookieExp - The expiration time for the cookie, in seconds. Defaults to 30 days. NotesThe including of AuthUserCookie and all related settings must be ahead of the including of AuthUser script in config.php! Otherwise, nothing will take effect. If you get a "Warning: Cannot modify header information - headers already sent by ......" error, please try to turn on 'output_buffering' setting to 'On' in php.ini file. ... Or remove the closing "?>" php tag. --Petko I tried removing "?>" on lighttpd 1.4.19-5+lenny1 with php 5.2.6.dfsg.1-1+lenny4 under FastCGI, but it couldn't solve this problem. --Elias Soong
Release notes
See also
ContributorsCommentsUser notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |