Class Auth_cyrus

Description

The Auth_cyrus class provides horde with the ability of administrating a Cyrus mail server authentications against another backend that Horde can update (eg SQL or LDAP).

Required parameters:

   'cyradmin'   The username of the cyrus administrator
   'cyrpass'    The password for the cyrus administrator
   'imap_dsn'   The full IMAP DSN (i.e.
   'backend'    The complete hash for the Auth_* driver that cyrus
                authenticates against (eg SQL, LDAP).
   'separator'  Hierarchy separator to use (e.g., is it user/mailbox or
                user.mailbox)

Optional values:

   'unixhier'   The value of imapd.conf's unixhierarchysep setting.
                Set this to 'true' if the value is true in imapd.conf
   'folders'    An array of folders to create under username.
                Doesn't create subfolders by default.
   'quota'      The quota (in kilobytes) to grant on the mailbox.
                Does not establish quota by default.

Example Usage:

   $conf['auth']['driver'] = 'composite';
   $conf['auth']['params']['loginscreen_switch'] = '_horde_select_loginscreen';
   $conf['auth']['params']['admin_driver'] = 'cyrus';
   $conf['auth']['params']['drivers']['imp'] = array('driver' => 'application',
                                                     'params' => array('app' => 'imp'));
   $conf['auth']['params']['drivers']['cyrus'] = array('driver' => 'cyrus',
                                                       'params' => array('cyradmin' => 'cyrus',
                                                                         'cyrpass' => 'password',
                                                                         'separator' => '.',
                                                                         'imap_dsn' => '{maik.example.com/imap}'));
   $conf['auth']['params']['drivers']['cyrus']['params']['backend'] = array('driver' => 'sql',
                                                                            'params' => array('phptype' => 'mysql',
                                                                                              'hostspec' => 'database.example.com',
                                                                                              'protocol' => 'tcp',
                                                                                              'username' => 'username',
                                                                                              'password' => 'password',
                                                                                              'database' => 'mail',
                                                                                              'table' => 'accountuser',
                                                                                              'encryption' => 'md5-hex',
                                                                                              'username_field' => 'username',
                                                                                              'password_field' => 'password'));

   if (!function_exists('_horde_select_loginscreen')) {
       function _horde_select_loginscreen()
       {
           return 'imp';
       }
   }

$Horde: framework/Auth/Auth/cyrus.php,v 1.15.10.19 2009/01/06 15:22:49 jan Exp $

Copyright 2002-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://opensource.org/licenses/lgpl-license.php.

Located in /Auth/Auth/cyrus.php (line 67)

Auth
   |
   --Auth_cyrus
Variable Summary
Method Summary
 Auth_cyrus Auth_cyrus ([array $params = array()])
 mixed addUser (string $userId, array $credentials)
 boolean exists ( $userId)
 mixed listUsers ()
 boolean removeUser (string $userId)
 boolean transparent ()
 mixed updateUser (string $oldID, string $newID, array $credentials)
Variables
array $capabilities = array('add' => true,
'update' => true,
'resetpassword' => false,
'remove' => true,
'list' => false,
'groups' => false,
'transparent' => false)
(line 96)

An array of capabilities, so that the driver can report which operations it supports and which it doesn't.


Redefinition of:
Auth::$capabilities
An array of capabilities, so that the driver can report which operations it supports and which it doesn't.
Auth $_backend (line 88)

Pointer to another Auth_ backend that Cyrus authenticates against.

boolean $_connected (line 81)

Flag indicating if the IMAP connection is connected.

resource $_imapStream (line 74)

Handle for the current IMAP connection.

Inherited Variables

Inherited from Auth

Auth::$_authCredentials
Auth::$_params
Methods
Constructor Auth_cyrus (line 109)

Constructor.

Auth_cyrus Auth_cyrus ([array $params = array()])
  • array $params: A hash containing connection parameters.
addUser (line 147)

Add a set of authentication credentials.

  • return: True on success or a PEAR_Error object on failure.
mixed addUser (string $userId, array $credentials)
  • string $userId: The userId to add.
  • array $credentials: The credentials to add.

Redefinition of:
Auth::addUser()
Adds a set of authentication credentials.
exists (line 309)

Checks if a userId exists in the system.

  • return: Whether or not the userId already exists.
boolean exists ( $userId)
  • $userId

Redefinition of:
Auth::exists()
Checks if $userId exists in the system.
listUsers (line 270)

List all users in the system.

  • return: The array of userIds, or false on failure/unsupported.
mixed listUsers ()

Redefinition of:
Auth::listUsers()
Lists all users in the system.
removeUser (line 191)

Delete a set of authentication credentials.

  • return: Success or failure.
boolean removeUser (string $userId)
  • string $userId: The userId to delete.

Redefinition of:
Auth::removeUser()
Deletes a set of authentication credentials.
transparent (line 320)

Automatic authentication: Find out if the client matches an allowed IP block.

  • return: Whether or not the client is allowed.
boolean transparent ()

Redefinition of:
Auth::transparent()
Automatic authentication.
updateUser (line 284)

Update a set of authentication credentials.

  • return: True on success or a PEAR_Error object on failure.
mixed updateUser (string $oldID, string $newID, array $credentials)
  • string $oldID: The old userId.
  • string $newID: The new userId.
  • array $credentials: The new credentials

Redefinition of:
Auth::updateUser()
Updates a set of authentication credentials.

Inherited Methods

Inherited From Auth

 Auth::addHook()
 Auth::addLogoutParameters()
 Auth::addUser()
 Auth::authenticate()
 Auth::clearAuth()
 Auth::exists()
 Auth::factory()
 Auth::genRandomPassword()
 Auth::getAuth()
 Auth::getAuthDomain()
 Auth::getBareAuth()
 Auth::getCredential()
 Auth::getCryptedPassword()
 Auth::getDriver()
 Auth::getLoginScreen()
 Auth::getLogoutReason()
 Auth::getLogoutReasonString()
 Auth::getParam()
 Auth::getProvider()
 Auth::getSalt()
 Auth::hasCapability()
 Auth::isAdmin()
 Auth::isAuthenticated()
 Auth::isPasswordChangeRequested()
 Auth::listUsers()
 Auth::readSessionData()
 Auth::removeHook()
 Auth::removeUser()
 Auth::removeUserData()
 Auth::setAuth()
 Auth::setCredential()
 Auth::singleton()
 Auth::transparent()
 Auth::updateUser()
 Auth::_authenticate()
 Auth::_isAdmin()

Documentation generated on Sun, 30 Jan 2011 05:16:20 +0000 by phpDocumentor 1.4.3