芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/timucuy2124.gob.mx/libraries/vendor/joomla/authentication/src/Authentication.php
strategies[$strategyName] = $strategy; } /** * Perform authentication * * @param string[] $strategies Array of strategies to try - empty to try all strategies. * * @return string|boolean A string containing a username if authentication is successful, false otherwise. * * @since 1.0 * @throws \RuntimeException */ public function authenticate(array $strategies = []) { if (empty($strategies)) { $strategyObjects = $this->strategies; } else { $strategyObjects = []; foreach ($strategies as $strategy) { if (!isset($this->strategies[$strategy])) { throw new \RuntimeException('Authentication Strategy Not Found'); } $strategyObjects[$strategy] = $this->strategies[$strategy]; } } if (empty($strategyObjects)) { throw new \RuntimeException('No strategies have been set'); } /** @var AuthenticationStrategyInterface $strategyObject */ foreach ($strategyObjects as $strategy => $strategyObject) { $username = $strategyObject->authenticate(); $this->results[$strategy] = $strategyObject->getResult(); if (\is_string($username)) { return $username; } } return false; } /** * Get authentication results. * * Use this if you want to get more detailed information about the results of an authentication attempts. * * @return integer[] An array containing authentication results. * * @since 1.0 */ public function getResults() { return $this->results; } }