Version 2 (modified by Carsten, 9 years ago) (diff)


Script authentication for AccountManagerPlugin


Similar to normal HTTP Authentication, this plugin uses explicit URL parameters for transferring the username and passwort to a web script that implements the check and returns the authentication result in the HTTP response code. When possible, the users email address is transferred and set as well.

Bugs/Feature Requests

Existing bugs and feature requests for ScriptAuthPlugin are here.

If you have any issues, create a new ticket.

Download and Source

Download the zipped source from [download:scriptauthplugin here], check out using Subversion, or browse the source with Trac.


  • First make sure you have AccountManagerPlugin installed
  • Grab the source
  • Unpack the source
  • Change into the source directory that contains the file
  • Build an egg:
    python bdist_egg
  • Copy the egg, found in dist/ to the plugins directory of the desired trac environment


Set the URL of the script that does the authentication:

# password_store = ScriptAuthStore    # When using ScriptAuthStore alone.
password_store = HtPasswdStore,ScriptAuthStore
script_auth_url =<USERNAME>&p=<PASSWORD>

Note the two placeholders <USERNAME> and <PASSWORD> in the script_auth_url. Type them exactly like this in order to have them automatically replaced by the appropriate user details.

The script at script_auth_url is expected to return ok followed by newline followed by the email address of the user as the HTTP content when the user details are valid, or anything else otherwise. (The HTTP result codes like 200 and 401 can unfortunately not (easily) be utilized with Python <= 2.4.)

Recent Changes

7394 by Carsten on 2010-01-13 22:23:40
Added the very important URL encoding for the username and password parameters. The encoding of other parts of the URL is up to the user (option 'script_auth_url').
7388 by Carsten on 2010-01-13 18:33:28
Initial import of files.
7387 by Carsten on 2010-01-13 15:40:12
New hack ScriptAuthPlugin, created by Carsten


Author: Carsten
Maintainer: Carsten