* @license http://www.gnu.org/licenses/gpl-2.0.txt GPL, version 2 * @author Icinga Development Team */ // {{{ICINGA_LICENSE_HEADER}}}} namespace Icinga\Authentication; use \Zend_Config; use \Icinga\User; use Icinga\Authentication\Credential; /** * Public api for an user backend object */ interface UserBackend { /** * Create a new object * * @param Zend_Config $config Object to configure instance */ public function __construct(Zend_Config $config); /** * Test if the username exists * * @param Credential $credentials * * @return bool */ public function hasUsername(Credential $credentials); /** * Authenticate * * @param Credential $credentials * * @return User */ public function authenticate(Credential $credentials); /** * Name of the backend * * @return string */ public function getName(); /** * Get the number of users available through this backend * * @return int */ public function getUserCount(); }