[imp] MIMP with hordeauth
Chris Stromsoe
cbs at cts.ucla.edu
Mon Jan 1 20:41:35 PST 2007
I want to use MIMP with hordeauth. I want to use a single authentication
driver, not composite. I'm doing some things in the postauthenticate hook
that need to always happen. I want all mobile browsers to be redirected
to mimp without the horde sidebar, and all explicit requests for /mimp/...
to get mimp without the sidebar.
I've set horde/mimp/config/conf.php
$conf['user']['alternate_login'] = '/login.php';
to use the root login page.
In horde/mimp/redirect.php, I changed
$imapuser = Util::getPost('imapuser');
$pass = Util::getPost('pass');
to
$imapuser = Auth::getBareAuth();
$pass = Auth::getCredential('password');
Then, in horde/login.php, I modified the application URL selection to be:
if ($browser->isMobile() || ($url_param && preg_match('/^\/+mimp\//', $url_param))) {
$horde_url = $registry->get('webroot', 'mimp') . '/index.php';
} else {
if ($url_param) {
$url = Horde::url(Util::removeParameter($url_param, session_name()), true);
$horde_url = $registry->get('webroot', 'horde') . '/index.php';
$horde_url = Util::addParameter($horde_url, 'url', $url);
} else {
$url = Horde::url(Util::removeParameter($url_param, session_name()), true);
$horde_url = Horde::url($registry->get('webroot', 'horde') . '/index.php');
}
}
$url = Horde::applicationUrl($horde_url, true);
Some basic testing looks like that covers everything for me. Is there
anything obvious that I missed?
-Chris
More information about the imp
mailing list