[commits] [Wiki] created: AuthCompositeHowTo
Michael Slusarz
slusarz at horde.org
Wed Mar 23 03:48:31 UTC 2011
slusarz Wed, 23 Mar 2011 03:48:31 +0000
Created page: http://wiki.horde.org/AuthCompositeHowTo
----
+ Composite Authentication !HowTo (Horde 4)
**Contents**
The composite authentication driver allows to use different
authentication and user management schemes for different purposes or
circumstances.
For example, you can choose different drivers for authentication and
user management:
* For instance you want to let IMP authenticate users against several
possible email servers
* But you want to be able to manage users globally from a central user
repository (such as a corporate SQL database)
++ Defining the sub-drivers
First you need to define all the drivers in {{config/conf.php}} that
should be part of the composite driver. Each driver is configured like
a "normal" authentication driver and associated with its role (admin
or authentication).
Let's say you would configure an FTP authentication backend like this:
<code type="php">
$conf['auth']['driver'] = 'ftp';
$conf['auth']['params'] = array(
'hostspec' => '192.168.0.21',
'port' => 21
);
</code>
And let's say you would configure an IMAP authentication backend like
this (note that these authentication backends don't make a bunch of
sense for combining via the composite driver, but they both have
minimal configuration so it makes things easy to follow):
<code type="php">
$conf['auth']['driver'] = 'imap';
$conf['auth']['params'] = array(
'hostspec' => '192.168.0.42',
'port' => 143,
'secure' => 'none'
);
</code>
To finish the example, let's pretend that we want to use the
***imap*** driver for admin and the ***ftp*** driver for
authentication. The final composite driver configuration to be placed
in horde/config/conf.php would be as follows:
<code type="php">
$conf['auth']['driver'] = 'composite';
$conf['auth']['params']['admin_driver']['driver'] = 'ftp';
$conf['auth']['params']['admin_driver']['params'] = array(
'hostspec' => '192.168.0.21',
'port' => 21
);
$conf['auth']['params']['auth_driver']['driver'] = 'ftp';
$conf['auth']['params']['auth_driver']['params'] = array(
'hostspec' => '192.168.0.42',
'port' => 143,
'secure' => 'none'
);
</code>
More information about the commits
mailing list