[TYPO3-dev] auth services problem - where to require HORDE framework classes
Achim Gerber JHF IT
achim.gerber at jhf-china.org
Thu Nov 30 11:28:41 CET 2006
Hi All,
I want use the horde driver for the authentication. This way the horde
session is also created for that user and I can "hopefully" later create for
typo3 horde wrapper plug-in to display calendars and mails of that user.
So far I studied all what is available for auth services and I created an
extension which can authenticate a dummy user in typo3. The user is created
in the particular sysfolder. Looks fine so far.
Now comes the problem: When I try to instantiate the HORDE framework I
struggle. The code below works fine in a standalone php file directly loaded
from the browser. But if I try to require the HORDE framework classes in my
class.tx_awghordeauth_sv1.php I get lots of errors.
I tried to require the HORDE framework in my ext_localconf.php I can not
access the Auth::... class from HORDE.
Which is the right scope to require the HORDE framework classes?
I would really appreciate your input!!
Greetings - Achim
// Define path to Horde.
define('HORDE_BASE', '../horde');
@define('AUTH_HANDLER', true);
@define('IMP_BASE', HORDE_BASE . '/imp');
$authentication = 'none';
require_once IMP_BASE . '/lib/base.php';
require IMP_BASE . '/config/servers.php';
/* Get an Auth object. */
$imp_auth = (Auth::getProvider() == 'imp');
$auth = &Auth::singleton($conf['auth']['driver']);
if (!$auth->isAuthenticated()) {
echo 'new authentication: ';
$authenticated = $auth->authenticate('as.gerber', array('password' =>
'200402'));
}
More information about the TYPO3-dev
mailing list