[ Index ]
 

Code source de Horde 3.1.3

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/Horde/Auth/ -> cyrus.php (sommaire)

(pas de description)

Poids: 337 lignes (12 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

Auth_cyrus:: (11 méthodes):
  Auth_cyrus()
  addUser()
  removeUser()
  _connect()
  _disconnect()
  _createSubFolder()
  listUsers()
  updateUser()
  _getLoginScreen()
  exists()
  transparent()


Classe: Auth_cyrus  - X-Ref

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:<pre>
'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)</pre>

Optional values:<pre>
'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.</pre>

Example Usage:<pre>
$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';
}
}</pre>

$Horde: framework/Auth/Auth/cyrus.php,v 1.15.10.14 2006/08/14 02:48:48 chuck Exp $

Copyright 2002-2006 Ilya <mail@krel.org>
Copyright 2003-2006 Mike Cochrane <mike@graftonhall.co.nz>

See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Auth_cyrus($params = array()   X-Ref
Constructor.

param: array $params  A hash containing connection parameters.

addUser($userId, $credentials)   X-Ref
Add a set of authentication credentials.

param: string $userId       The userId to add.
param: array  $credentials  The credentials to add.
return: mixed  True on success or a PEAR_Error object on failure.

removeUser($userId)   X-Ref
Delete a set of authentication credentials.

param: string $userId  The userId to delete.
return: boolean        Success or failure.

_connect()   X-Ref
Attempts to open connections to the SQL and IMAP servers.

return: mixed  True on success or a PEAR_Error object on failure.

_disconnect()   X-Ref
Disconnect from the IMAP server.

return: boolean  True on success, false on failure.

_createSubFolder($userName, $folderName)   X-Ref
Creates a mailboxes supplied in configuration

param: string $userName   For whom the folder will be created
param: string $folderName Name of folder to create

listUsers()   X-Ref
List all users in the system.

return: mixed  The array of userIds, or false on failure/unsupported.

updateUser($oldID, $newID, $credentials)   X-Ref
Update a set of authentication credentials.

param: string $oldID       The old userId.
param: string $newID       The new userId.
param: array $credentials  The new credentials
return: mixed  True on success or a PEAR_Error object on failure.

_getLoginScreen($app = 'horde', $url = '')   X-Ref
Return the URI of the login screen for this authentication method.

param: string $app  The application to use.
param: string $url  The URL to redirect to after login.
return: string  The login screen URI.

exists($userId)   X-Ref
Checks if a userId exists in the sistem.

return: boolean  Whether or not the userId already exists.

transparent()   X-Ref
Automatic authentication: Find out if the client matches an allowed IP
block.

return: boolean  Whether or not the client is allowed.



Généré le : Sun Feb 25 18:01:28 2007 par Balluche grâce à PHPXref 0.7