Remote Http Auth
This Authentication module makes it possible for wiki users to authenticate with their username and password used on any remote webpage with http authentication enabled.
See also the other authenticators in the AuthMarket.
Parts of this module are based on the code from this article: http://www.voidspace.org.uk/python/articles/authentication.shtml
Installation
Put RemoteHttpAuth.py into the wiki directory, where it can be found by the configuration file
Add it to wikiconfig.py configuration file:
1 from remote_RemoteHttpAuth import RemoteHttpAuth
2 auth = [PHPSessionAuth(), RemoteHttpAuth(auth_url="https://some.server.com/some/webpage",
3 auth_hint="You should use your username and password used on some.server/some/webpage",
4 required_web_content="Login OK\n",
5 auto_email_domain="some.server.com",
6 autocreate=True)]
Description
- PHPSessionAuth authenticator is used as well. This way user needs to login once with his username and password using remote server, and after that he stays logged in using PHP session method (until he logs out).
- auth_url - mandatory parameter. It specifies the URL of the server and webpage that should be used for authentication. When using this as an address in your web browser, user should get a standard web browser's pop-up dialog asking for hist username and password. Login form on the webpage will not work, it has to be server-side authentication.
auth_hint - optional parameter containing the string that will be displayed on the MoinMoin's login page.
- required_web_content - optional parameter telling the Authenticator what content should be returned by the server (the content of the webpage requested, is authorization was correct). It is not mandatory, since the authenticator is able to tell if authentication was successful or not, but provides additional test for successful authorization. If it is not provided, the content returned will not be tested.
- autocreate - optional parameter. If it is set to True, this authenticator automatically create new users once they authenticate properly. Users will have the same username as the one used for login purposes.
- auto_email_domain - optional parameter specifying the email domain that should be used for automatically created emails. If autocreate is set to True, and this authenticator creates new user (if provided username and password is correct according to remote server, but this username has not been used before), it normally doesn't set any email. Once this user tries to modify his preferences, he will have to provide some email. With this option automatic email will be set, in form: username_use_for_authentication@auto_email_domain.
History
2009-02-27 : initial version for MoinMoin 1.8.2