[dev] Auto-logging into IMP with Horde User Credentials

Vijay Mahrra vijay.mahrra at es.easynet.net
Fri Jul 18 01:27:02 PDT 2003


Hello All,

At my organisation, we use Horde with our own customised Horde authentication
driver.  This is because the modules we have developed for use in-house
require some extra attributes in the session data upon a successful login.

In our Horde installation (based around the HEAD versions of modules) we
wanted to automatically log in to IMP using the same login credentials
(username/password) as our custom auth driver, as having to do a
'double-login' isn't what we really wanted to do.

Now I could be mistaken here, in which case you ignore the rest of this email,
but we could see no easy way to get IMP to use the Horde login credentials
and automatically login.  So hacking IMP we found a way around:

1. In servers.php we created an entry for our auto-login server:

$servers['imap.example.com'] = array(
     'name' => 'example.com (imap)',
     'server' => 'imap.example.com',
     'protocol' => 'imap/notls',
     'port' => 143,
     'folders' => 'INBOX.',
     'namespace' => '',
     'maildomain' => 'example.com',
     'smtphost' => 'example.com',
     'realm' => '',
     'preferred' => '',
     'quota' => 'courier',
     'dotfiles' => true,
     'hierarchies' => array());

2) We patched conf.xml to have a new config entry for servers called
'auto_login' which lets you enter the above $servers[] entry from your
servers.php, i.e. so you can get $conf['server']['auto_login'] =
'imap.example.com'; written in your conf.php for IMP.

3) We patched IMP's redirect.php script to use this 'auto_login' server
information if it is set in the conf.php

The result is that now we can happily log into Horde with our custom auth
driver and clicking on 'Mail' in the application frame automatically logs us
into IMP using our "auto-login" server and Horde credentials.

There is one problem we have.  After auto-logging in, we get a duplicate
frameset.

We would be happy to submit these changes back to the Horde project, if deemed
useful enough.  I have included diffs against IMP for your consideration. Any
help with the double frameset problem would be appreciated.

I hope someone finds this useful and can show me the light :)

Vijay

BTW Thank you to everyone here for all your hard work and effort, I love The
Horde Project, ever thought of selling Horde T-Shirts, with the profit going
back to the project?
--
vijay mahrra
systems developer/administrator
easynet españa (madrid)         http://www.es.easynet.net

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: conf.xml.diff
Type: text/x-diff
Size: 213 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20030718/adf0acdf/conf.xml.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: redirect.php.diff
Type: text/x-diff
Size: 2249 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20030718/adf0acdf/redirect.php.bin


More information about the dev mailing list