[imp] Auth::authenticate() login problems
Chris Miller
chris at integratedventures.co.uk
Tue Dec 12 05:12:49 PST 2006
Hi Jan,
I was trying to initiate a registry object with /lib/core.php. this is
defined at the top of my php file, so no other horde or my own php related
calls first.
define('HORDE_BASE', '/my/path/to/horde');
require_once HORDE_BASE . '/lib/core.php';
$registry = &Registry::singleton();
$auth = &Auth::singleton($conf['auth']['driver']);
$authenticated = $auth->authenticate('username', array('password' =>
'realpassword'));
At the $auth->authenticate() call I generate the error
"A fatal error has occurred
imp does not provide an authenticate() method.
Details have been logged for the administrator."
The log shows
DATETIME HORDE [emergency] [] imp does not provide an authenticate() meth
od. [on line 105 of "/my/path/to/horde/lib/Horde/Auth/application.php"]
I queried the $auth object for its runtime type and it was
Auth_application
Additionally I checked the variable contained in $conf['auth']['driver']
which was "application".
At this point I did some looking around in the source, but drew a blank.
My IMP is configured to authenticate against an imap server, and the login
screens to normal horde sessions are working.
I of course need to solve my login problems before really delving into using
parts of horde with registry calls etc.
Regards
Chris
>
> I have trawled the archives and discovered that it is possible to use
horde
> modules outside of the horde directory structure with the wiki entry
"Using
> Horde from a custom website or application". I have also delved into the
> code to start recognizing the classes used etc.
>
> However I have configured horde to use IMP as its authentication as an
> application, and coding
>
> $auth = &Auth::singleton($conf['auth']['driver']);
> $authenticated = $auth->authenticate('username', array('password' =>
> 'realpassword'));
>
> Results in the following message
>
> A fatal error has occurred
> imp does not provide an authenticate() method.
> Details have been logged for the administrator.
>
> I've done a fair bit of digging around the code, but have drawn a blank,
>
> What am I missing here?
>
> Also since others potentially will have similar teething problems with
> getting this to work, I thought that I could contribute a hello world
style
> example of this based upon my experiences.
Can you provide a complete code example?
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.16/582 - Release Date: 11/12/2006
16:32
More information about the imp
mailing list