OpenId Authentication in Moinmoin
Contents
1. Configuration
To enable Open Id, you need to install python-openid first. Then you need to add the following lines to wikiconfig.py to enable Open Id authentication in Moinmoin. This works on Moinmoin 1.9.2.
from MoinMoin.auth.openidrp import OpenIDAuth
auth = [OpenIDAuth()]
cookie_lifetime = (2, 12)
You can use any non-zero number as the first item in the cookie_lifetime tuple. From the documention:
cookie_lifetime. Default value (0,12). Cookie lifetime in hours, can be fractional. First tuple element is for anonymous sessions, second tuple element is for logged-in sessions. For anonymous sessions, t=0 means that they are disabled, t>0 means that many hours. For logged-in sessions, t>0 means that many hours, or forever if user checked 'remember_me', t<0 means -t hours and ignore user 'remember_me' setting - you usually don't want to use t=0, it disables logged-in sessions.
This configuration only allows users to login using Openid. If you want to fall back to regular username/password based registration, take a look at the documentation on combining authentication methods.
2. References
Moinmoin's documentation on using various methods of user authentication
http://hewgill.com/journal/entries/429-openid-login-on-moinmoin-170 : Helped me initially. However, anonymous_session_lifetime is no longer a valid configuration option and is replaced by cookie_lifetime in Moimmoin 1.9.
