[ingo] WG: Using IMP Auth in Ingo

Jonathan Westerholt joniw at t-online.de
Thu Oct 11 09:02:16 UTC 2012


> > 1) The problem with the infinite loop also exists with the hook.
> > When i try to get the imap object with "$ob =
> > $GLOBALS['registry']->call('mail/imapOb');" I get the loop and I am
> > not able to login. When retrieving the imap object through "$ob =
> > $GLOBALS['injector']->getInstance('IMP_Factory_Imap')->create();" it
> > works. Do you have an idea how I can check if imp is fully initialized
> > so I only grab the object if imp has loaded the object?
> 
> You can't use 'IMP_Factory_Imap' from ingo, for obvious reasons.
> 
> The real issue is that IMP is trying to cache registry-ish values during
> authentication.  Unfortunately, this is not possible once one of these registry
> applications, in turn, calls IMP (since IMP is not completely setup at this point,
> we enter the infinite loop).  The solution was to move some registry checking
> code out of the IMP authentication bootstrapping code.

Tested your code and it works now.

> > 2) The credentials from the hook are not copied to the params array.
> > A diff is attached. I also added the ability to set the admin in the
> > hook.
> 
> Fixed in a different way.  'admin' can be set via backends.php and does not
> need a separate entry in the Factory.
>
> > 3) The timsieved transport gets the horde user and uses this as the
> > effective user when instantiating the NET_SIEVE class
> > (Transport/Timsieved.php, Line 64: "Ingo::getUser(false);"). There the
> > user from the hook must be used. A diff is attached.
> 
> I need to look at this some more.  Seems a bit strange that we are using the
> identical username twice in the method call (not saying it is wrong, but need
> to analyze more to make sure this assumption is correct).

My idea was that we can change the password of the admin account in the hook and so we should be able to set the admin user. If we use an admin account the password from the params array is used for the admin account and the username is the name of the effective user ( see http://pear.php.net/package/Net_Sieve/docs/1.3.2/Net_Sieve/Net_Sieve.html#methodNet_Sieve). That is the reason why we use the same name twice if we do not use an admin account.

Jonathan 



More information about the ingo mailing list