Changes between Version 1 and Version 2 of ScriptAuthPlugin


Ignore:
Timestamp:
Jan 13, 2010 10:03:31 PM (5 years ago)
Author:
Carsten <CarstenFuchs@…>
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ScriptAuthPlugin

    v1 v2  
    1515[http://trac-hacks.org/newticket?component=ScriptAuthPlugin&owner=Carsten new ticket]. 
    1616 
    17 == Download == 
     17== Download and Source == 
    1818 
    19 Download the zipped source from [download:scriptauthplugin here]. 
     19Download the zipped source from [download:scriptauthplugin here], check out [/svn/scriptauthplugin using Subversion], or [source:scriptauthplugin browse the source] with Trac. 
    2020 
    21 == Source == 
     21== Installation == 
    2222 
    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{{{ 
     29python setup.py bdist_egg 
     30}}} 
     31 * Copy the egg, found in `dist/` to the `plugins` directory of the desired trac environment 
    2432 
    25 == Example == 
     33== Configuration == 
    2634 
    27 This plugin issues a HTTP GET request of the form 
     35Set the URL of the script that does the authentication: 
    2836 
    29     http://www.example.org/my_auth.php?u=username&amp;p=password 
     37{{{ 
     38[account-manager] 
     39# password_store = ScriptAuthStore    # When using ScriptAuthStore alone. 
     40password_store = HtPasswdStore,ScriptAuthStore 
     41script_auth_url = http://www.example.com/my_auth.php?u=<USERNAME>&p=<PASSWORD> 
     42}}} 
    3043 
    31 and evaluates the HTTP response code to learn whether the password was valid. 
     44Note the two placeholders '''<USERNAME>''' and '''<PASSWORD>''' in the `script_auth_url`. 
     45Type them exactly like this in order to have them automatically replaced by the appropriate user details. 
     46 
     47The script at `script_auth_url` is expected to return `ok` followed by newline followed by the email address of the user 
     48as 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.) 
    3250 
    3351 
     
    4058'''Author:''' [wiki:Carsten] [[BR]] 
    4159'''Maintainer:''' [wiki:Carsten] [[BR]] 
    42 '''Contributors:''' 
     60'''Contributors:''' http://www.cafu.de