2013-06-07 11:44:37 +02:00
|
|
|
<?php
|
2013-06-10 17:03:01 +02:00
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}}
|
2013-06-07 11:44:37 +02:00
|
|
|
|
|
|
|
namespace Icinga\Authentication;
|
|
|
|
|
2013-06-10 13:28:54 +02:00
|
|
|
interface UserBackend
|
2013-06-07 11:44:37 +02:00
|
|
|
{
|
2013-06-25 12:24:52 +02:00
|
|
|
/**
|
|
|
|
* Creates a new object
|
|
|
|
* @param $config
|
|
|
|
*/
|
2013-06-10 13:28:54 +02:00
|
|
|
public function __construct($config);
|
2013-06-07 11:44:37 +02:00
|
|
|
|
2013-06-25 12:24:52 +02:00
|
|
|
/**
|
|
|
|
* Test if the username exists
|
|
|
|
* @param Credentials $credentials
|
|
|
|
* @return boolean
|
|
|
|
*/
|
2013-06-10 13:28:54 +02:00
|
|
|
public function hasUsername(Credentials $credentials);
|
2013-06-07 11:44:37 +02:00
|
|
|
|
2013-06-25 12:24:52 +02:00
|
|
|
/**
|
|
|
|
* Authenticate
|
|
|
|
* @param Credentials $credentials
|
|
|
|
* @return User
|
|
|
|
*/
|
2013-06-10 13:28:54 +02:00
|
|
|
public function authenticate(Credentials $credentials);
|
2013-06-07 11:44:37 +02:00
|
|
|
}
|