Changes between Version 1 and Version 2 of ScriptAuthPlugin
- Timestamp:
- Jan 13, 2010, 9:03:31 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ScriptAuthPlugin
v1 v2 15 15 [http://trac-hacks.org/newticket?component=ScriptAuthPlugin&owner=Carsten new ticket]. 16 16 17 == Download ==17 == Download and Source == 18 18 19 Download the zipped source from [download:scriptauthplugin here] .19 Download the zipped source from [download:scriptauthplugin here], check out [/svn/scriptauthplugin using Subversion], or [source:scriptauthplugin browse the source] with Trac. 20 20 21 == Source==21 == Installation == 22 22 23 You can check out ScriptAuthPlugin from [http://trac-hacks.org/svn/scriptauthplugin here] using Subversion, or [source:scriptauthplugin browse the source] with Trac. 23 * First make sure you have AccountManagerPlugin installed 24 * Grab the source 25 * Unpack the source 26 * Change into the source directory that contains the `setup.py` file 27 * Build an egg: 28 {{{ 29 python setup.py bdist_egg 30 }}} 31 * Copy the egg, found in `dist/` to the `plugins` directory of the desired trac environment 24 32 25 == Example==33 == Configuration == 26 34 27 This plugin issues a HTTP GET request of the form 35 Set the URL of the script that does the authentication: 28 36 29 http://www.example.org/my_auth.php?u=username&p=password 37 {{{ 38 [account-manager] 39 # password_store = ScriptAuthStore # When using ScriptAuthStore alone. 40 password_store = HtPasswdStore,ScriptAuthStore 41 script_auth_url = http://www.example.com/my_auth.php?u=<USERNAME>&p=<PASSWORD> 42 }}} 30 43 31 and evaluates the HTTP response code to learn whether the password was valid. 44 Note the two placeholders '''<USERNAME>''' and '''<PASSWORD>''' in the `script_auth_url`. 45 Type them exactly like this in order to have them automatically replaced by the appropriate user details. 46 47 The script at `script_auth_url` is expected to return `ok` followed by newline followed by the email address of the user 48 as the HTTP content when the user details are valid, or anything else otherwise. 49 (The HTTP result codes like 200 and 401 can unfortunately not (easily) be utilized with Python <= 2.4.) 32 50 33 51 … … 40 58 '''Author:''' [wiki:Carsten] [[BR]] 41 59 '''Maintainer:''' [wiki:Carsten] [[BR]] 42 '''Contributors:''' 60 '''Contributors:''' http://www.cafu.de