\documentclass{article}
\usepackage{ulem}
\usepackage{graphicx}
\usepackage{hyperref}
\pagestyle{headings}
\begin{document}

\noindent\rule{\textwidth}{1pt}
\part{Composite Authentication How To (Horde 4/5)}
\textbf{Composite Authentication documentation for Horde 3 can be found at <a href="https://wiki.horde.org/AuthCompositeHowToH3">AuthCompositeHowToH3</a>.}

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:

\begin{itemize}
\item For instance you want to let IMP authenticate users against several possible email servers


\item But you want to be able to manage users globally from a central user repository (such as a corporate SQL database)


\end{itemize}
\section{Defining the sub-drivers}
First you need to define all the drivers in \texttt{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:

<pre><code class="language-php">
\$conf['auth']['driver'] = 'ftp';
\$conf['auth']['params'] = array(
    'hostspec' => '192.168.0.21',
    'port' => 21
);
</code></pre>
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):

<pre><code class="language-php">
\$conf['auth']['driver'] = 'imap';
\$conf['auth']['params'] = array(
    'hostspec' => '192.168.0.42',
    'port' => 143,
    'secure' => 'none'
);
</code></pre>
To finish the example, let's pretend that we want to use the \textbf{ftp} driver for admin and the \textbf{imap} driver for authentication.  The final composite driver configuration to be placed in horde/config/conf.php would be as follows:

<pre><code class="language-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'] = 'imap';
\$conf['auth']['params']['auth\_driver']['params'] = array(
    'hostspec' => '192.168.0.42',
    'port' => 143,
    'secure' => 'none'
);
</code></pre>
\end{document}
