parent
07849e0fea
commit
2a4e614b5e
library/Icinga/Authentication
|
@ -43,7 +43,7 @@ class AuthChain implements Iterator
|
||||||
/**
|
/**
|
||||||
* Rewind the chain
|
* Rewind the chain
|
||||||
*
|
*
|
||||||
* @return ConfigObject
|
* @return ConfigObject
|
||||||
*/
|
*/
|
||||||
public function rewind()
|
public function rewind()
|
||||||
{
|
{
|
||||||
|
@ -64,7 +64,7 @@ class AuthChain implements Iterator
|
||||||
/**
|
/**
|
||||||
* Return the key of the current user backend config
|
* Return the key of the current user backend config
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function key()
|
public function key()
|
||||||
{
|
{
|
||||||
|
@ -74,7 +74,7 @@ class AuthChain implements Iterator
|
||||||
/**
|
/**
|
||||||
* Move forward to the next user backend config
|
* Move forward to the next user backend config
|
||||||
*
|
*
|
||||||
* @return ConfigObject
|
* @return ConfigObject
|
||||||
*/
|
*/
|
||||||
public function next()
|
public function next()
|
||||||
{
|
{
|
||||||
|
@ -84,17 +84,17 @@ class AuthChain implements Iterator
|
||||||
/**
|
/**
|
||||||
* Check if the current user backend is valid, i.e. it's enabled and the config is valid
|
* Check if the current user backend is valid, i.e. it's enabled and the config is valid
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function valid()
|
public function valid()
|
||||||
{
|
{
|
||||||
if (!$this->config->valid()) {
|
if (! $this->config->valid()) {
|
||||||
// Stop when there are no more backends to check
|
// Stop when there are no more backends to check
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$backendConfig = $this->config->current();
|
$backendConfig = $this->config->current();
|
||||||
if ((bool) $backendConfig->get('disabled', false) === true) {
|
if ((bool) $backendConfig->get('disabled', false)) {
|
||||||
$this->next();
|
$this->next();
|
||||||
return $this->valid();
|
return $this->valid();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue