2001-01-11 10:52:33 +01:00
|
|
|
<?php
|
2010-01-28 05:22:37 +01:00
|
|
|
/**
|
2016-03-06 21:47:10 +01:00
|
|
|
* EGroupware API - Authentication backend interface
|
2010-01-28 05:22:37 +01:00
|
|
|
*
|
|
|
|
* @link http://www.egroupware.org
|
2016-03-06 21:47:10 +01:00
|
|
|
* @author Ralf Becker <ralfbecker@outdoor-training.de>
|
2010-01-28 05:22:37 +01:00
|
|
|
* @license http://opensource.org/licenses/lgpl-license.php LGPL - GNU Lesser General Public License
|
|
|
|
* @package api
|
|
|
|
* @subpackage authentication
|
|
|
|
* @version $Id$
|
|
|
|
*/
|
2001-01-11 10:52:33 +01:00
|
|
|
|
2016-03-06 21:47:10 +01:00
|
|
|
namespace EGroupware\Api\Auth;
|
|
|
|
|
2010-01-28 05:22:37 +01:00
|
|
|
/**
|
2016-03-06 21:47:10 +01:00
|
|
|
* Interface for authentication backend
|
2010-01-28 05:22:37 +01:00
|
|
|
*/
|
2016-03-06 21:47:10 +01:00
|
|
|
interface Backend
|
2010-01-28 05:22:37 +01:00
|
|
|
{
|
|
|
|
/**
|
2016-03-06 21:47:10 +01:00
|
|
|
* password authentication against password stored in sql datababse
|
2010-01-28 05:22:37 +01:00
|
|
|
*
|
|
|
|
* @param string $username username of account to authenticate
|
|
|
|
* @param string $passwd corresponding password
|
2016-03-06 21:47:10 +01:00
|
|
|
* @param string $passwd_type ='text' 'text' for cleartext passwords (default)
|
2010-01-28 05:22:37 +01:00
|
|
|
* @return boolean true if successful authenticated, false otherwise
|
|
|
|
*/
|
2016-03-06 21:47:10 +01:00
|
|
|
function authenticate($username, $passwd, $passwd_type='text');
|
2010-01-28 05:22:37 +01:00
|
|
|
|
|
|
|
/**
|
2016-03-06 21:47:10 +01:00
|
|
|
* changes password in sql datababse
|
2010-01-28 05:22:37 +01:00
|
|
|
*
|
2016-03-06 21:47:10 +01:00
|
|
|
* @param string $old_passwd must be cleartext
|
2010-01-28 05:22:37 +01:00
|
|
|
* @param string $new_passwd must be cleartext
|
|
|
|
* @param int $account_id account id of user whose passwd should be changed
|
2016-03-06 21:47:10 +01:00
|
|
|
* @throws Exception to give a verbose error, why changing password failed
|
2010-01-28 05:22:37 +01:00
|
|
|
* @return boolean true if password successful changed, false otherwise
|
|
|
|
*/
|
2016-03-06 21:47:10 +01:00
|
|
|
function change_password($old_passwd, $new_passwd, $account_id=0);
|
2010-01-28 05:22:37 +01:00
|
|
|
}
|