[ingo] WG: Using IMP Auth in Ingo
Michael M Slusarz
slusarz at horde.org
Thu Oct 11 07:00:56 UTC 2012
Quoting Jonathan Westerholt <joniw at t-online.de>:
>> So it does make sense to allow for a system to define transport
>> authentication credentials outside of the configuration file (due to
>> bootstrapping concerns). Therefore, in Ingo 3, I have just committed code
>> that adds a 'transport_auth' hook that replaces the old 'hordeauth',
>> 'password', and 'username' parameters that used to be contained in
>> backends.php.
>>
>> This should fix your personal issue.
>>
>> michael
>
> Hello Michael
>
> I just tried your hook and I have a few issues:
>
> 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.
> 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).
michael
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the ingo
mailing list