2016-08-10 13:52:55 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Implementation of user authentication
|
|
|
|
*
|
2021-09-20 14:41:48 +00:00
|
|
|
* @category DMS
|
|
|
|
* @package SeedDMS
|
|
|
|
* @author Uwe Steinmann <uwe@steinmann.cx>
|
|
|
|
* @copyright 2010-2016 Uwe Steinmann
|
|
|
|
* @license GPL 2
|
|
|
|
* @version @package_version@
|
|
|
|
* @link https://www.seeddms.org
|
2016-08-10 13:52:55 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Abstract class to authenticate user
|
|
|
|
*
|
2021-09-20 14:41:48 +00:00
|
|
|
* @category DMS
|
|
|
|
* @package SeedDMS
|
|
|
|
* @author Uwe Steinmann <uwe@steinmann.cx>
|
|
|
|
* @copyright 2010-2016 Uwe Steinmann
|
|
|
|
* @license GPL 2
|
|
|
|
* @version Release: @package_version@
|
|
|
|
* @link https://www.seeddms.org
|
2016-08-10 13:52:55 +00:00
|
|
|
*/
|
2021-09-20 14:41:48 +00:00
|
|
|
abstract class SeedDMS_Authentication
|
|
|
|
{
|
2016-08-10 13:52:55 +00:00
|
|
|
/**
|
|
|
|
* Do Authentication
|
|
|
|
*
|
|
|
|
* This function must check the username and login. If authentication succeeds
|
|
|
|
* the user object otherwise false must be returned. If authentication fails
|
|
|
|
* the number of failed logins should be incremented and account disabled.
|
|
|
|
*
|
2021-09-20 14:41:48 +00:00
|
|
|
* @param string $username name of user to authenticate
|
|
|
|
* @param string $password password of user to authenticate
|
|
|
|
*
|
|
|
|
* @return object|false user object if authentication was successful
|
|
|
|
* otherwise false
|
2016-08-10 13:52:55 +00:00
|
|
|
*/
|
|
|
|
abstract function authenticate($username, $password);
|
|
|
|
}
|