Ask for an auth factory if that's what is returned...
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 2 Oct 2010 22:30:48 +0000 (18:30 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sun, 3 Oct 2010 01:29:05 +0000 (21:29 -0400)
52 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/AuthFactory.php [new file with mode: 0644]
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 9eab759..cc49ce9 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')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 
 $form = null;
 $reload = false;
index 53391f5..8b7a7c7 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')->getAuth();
+    $auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
     if (!$auth->authenticate($username, array('password' => $password))) {
         $cli->fatal(_("Username or password is incorrect."));
     } else {
index 4e53cca..aa796dd 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')->getAuth();
+    $auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
     if (!$auth->authenticate($username, array('password' => $password))) {
         $error = _("Login is incorrect.");
         Horde::logMessage($error, 'ERR');
index 698609c..820f056 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')->getAuth();
+    $auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
     if (!$auth->authenticate($username, array('password' => $password))) {
         $cli->fatal(_("Username or password is incorrect."));
     } else {
index 897a754..cc6a9f9 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')->getAuth();
+        $auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
         if ($auth->authenticate($username,
                                 array('password' => $password))) {
             $cmd = 'list';
index 254681d..93a3681 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')->getAuth();
+    $auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
     if (!$auth->authenticate($username, array('password' => $password))) {
         $error = _("Login is incorrect.");
         Horde::logMessage($error, 'ERR');
index 323abad..623abac 100644 (file)
@@ -34,7 +34,7 @@ if ($registry->isAuthenticated()) {
 }
 
 // Make sure auth backend allows passwords to be reset.
-$auth = $injector->getInstance('Horde_Auth')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 if (!$auth->hasCapability('resetpassword')) {
     $notification->push(_("Cannot reset password automatically, contact your administrator."), 'horde.error');
     $registry->authenticateFailure('folks');
index 1869f87..75ead72 100644 (file)
@@ -12,7 +12,7 @@
 
 require_once dirname(__FILE__) . '/tabs.php';
 
-$auth = $injector->getInstance('Horde_Auth')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 
 // Make sure signups are enabled before proceeding
 if ($conf['signup']['allow'] !== true ||
index a396700..8799c20 100644 (file)
@@ -13,7 +13,7 @@
 $folks_authentication = 'none';
 require_once dirname(__FILE__) . '/../lib/base.php';
 
-$auth = $injector->getInstance('Horde_Auth')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 
 $vars = Horde_Variables::getDefaultVariables();
 $tabs = new Horde_Core_Ui_Tabs('what', $vars);
index 06a2a9b..36cb93d 100644 (file)
@@ -16,7 +16,7 @@ require_once 'tabs.php';
 
 /*
 // Make sure auth backend allows passwords to be updated.
-$auth = $injector->getInstance('Horde_Auth')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 if (!$auth->hasCapability('resetpassword')) {
     $notification->push(_("Cannot update password, contact your administrator."), 'horde.error');
     $registry->authenticateFailure('folks');
index 2445a91..a0eb899 100644 (file)
@@ -220,7 +220,7 @@ class Folks_Friends {
         }
 
         // Check if users exits
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
         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')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
         if (!$auth->exists($friend)) {
             return PEAR::raiseError(sprintf(_("User \"%s\" does not exits"), $friend));
         }
index 4cbfc64..5d7c7c9 100644 (file)
@@ -13,7 +13,7 @@ require_once dirname(__FILE__) . '/lib/base.php';
 
 $shares = $injector->getInstance('Horde_Share_Factory')->getScope();
 $groups = $injector->getInstance('Horde_Group');
-$auth = $injector->getInstance('Horde_Auth')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 
 $reload = false;
 $actionID = Horde_Util::getFormData('actionID', 'edit');
index 36fb0f8..8963a13 100644 (file)
@@ -14,7 +14,7 @@
 $folks_authentication = 'none';
 require_once dirname(__FILE__) . '/../lib/base.php';
 
-$auth = $injector->getInstance('Horde_Auth')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 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 d735c1f..5855335 100644 (file)
@@ -14,7 +14,7 @@
 $folks_authentication = 'none';
 require_once dirname(__FILE__) . '/../lib/base.php';
 
-$auth = $injector->getInstance('Horde_Auth')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 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 4f3e00e..908911b 100644 (file)
@@ -14,7 +14,7 @@
 $folks_authentication = 'none';
 require_once dirname(__FILE__) . '/../lib/base.php';
 
-$auth = $injector->getInstance('Horde_Auth')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 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 d2690fb..a17d8e5 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')->getAuth();
+    $auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
     if (!$auth->authenticate($username, array('password' => $password))) {
         $error = _("Login is incorrect.");
         Horde::logMessage($error, 'ERR');
index 5aab09e..64f066f 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')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
 
         return $auth->authenticate($username, array('password' => $password));
     }
index a2fef38..d1abfd6 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')->getAuth()->runHook($userId, $credentials, 'preauthenticate', 'admin');
+        list($userId, $credentials) = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth()->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')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
 
         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')->getAuth()->runHook($userId, array(), 'preauthenticate', 'admin');
+        list($userId, $credentials) = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth()->runHook($userId, array(), 'preauthenticate', 'admin');
 
         parent::removeUser($userId, isset($credentials['ldap']) ? $credentials['ldap']['dn'] : null);
     }
index 34adb51..17f6e79 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')->getAuth()->runHook($userId, $credentials, 'preauthenticate', 'admin');
+        list($userId, $credentials) = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth()->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')->getAuth()->runHook($oldId, $credentials, 'preauthenticate', 'admin');
+        list($oldId, $credentials) = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth()->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')->getAuth()->runHook($userId, array(), 'preauthenticate', 'admin');
+        list($userId, $credentials) = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth()->runHook($userId, array(), 'preauthenticate', 'admin');
 
         parent::removeUser($userId, isset($credentials['ldap']) ? $credentials['ldap']['dn'] : null);
     }
diff --git a/framework/Core/lib/Horde/Core/Binder/AuthFactory.php b/framework/Core/lib/Horde/Core/Binder/AuthFactory.php
new file mode 100644 (file)
index 0000000..a6c5925
--- /dev/null
@@ -0,0 +1,18 @@
+<?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 3f5b280..1844199 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')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
         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 d2ae23f..7ed77f6 100644 (file)
@@ -267,7 +267,7 @@ class Horde_Registry
             'Horde_Ajax_Factory' => 'Horde_Core_Binder_AjaxFactory',
             'Horde_Ajax_Imple_Factory' => 'Horde_Core_Binder_ImpleFactory',
             'Horde_Alarm' => 'Horde_Core_Binder_Alarm',
-            'Horde_Auth' => 'Horde_Core_Binder_Auth',
+            'Horde_Auth_Factory' => 'Horde_Core_Binder_AuthFactory',
             // 'Horde_Browser' - initialized below
             'Horde_Cache_Factory' => 'Horde_Core_Binder_CacheFactory',
             'Horde_Core_Auth_Signup' => 'Horde_Core_Binder_AuthSignup',
@@ -1322,7 +1322,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')->getAuth($app)->requireAuth() &&
+            $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth($app)->requireAuth() &&
             ($perms != Horde_Perms::SHOW)) {
             return false;
         }
@@ -1790,7 +1790,7 @@ class Horde_Registry
             if (!$this->getAuth()) {
                 $this->getCleanSession();
             }
-            return $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth($app)->transparent();
+            return $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth($app)->transparent();
         }
 
         return false;
@@ -1860,7 +1860,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')->getAuth()->getError();
+            $options['reason'] = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth()->getError();
         }
 
         if (empty($options['app']) ||
@@ -1883,7 +1883,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')->getAuth()->getError(true)
+                    ? $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth()->getError(true)
                     : $options['msg'];
             }
         }
@@ -2119,7 +2119,7 @@ class Horde_Registry
      */
     public function checkExistingAuth()
     {
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
 
         if (!empty($GLOBALS['conf']['auth']['checkip']) &&
             !empty($_SESSION['horde_auth']['remoteAddr']) &&
index ad1a3b2..241d8b3 100644 (file)
@@ -111,7 +111,7 @@ Application Framework.</description>
       <dir name="Binder">
        <file name="AjaxFactory.php" role="php" />
        <file name="Alarm.php" role="php" />
-       <file name="Auth.php" role="php" />
+       <file name="AuthFactory.php" role="php" />
        <file name="AuthSignup.php" role="php" />
        <file name="CacheFactory.php" role="php" />
        <file name="Crypt.php" role="php" />
@@ -435,7 +435,7 @@ Application Framework.</description>
    <install as="Horde/Core/Autoloader/Callback/Nls.php" name="lib/Horde/Core/Autoloader/Callback/Nls.php" />
    <install as="Horde/Core/Binder/AjaxFactory.php" name="lib/Horde/Core/Binder/AjaxFactory.php" />
    <install as="Horde/Core/Binder/Alarm.php" name="lib/Horde/Core/Binder/Alarm.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/CacheFactory.php" name="lib/Horde/Core/Binder/CacheFactory.php" />
    <install as="Horde/Core/Binder/Crypt.php" name="lib/Horde/Core/Binder/Crypt.php" />
index 0079bbb..5d8f0c2 100644 (file)
@@ -185,7 +185,7 @@ class Kolab_Resource
         $calendar_user = $conf['kolab']['filter']['calendar_id'] . '@' . $domain;
 
         /* Load the authentication libraries */
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(isset($conf['auth']['driver']) ? null : 'kolab');
+        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth(isset($conf['auth']['driver']) ? null : 'kolab');
         $authenticated = $auth->authenticate($calendar_user,
                                              array('password' => $conf['kolab']['filter']['calendar_pass']),
                                              false);
index b56b99b..261a5a6 100644 (file)
@@ -115,7 +115,7 @@ class Horde_Rpc
         }
 
         // @TODO: inject this
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
         $serverVars = $this->_request->getServerVars();
         if ($serverVars['PHP_AUTH_USER']) {
             $user = $serverVars['PHP_AUTH_USER'];
index a9f533d..b41e109 100644 (file)
@@ -825,7 +825,7 @@ class Horde_Rpc_Webdav extends Horde_Rpc
      */
     function check_auth($type, $username, $password)
     {
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
         return $auth->authenticate($username, array('password' => $password));
     }
 
index 769a38b..96e258d 100644 (file)
@@ -477,7 +477,7 @@ class SyncML_Backend_Horde extends SyncML_Backend {
      */
     function _checkAuthentication($username, $password)
     {
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
         return $auth->authenticate($username, array('password' => $password))
             ? $GLOBALS['registry']->getAuth()
             : false;
@@ -865,7 +865,7 @@ class SyncML_Backend_Horde extends SyncML_Backend {
         }
 
         /* Get an Auth object. */
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
 
         /* Make this user an admin for the time beeing to allow deletion of
          * user data. */
@@ -912,7 +912,7 @@ class SyncML_Backend_Horde extends SyncML_Backend {
     {
         /* Get an Auth object. */
         try {
-            $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth();
+            $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
         } catch (Horde_Exception $e) {
             // TODO
         }
index 0dd4005..53db1c0 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')->getAuth();
+                $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
                 if (!$auth->hasCapability('list')) {
                     $criteria['employee'] = explode(',', $info['employees']);
                 } else {
index 11f3715..23da1c4 100644 (file)
@@ -285,7 +285,7 @@ class TimeReviewForm extends TimeForm {
         $employees = array();
 
         require_once 'Horde/Identity.php';
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
         $users = $auth->listUsers();
         if (!is_a($users, 'PEAR_Error')) {
             foreach ($users as $user) {
index 8bb9129..d2f0f5d 100644 (file)
@@ -163,7 +163,7 @@ class Hermes {
      */
     public static function getEmployeesType($enumtype = 'multienum')
     {
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
         if (!$auth->hasCapability('list')) {
             return array('text', array());
         }
index 60b828a..dfd3f16 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')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 
 $form = null;
 $reload = false;
index 8a4e642..d3fb78e 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')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 if ($conf['signup']['allow'] !== true ||
     !$auth->hasCapability('add')) {
     throw new Horde_Exception(_("User Registration has been disabled for this site."));
index ef5f6b1..2f857ee 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')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 
 if ($conf['signup']['allow'] && $conf['signup']['approve']) {
     $signup = $injector->getInstance('Horde_Core_Auth_Signup');
index 9faf6f5..c1e0e12 100644 (file)
@@ -95,7 +95,7 @@ class Horde_Prefs_Ui
 
         /* Hide appropriate prefGroups. */
         try {
-            $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth()->hasCapability('update');
+            $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth()->hasCapability('update');
         } catch (Horde_Exception $e) {
             $ui->suppressGroups[] = 'forgotpass';
         }
index 1d81797..9201ee3 100644 (file)
@@ -68,7 +68,7 @@ if (!$is_auth) {
 }
 
 /* Get an Auth object. */
-$auth = $injector->getInstance('Horde_Auth')->getAuth(($is_auth && $vars->app) ? $vars->app : null);
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth(($is_auth && $vars->app) ? $vars->app : null);
 
 /* Build the list of necessary login parameters. */
 $loginparams = array(
index 0267509..a20fd42 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')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 
 // Check for COOKIE auth.
 if (empty($_COOKIE['user']) ||
index cb6eded..bfbe09b 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')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 
 // Check for GET auth.
 if (empty($_GET['user']) ||
index a524321..552cee9 100644 (file)
@@ -11,7 +11,7 @@
 require_once dirname(__FILE__) . '/../lib/Application.php';
 Horde_Registry::appInit('horde');
 
-$auth = $injector->getInstance('Horde_Auth')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 
 // Check for HTTP auth.
 if (empty($_SERVER['PHP_AUTH_USER']) ||
index 8e91448..25d571d 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')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 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 3ee7d5e..beb59eb 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')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 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 1247ebb..816ede5 100644 (file)
@@ -26,7 +26,7 @@ $fieldsList = array(
 $app = Horde_Util::getFormData('app');
 $shares = $injector->getInstance('Horde_Share_Factory')->getScope($app);
 $groups = $injector->getInstance('Horde_Group');
-$auth = $injector->getInstance('Horde_Auth')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 $help = $registry->hasMethod('shareHelp', $app)
     ? $registry->callByPackage($app, 'shareHelp')
     : null;
index 1941edb..d4e505e 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')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 
 // Make sure signups are enabled before proceeding
 if ($conf['signup']['allow'] !== true ||
index ebce4d3..64deb90 100644 (file)
@@ -35,7 +35,7 @@ class Koward {
         $this->registry     = &$registry;
         $this->notification = &$notification;
 
-        $this->auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth();
+        $this->auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
 
         $this->conf       = Horde::loadConfiguration('conf.php', 'conf');
         $this->objects    = Horde::loadConfiguration('objects.php', 'objects');
index 520863a..4af5c38 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')->getAuth();
+            $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
             if (!$auth->authenticate($this->_argv->user,
                                      array('password' => $this->_argv->pass))) {
                 throw new InvalidArgumentException('Failed to log in!');
index 36d34a4..7ce6178 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')->getAuth();
+        $auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
         if (isset($_SERVER['PHP_AUTH_USER'])) {
             $user = $_SERVER['PHP_AUTH_USER'];
             $pass = $_SERVER['PHP_AUTH_PW'];
index 658ef65..965f243 100644 (file)
@@ -1721,7 +1721,7 @@ class Kronolith
      */
     public static function readPermsForm($share)
     {
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
         $perm = $share->getPermission();
         $errors = array();
 
index a2590c5..29c6150 100644 (file)
@@ -23,7 +23,7 @@ if (!empty($conf['share']['no_sharing'])) {
 
 $shares = $injector->getInstance('Horde_Share_Factory')->getScope();
 $groups = $injector->getInstance('Horde_Group');
-$auth = $injector->getInstance('Horde_Auth')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 
 $reload = false;
 $actionID = Horde_Util::getFormData('actionID', 'edit');
index 3ba9e5d..68c4cb1 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-$auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth();
+$auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
 $horde_groups = $GLOBALS['injector']->getInstance('Horde_Group');
 
 $groups = array();
index 5be8a75..cb18050 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')->getAuth();
+$auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
 if ($auth->hasCapability('list')) {
     $users = $auth->listUsers();
 }
index c72f119..2bafccc 100644 (file)
@@ -22,7 +22,7 @@ class AddUserForm extends Horde_Form {
 
         global $conf, $whups_driver;
 
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
         if ($auth->hasCapability('list')) {
             $queue = $vars->get('queue');
             $current = $whups_driver->getQueueUsers($queue);
index ff1ce4b..56cc913 100644 (file)
@@ -208,7 +208,7 @@ class Whups_Mail {
      */
     static protected function _findAuthUser($from)
     {
-        $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth();
+        $auth = $GLOBALS['injector']->getInstance('Horde_Auth_Factory')->getAuth();
 
         if ($auth->hasCapability('list')) {
             foreach ($auth->listUsers() as $user) {
index 9e40309..d73f2e9 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')->getAuth();
+    $auth = $injector->getInstance('Horde_Auth_Factory')->getAuth();
     if (!$auth->authenticate($username, array('password' => $password))) {
         $error = _("Login is incorrect.");
         Horde::logMessage($error, 'ERR');