[dev] Re: [imp] custom login

Mike Cochrane mike at graftonhall.co.nz
Wed Jan 22 00:23:21 PST 2003


Attached is custom.php which goes into horde/lib/auth/ and customize to suit
you. What it does is transparently featches the user's login and password by
what ever means then then tries to authenicate IMP using these credentials.

Here's sort of what I use in horde authenication config:
 $conf['auth']['driver'] = 'composite';
 $conf['auth']['params']['loginscreen_switch'] = '_horde_select_loginscreen';
 $conf['auth']['params']['drivers']['imp'] = array('driver' => 'application',
                                                   'params' => array('app' =>
'imp'));
 $conf['auth']['params']['drivers']['custom'] = array('driver' => 'custom',
                                                  'params' => null);
function _horde_select_loginscreen() {
    $custom_auth = &Auth::singleton('custom');
    if (!$custom_auth->transparent()) {
        return 'imp';
    } else {
        return 'custom';
    }    
}

Basically it authenticates with the custom driver else points you at the IMP
login screen.

Good Luck,

- Mike :-)


> ----- Message from ronnie at mk2.net ---------
> 
> At 18:30 21/01/2003 +1300, you wrote:
> >Just did the same things here in CVS Head by writting a transparent login
> >driver.
> 
> Hi Mike,
> I'm interrested in doing such a thing too. Any whance you make this driver
> public ?
> 
> Rgds,
> Ronnie.



More information about the dev mailing list