Use Horde_Core_Factory_Auth directly, change name of factory method to create()
authorMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 7 Oct 2010 21:54:05 +0000 (17:54 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 7 Oct 2010 21:54:05 +0000 (17:54 -0400)
54 files changed:
ansel/perms.php
ansel/scripts/all_images_exif_to_tags.php
ansel/scripts/ansel.php
ansel/scripts/recursive_import.php
ansel/xppublish.php
beatnik/scripts/export_config.php
folks/account/resetpassword.php
folks/account/signup.php
folks/account/tabs.php
folks/edit/password.php
folks/lib/Friends.php
folks/perms.php
folks/rss/activity.php
folks/rss/friends.php
folks/rss/know.php
folks/scripts/mail.php
framework/ActiveSync/lib/Horde/ActiveSync/Driver/Horde.php
framework/Core/lib/Horde/Core/Auth/Ldap.php
framework/Core/lib/Horde/Core/Auth/Msad.php
framework/Core/lib/Horde/Core/Binder/Auth.php [deleted file]
framework/Core/lib/Horde/Core/Binder/AuthFactory.php [deleted file]
framework/Core/lib/Horde/Core/Factory/Auth.php
framework/Core/lib/Horde/Core/Perms/Ui.php
framework/Core/lib/Horde/Registry.php
framework/Core/package.xml
framework/Kolab_Resource/lib/Horde/Kolab/Resource.php
framework/Rpc/lib/Horde/Rpc.php
framework/Rpc/lib/Horde/Rpc/Webdav.php
framework/SyncML/SyncML/Backend/Horde.php
hermes/lib/Forms/Search.php
hermes/lib/Forms/Time.php
hermes/lib/Hermes.php
horde/admin/groups.php
horde/admin/signup_confirm.php
horde/admin/user.php
horde/lib/Prefs/Ui.php
horde/login.php
horde/scripts/cookie_login.php
horde/scripts/get_login.php
horde/scripts/http_login_refer.php
horde/services/changepassword.php
horde/services/resetpassword.php
horde/services/shares/edit.php
horde/signup.php
koward/lib/Koward.php
koward/lib/Koward/Cli.php
kronolith/feed/index.php
kronolith/lib/Kronolith.php
kronolith/perms.php
kronolith/templates/chunks/calendar.php
turba/scripts/upgrades/public_to_horde_share.php
whups/lib/Forms/Admin/User.php
whups/lib/Mail.php
wicked/scripts/wicked.php

index cc49ce9..5ea772f 100644 (file)
@@ -19,7 +19,7 @@ require_once dirname(__FILE__) . '/lib/Application.php';
 Horde_Registry::appInit('ansel');
 
 $groups = $injector->getInstance('Horde_Group');
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 
 $form = null;
 $reload = false;
index 8b7a7c7..2c38753 100755 (executable)
@@ -56,7 +56,7 @@ Horde_Registry::appInit('ansel', array('authentication' => 'none'));
 
 // Login to horde if username & password are set.
 if (!empty($username) && !empty($password)) {
-    $auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+    $auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
     if (!$auth->authenticate($username, array('password' => $password))) {
         $cli->fatal(_("Username or password is incorrect."));
     } else {
index aa796dd..84ba350 100755 (executable)
@@ -88,7 +88,7 @@ foreach ($opts as $opt) {
 
 // Login to horde if username & password are set.
 if (!empty($username) && !empty($password)) {
-    $auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+    $auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
     if (!$auth->authenticate($username, array('password' => $password))) {
         $error = _("Login is incorrect.");
         Horde::logMessage($error, 'ERR');
index 1645350..9e2b432 100755 (executable)
@@ -66,7 +66,7 @@ foreach ($opts as $opt) {
 
 // Login to horde if username & password are set.
 if (!empty($username) && !empty($password)) {
-    $auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+    $auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
     if (!$auth->authenticate($username, array('password' => $password))) {
         $cli->fatal(_("Username or password is incorrect."));
     } else {
index 64e0a3e..2e74f5f 100644 (file)
@@ -36,7 +36,7 @@ if ($cmd == 'login') {
     $username = Horde_Util::getFormData('username');
     $password = Horde_Util::getFormData('password');
     if ($username && $password) {
-        $auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+        $auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
         if ($auth->authenticate($username,
                                 array('password' => $password))) {
             $cmd = 'list';
index 93a3681..7f06cf1 100644 (file)
@@ -93,7 +93,7 @@ if (!empty($rpc)) {
 // Login to horde if username & password are set and load module.
 } elseif (!empty($username) && !empty($password)) {
     require_once HORDE_BASE . '/lib/base.php';
-    $auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+    $auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
     if (!$auth->authenticate($username, array('password' => $password))) {
         $error = _("Login is incorrect.");
         Horde::logMessage($error, 'ERR');
index 623abac..7882be7 100644 (file)
@@ -34,7 +34,7 @@ if ($registry->isAuthenticated()) {
 }
 
 // Make sure auth backend allows passwords to be reset.
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 if (!$auth->hasCapability('resetpassword')) {
     $notification->push(_("Cannot reset password automatically, contact your administrator."), 'horde.error');
     $registry->authenticateFailure('folks');
index 75ead72..25a21d6 100644 (file)
@@ -12,7 +12,7 @@
 
 require_once dirname(__FILE__) . '/tabs.php';
 
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 
 // Make sure signups are enabled before proceeding
 if ($conf['signup']['allow'] !== true ||
index 8799c20..42f5b2a 100644 (file)
@@ -13,7 +13,7 @@
 $folks_authentication = 'none';
 require_once dirname(__FILE__) . '/../lib/base.php';
 
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 
 $vars = Horde_Variables::getDefaultVariables();
 $tabs = new Horde_Core_Ui_Tabs('what', $vars);
index 36cb93d..e29dc2f 100644 (file)
@@ -16,7 +16,7 @@ require_once 'tabs.php';
 
 /*
 // Make sure auth backend allows passwords to be updated.
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 if (!$auth->hasCapability('resetpassword')) {
     $notification->push(_("Cannot update password, contact your administrator."), 'horde.error');
     $registry->authenticateFailure('folks');
index 69bea85..2afd7c9 100644 (file)
@@ -220,7 +220,7 @@ class Folks_Friends {
         }
 
         // Check if users exits
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
         if (!$auth->exists($user)) {
             return PEAR::raiseError(sprintf(_("User \"%s\" does not exits"), $user));
         }
@@ -289,7 +289,7 @@ class Folks_Friends {
         }
 
         // Check if users exits
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
         if (!$auth->exists($friend)) {
             return PEAR::raiseError(sprintf(_("User \"%s\" does not exits"), $friend));
         }
index 54f4e61..d33e940 100644 (file)
@@ -13,7 +13,7 @@ require_once dirname(__FILE__) . '/lib/base.php';
 
 $shares = $injector->getInstance('Horde_Core_Factory_Share')->create();
 $groups = $injector->getInstance('Horde_Group');
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 
 $reload = false;
 $actionID = Horde_Util::getFormData('actionID', 'edit');
index 8963a13..d3beb62 100644 (file)
@@ -14,7 +14,7 @@
 $folks_authentication = 'none';
 require_once dirname(__FILE__) . '/../lib/base.php';
 
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 if (!$GLOBALS['registry']->getAuth() &&
     (!isset($_SERVER['PHP_AUTH_USER']) ||
      !$auth->authenticate($_SERVER['PHP_AUTH_USER'], array('password' => isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : null)))) {
index 5855335..0c56abd 100644 (file)
@@ -14,7 +14,7 @@
 $folks_authentication = 'none';
 require_once dirname(__FILE__) . '/../lib/base.php';
 
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 if (!$GLOBALS['registry']->getAuth() &&
     (!isset($_SERVER['PHP_AUTH_USER']) ||
      !$auth->authenticate($_SERVER['PHP_AUTH_USER'], array('password' => isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : null)))) {
index 908911b..920a301 100644 (file)
@@ -14,7 +14,7 @@
 $folks_authentication = 'none';
 require_once dirname(__FILE__) . '/../lib/base.php';
 
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 if (!$GLOBALS['registry']->getAuth() &&
     (!isset($_SERVER['PHP_AUTH_USER']) ||
      !$auth->authenticate($_SERVER['PHP_AUTH_USER'], array('password' => isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : null)))) {
index e183d4c..5880fa4 100644 (file)
@@ -62,7 +62,7 @@ foreach ($opts as $opt) {
 
 // Login to horde if username & password are set.
 if (!empty($username) && !empty($password)) {
-    $auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+    $auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
     if (!$auth->authenticate($username, array('password' => $password))) {
         $error = _("Login is incorrect.");
         Horde::logMessage($error, 'ERR');
index 64f066f..4acc124 100644 (file)
@@ -67,7 +67,7 @@ class Horde_ActiveSync_Driver_Horde extends Horde_ActiveSync_Driver_Base
     {
         $this->_logger->info('Horde_ActiveSync_Driver_Horde::logon attempt for: ' . $username);
         parent::logon($username, $password, $domain);
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
 
         return $auth->authenticate($username, array('password' => $password));
     }
index d1abfd6..c56fb5a 100644 (file)
@@ -25,7 +25,7 @@ class Horde_Core_Auth_Ldap extends Horde_Auth_Ldap
      */
     public function addUser($userId, $credentials)
     {
-        list($userId, $credentials) = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth()->runHook($userId, $credentials, 'preauthenticate', 'admin');
+        list($userId, $credentials) = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create()->runHook($userId, $credentials, 'preauthenticate', 'admin');
 
         parent::addUser($userId, $credentials);
     }
@@ -41,7 +41,7 @@ class Horde_Core_Auth_Ldap extends Horde_Auth_Ldap
      */
     public function updateUser($oldID, $newID, $credentials)
     {
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
 
         list($oldID, $old_credentials) = $auth->runHook($oldID, $credentials, 'preauthenticate', 'admin');
         if (isset($old_credentials['ldap'])) {
@@ -64,7 +64,7 @@ class Horde_Core_Auth_Ldap extends Horde_Auth_Ldap
      */
     public function removeUser($userId)
     {
-        list($userId, $credentials) = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth()->runHook($userId, array(), 'preauthenticate', 'admin');
+        list($userId, $credentials) = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create()->runHook($userId, array(), 'preauthenticate', 'admin');
 
         parent::removeUser($userId, isset($credentials['ldap']) ? $credentials['ldap']['dn'] : null);
     }
index 17f6e79..d5c1cb3 100644 (file)
@@ -25,7 +25,7 @@ class Horde_Core_Auth_Msad extends Horde_Auth_Msad
      */
     public function addUser($userId, $credentials)
     {
-        list($userId, $credentials) = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth()->runHook($userId, $credentials, 'preauthenticate', 'admin');
+        list($userId, $credentials) = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create()->runHook($userId, $credentials, 'preauthenticate', 'admin');
 
         parent::addUser($userId, $credentials);
     }
@@ -41,7 +41,7 @@ class Horde_Core_Auth_Msad extends Horde_Auth_Msad
      */
     public function updateUser($oldID, $newID, $credentials)
     {
-        list($oldId, $credentials) = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth()->runHook($oldId, $credentials, 'preauthenticate', 'admin');
+        list($oldId, $credentials) = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create()->runHook($oldId, $credentials, 'preauthenticate', 'admin');
 
         parent::updateUser($oldID, $newID, $credentials);
     }
@@ -55,7 +55,7 @@ class Horde_Core_Auth_Msad extends Horde_Auth_Msad
      */
     public function removeUser($userId)
     {
-        list($userId, $credentials) = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth()->runHook($userId, array(), 'preauthenticate', 'admin');
+        list($userId, $credentials) = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create()->runHook($userId, array(), 'preauthenticate', 'admin');
 
         parent::removeUser($userId, isset($credentials['ldap']) ? $credentials['ldap']['dn'] : null);
     }
diff --git a/framework/Core/lib/Horde/Core/Binder/Auth.php b/framework/Core/lib/Horde/Core/Binder/Auth.php
deleted file mode 100644 (file)
index 51731a8..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-/**
- * @category Horde
- * @package  Core
- */
-class Horde_Core_Binder_Auth implements Horde_Injector_Binder
-{
-    public function create(Horde_Injector $injector)
-    {
-        return new Horde_Core_Factory_Auth($injector);
-    }
-
-    public function equals(Horde_Injector_Binder $binder)
-    {
-        return false;
-    }
-
-}
diff --git a/framework/Core/lib/Horde/Core/Binder/AuthFactory.php b/framework/Core/lib/Horde/Core/Binder/AuthFactory.php
deleted file mode 100644 (file)
index a6c5925..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-/**
- * @category Horde
- * @package  Core
- */
-class Horde_Core_Binder_AuthFactory implements Horde_Injector_Binder
-{
-    public function create(Horde_Injector $injector)
-    {
-        return new Horde_Core_Factory_Auth($injector);
-    }
-
-    public function equals(Horde_Injector_Binder $binder)
-    {
-        return false;
-    }
-
-}
index 95f034c..873d1ff 100644 (file)
@@ -59,7 +59,7 @@ class Horde_Core_Factory_Auth
      * @return Horde_Auth_Base  The singleton instance.
      * @throws Horde_Auth_Exception
      */
-    public function getAuth($app = null)
+    public function create($app = null)
     {
         if (is_null($app)) {
             $app = 'horde';
index 7349d42..ee638fe 100644 (file)
@@ -287,7 +287,7 @@ class Horde_Core_Perms_Ui
         /* Users permissions. */
         $perm_val = $permission->getUserPermissions();
         $this->_form->setSection('users', _("Individual Users"), Horde::img('user.png'), false);
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
         if ($auth->hasCapability('list')) {
             /* The auth driver has list capabilities so set up an array which
              * the matrix field type will recognise to set up an enum box for
index a61b630..0572254 100644 (file)
@@ -250,7 +250,6 @@ class Horde_Registry
 
         /* Define binders. */
         $binders = array(
-            'Horde_Auth_Factory' => new Horde_Core_Binder_AuthFactory(),
             'Horde_Core_Auth_Signup' => new Horde_Core_Binder_AuthSignup(),
         );
 
@@ -1344,7 +1343,7 @@ class Horde_Registry
          * application auth != Horde admin auth. And there can *never* be
          * non-SHOW access to an application that requires authentication. */
         if (!$this->isAuthenticated(array('app' => $app, 'notransparent' => !empty($params['notransparent']))) &&
-            $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth($app)->requireAuth() &&
+            $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create($app)->requireAuth() &&
             ($perms != Horde_Perms::SHOW)) {
             return false;
         }
@@ -1758,7 +1757,7 @@ class Horde_Registry
             if (!$this->getAuth()) {
                 $this->getCleanSession();
             }
-            return $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth($app)->transparent();
+            return $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create($app)->transparent();
         }
 
         return false;
@@ -1828,7 +1827,7 @@ class Horde_Registry
         if (!isset($options['reason'])) {
             // TODO: This only returns the error for Horde-wide
             // authentication, not for application auth.
-            $options['reason'] = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth()->getError();
+            $options['reason'] = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create()->getError();
         }
 
         if (empty($options['app']) ||
@@ -1851,7 +1850,7 @@ class Horde_Registry
             $params['logout_reason'] = $options['reason'];
             if ($options['reason'] == Horde_Auth::REASON_MESSAGE) {
                 $params['logout_msg'] = empty($options['msg'])
-                    ? $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth()->getError(true)
+                    ? $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create()->getError(true)
                     : $options['msg'];
             }
         }
@@ -2087,7 +2086,7 @@ class Horde_Registry
      */
     public function checkExistingAuth()
     {
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
 
         if (!empty($GLOBALS['conf']['auth']['checkip']) &&
             !empty($_SESSION['horde_auth']['remoteAddr']) &&
index 69eda87..4ed31e1 100644 (file)
@@ -110,10 +110,7 @@ Application Framework.</description>
        </dir> <!-- /lib/Horde/Core/Autoloader/Callback -->
       </dir> <!-- /lib/Horde/Core/Autoloader -->
       <dir name="Binder">
-       <file name="Auth.php" role="php" />
-       <file name="AuthFactory.php" role="php" />
        <file name="AuthSignup.php" role="php" />
-       <file name="Vfs.php" role="php" />
       </dir> <!-- /lib/Horde/Core/Binder -->
       <dir name="Controller">
        <file name="NotFound.php" role="php" />
@@ -420,10 +417,7 @@ Application Framework.</description>
    <install as="Horde/Core/Auth/Signup/SqlObject.php" name="lib/Horde/Core/Auth/Signup/SqlObject.php" />
    <install as="Horde/Core/Autoloader/Callback/Mime.php" name="lib/Horde/Core/Autoloader/Callback/Mime.php" />
    <install as="Horde/Core/Autoloader/Callback/Nls.php" name="lib/Horde/Core/Autoloader/Callback/Nls.php" />
-   <install as="Horde/Core/Binder/Auth.php" name="lib/Horde/Core/Binder/Auth.php" />
-   <install as="Horde/Core/Binder/AuthFactory.php" name="lib/Horde/Core/Binder/AuthFactory.php" />
    <install as="Horde/Core/Binder/AuthSignup.php" name="lib/Horde/Core/Binder/AuthSignup.php" />
-   <install as="Horde/Core/Binder/Vfs.php" name="lib/Horde/Core/Binder/Vfs.php" />
    <install as="Horde/Core/Controller/NotFound.php" name="lib/Horde/Core/Controller/NotFound.php" />
    <install as="Horde/Core/Controller/RequestConfiguration.php" name="lib/Horde/Core/Controller/RequestConfiguration.php" />
    <install as="Horde/Core/Controller/RequestMapper.php" name="lib/Horde/Core/Controller/RequestMapper.php" />
index 8fcf830..0e8837c 100644 (file)
@@ -182,7 +182,7 @@ class Kolab_Resource
         $calendar_user = $conf['kolab']['filter']['calendar_id'] . '@' . $domain;
 
         /* Load the authentication libraries */
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth(isset($conf['auth']['driver']) ? null : 'kolab');
+        $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create(isset($conf['auth']['driver']) ? null : 'kolab');
         $authenticated = $auth->authenticate($calendar_user,
                                              array('password' => $conf['kolab']['filter']['calendar_pass']),
                                              false);
index 261a5a6..547f824 100644 (file)
@@ -115,7 +115,7 @@ class Horde_Rpc
         }
 
         // @TODO: inject this
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
         $serverVars = $this->_request->getServerVars();
         if ($serverVars['PHP_AUTH_USER']) {
             $user = $serverVars['PHP_AUTH_USER'];
index 7af46c9..157cad4 100644 (file)
@@ -818,7 +818,7 @@ class Horde_Rpc_Webdav extends Horde_Rpc
      */
     function check_auth($type, $username, $password)
     {
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
         return $auth->authenticate($username, array('password' => $password));
     }
 
index 82f3a06..f9616d3 100644 (file)
@@ -461,7 +461,7 @@ class SyncML_Backend_Horde extends SyncML_Backend {
      */
     function _checkAuthentication($username, $password)
     {
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
         return $auth->authenticate($username, array('password' => $password))
             ? $GLOBALS['registry']->getAuth()
             : false;
@@ -849,7 +849,7 @@ class SyncML_Backend_Horde extends SyncML_Backend {
         }
 
         /* Get an Auth object. */
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
 
         /* Make this user an admin for the time beeing to allow deletion of
          * user data. */
@@ -896,7 +896,7 @@ class SyncML_Backend_Horde extends SyncML_Backend {
     {
         /* Get an Auth object. */
         try {
-            $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+            $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
         } catch (Horde_Exception $e) {
             // TODO
         }
index 53db1c0..53441a1 100644 (file)
@@ -164,7 +164,7 @@ class SearchForm extends Horde_Form {
         $criteria = array();
         if ($perms->hasPermission('hermes:review', $GLOBALS['registry']->getAuth(), Horde_Perms::SHOW)) {
             if (!empty($info['employees'])) {
-                $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+                $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
                 if (!$auth->hasCapability('list')) {
                     $criteria['employee'] = explode(',', $info['employees']);
                 } else {
index 23da1c4..3d6453f 100644 (file)
@@ -285,7 +285,7 @@ class TimeReviewForm extends TimeForm {
         $employees = array();
 
         require_once 'Horde/Identity.php';
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
         $users = $auth->listUsers();
         if (!is_a($users, 'PEAR_Error')) {
             foreach ($users as $user) {
index a39bea0..6ce80d0 100644 (file)
@@ -163,7 +163,7 @@ class Hermes {
      */
     public static function getEmployeesType($enumtype = 'multienum')
     {
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
         if (!$auth->hasCapability('list')) {
             return array('text', array());
         }
index f193659..309a8a5 100644 (file)
@@ -12,7 +12,7 @@ require_once dirname(__FILE__) . '/../lib/Application.php';
 Horde_Registry::appInit('horde', array('admin' => true));
 
 $groups = $injector->getInstance('Horde_Group');
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 
 $form = null;
 $reload = false;
index d3fb78e..932fb94 100644 (file)
@@ -12,7 +12,7 @@ require_once dirname(__FILE__) . '/../lib/base.php';
 Horde_Registry::appInit('horde', array('authentication' => 'none'));
 
 // Make sure signups are enabled before proceeding
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 if ($conf['signup']['allow'] !== true ||
     !$auth->hasCapability('add')) {
     throw new Horde_Exception(_("User Registration has been disabled for this site."));
index b340f17..1833110 100644 (file)
@@ -11,7 +11,7 @@
 require_once dirname(__FILE__) . '/../lib/Application.php';
 Horde_Registry::appInit('horde', array('admin' => true));
 
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 
 if ($conf['signup']['allow'] && $conf['signup']['approve']) {
     $signup = $injector->getInstance('Horde_Core_Auth_Signup');
index bb49fc1..440016a 100644 (file)
@@ -95,7 +95,7 @@ class Horde_Prefs_Ui
 
         /* Hide appropriate prefGroups. */
         try {
-            $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth()->hasCapability('update');
+            $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create()->hasCapability('update');
         } catch (Horde_Exception $e) {
             $ui->suppressGroups[] = 'forgotpass';
         }
index a75729f..3788de6 100644 (file)
@@ -68,7 +68,7 @@ if (!$is_auth) {
 }
 
 /* Get an Auth object. */
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth(($is_auth && $vars->app) ? $vars->app : null);
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create(($is_auth && $vars->app) ? $vars->app : null);
 
 /* Build the list of necessary login parameters. */
 $loginparams = array(
index a20fd42..bdc8ac9 100644 (file)
@@ -11,7 +11,7 @@
 require_once dirname(__FILE__) . '/../lib/Application.php';
 Horde_Registry::appInit('horde', array('authentication' => 'none'));
 
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 
 // Check for COOKIE auth.
 if (empty($_COOKIE['user']) ||
index bfbe09b..3d8e52a 100644 (file)
@@ -11,7 +11,7 @@
 require_once dirname(__FILE__) . '/../lib/Application.php';
 Horde_Registry::appInit('horde', array('authentication' => 'none'));
 
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 
 // Check for GET auth.
 if (empty($_GET['user']) ||
index 552cee9..1847f45 100644 (file)
@@ -11,7 +11,7 @@
 require_once dirname(__FILE__) . '/../lib/Application.php';
 Horde_Registry::appInit('horde');
 
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 
 // Check for HTTP auth.
 if (empty($_SERVER['PHP_AUTH_USER']) ||
index 25d571d..c2be25f 100644 (file)
@@ -12,7 +12,7 @@ require_once dirname(__FILE__) . '/../lib/Application.php';
 Horde_Registry::appInit('horde', array('nologintasks' => true));
 
 // Make sure auth backend allows passwords to be reset.
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 if (!$auth->hasCapability('update')) {
     $notification->push(_("Changing your password is not supported with the current configuration.  Contact your administrator."), 'horde.error');
     Horde::getServiceLink('login')->add('url', Horde_Util::getFormData('url'))->redirect();
index 374cc1f..1b22a8c 100644 (file)
@@ -12,7 +12,7 @@ require_once dirname(__FILE__) . '/../lib/Application.php';
 Horde_Registry::appInit('horde', array('authentication' => 'none'));
 
 // Make sure auth backend allows passwords to be reset.
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 if (!$auth->hasCapability('resetpassword')) {
     $notification->push(_("Cannot reset password automatically, contact your administrator."), 'horde.error');
     Horde::getServiceLink('login')->add('url', Horde_Util::getFormData('url'))->redirect();
index 1a6c747..abf0cf1 100644 (file)
@@ -26,7 +26,7 @@ $fieldsList = array(
 $app = Horde_Util::getFormData('app');
 $shares = $injector->getInstance('Horde_Core_Factory_Share')->create($app);
 $groups = $injector->getInstance('Horde_Group');
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 $help = $registry->hasMethod('shareHelp', $app)
     ? $registry->callByPackage($app, 'shareHelp')
     : null;
index d4e505e..b68906d 100644 (file)
@@ -11,7 +11,7 @@
 require_once dirname(__FILE__) . '/lib/Application.php';
 Horde_Registry::appInit('horde', array('authentication' => 'none'));
 
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 
 // Make sure signups are enabled before proceeding
 if ($conf['signup']['allow'] !== true ||
index 64deb90..afc3140 100644 (file)
@@ -35,7 +35,7 @@ class Koward {
         $this->registry     = &$registry;
         $this->notification = &$notification;
 
-        $this->auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+        $this->auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
 
         $this->conf       = Horde::loadConfiguration('conf.php', 'conf');
         $this->objects    = Horde::loadConfiguration('objects.php', 'objects');
index 4af5c38..2fe7ccc 100644 (file)
@@ -81,7 +81,7 @@ class Koward_Cli extends Horde_Controller_Request_Base
 
         /* Authenticate the user if possible. */
         if ($this->_argv->user) {
-            $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+            $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
             if (!$auth->authenticate($this->_argv->user,
                                      array('password' => $this->_argv->pass))) {
                 throw new InvalidArgumentException('Failed to log in!');
index ae9f25c..0b98afe 100644 (file)
@@ -38,7 +38,7 @@ if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ))
                    sprintf(_("Permission denied for the requested feed (%s)."),
                            htmlspecialchars($calendar)));
     } else {
-        $auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+        $auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
         if (isset($_SERVER['PHP_AUTH_USER'])) {
             $user = $_SERVER['PHP_AUTH_USER'];
             $pass = $_SERVER['PHP_AUTH_PW'];
index a47b873..3369957 100644 (file)
@@ -1725,7 +1725,7 @@ class Kronolith
      */
     public static function readPermsForm($share)
     {
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
         $perm = $share->getPermission();
         $errors = array();
 
index 68f96a2..7d27aa2 100644 (file)
@@ -23,7 +23,7 @@ if (!empty($conf['share']['no_sharing'])) {
 
 $shares = $injector->getInstance('Horde_Core_Factory_Share')->create();
 $groups = $injector->getInstance('Horde_Group');
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 
 $reload = false;
 $actionID = Horde_Util::getFormData('actionID', 'edit');
index 68c4cb1..e3e4b64 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-$auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
 $horde_groups = $GLOBALS['injector']->getInstance('Horde_Group');
 
 $groups = array();
index cb18050..8f097b5 100755 (executable)
@@ -33,7 +33,7 @@ if (!$sure) {
 // get the list of all users if we can.  If your site
 // has a *large* number of users, you may want to comment
 // out this section to avoid unnecessary overhead.
-$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+$auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
 if ($auth->hasCapability('list')) {
     $users = $auth->listUsers();
 }
index 2bafccc..a88ae32 100644 (file)
@@ -22,7 +22,7 @@ class AddUserForm extends Horde_Form {
 
         global $conf, $whups_driver;
 
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
         if ($auth->hasCapability('list')) {
             $queue = $vars->get('queue');
             $current = $whups_driver->getQueueUsers($queue);
index 8a40f5f..a04a4b1 100644 (file)
@@ -208,7 +208,7 @@ class Whups_Mail {
      */
     static protected function _findAuthUser($from)
     {
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create();
 
         if ($auth->hasCapability('list')) {
             foreach ($auth->listUsers() as $user) {
index d73f2e9..7f4ce54 100755 (executable)
@@ -77,7 +77,7 @@ foreach ($opts as $opt) {
 
 // Login to horde if username & password are set.
 if (!empty($username) && !empty($password)) {
-    $auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
+    $auth = $injector->getInstance('Horde_Core_Factory_Auth')->create();
     if (!$auth->authenticate($username, array('password' => $password))) {
         $error = _("Login is incorrect.");
         Horde::logMessage($error, 'ERR');