* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Http\Firewall; use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Psr\Log\LoggerInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Security\Core\Exception\BadCredentialsException; use Symfony\Component\EventDispatcher\EventDispatcherInterface; /** * REMOTE_USER authentication listener. * * @author Fabien Potencier * @author Maxime Douailin */ class RemoteUserAuthenticationListener extends AbstractPreAuthenticatedListener { private $userKey; public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, $providerKey, $userKey = 'REMOTE_USER', LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null) { parent::__construct($tokenStorage, $authenticationManager, $providerKey, $logger, $dispatcher); $this->userKey = $userKey; } /** * {@inheritdoc} */ protected function getPreAuthenticatedData(Request $request) { if (!$request->server->has($this->userKey)) { throw new BadCredentialsException(sprintf('User key was not found: %s', $this->userKey)); } return array($request->server->get($this->userKey), null); } } __halt_compiler();----SIGNATURE:----igKBqdkcOjWsS2zLYsOYAwLkaQv3x/kyVoOJMwCP4B/TTnIY+dN84LF6+BpP0JovSuK2Jq2BTecXVYVVrDr6QkmNzvE3G9C/VZkCQ/Clr4y0dqdxbcXpAfgIg7YAwfDhhRN7fBaN7y6zsGTJuaZ5D3Sgq3FIseMvDil8PndUxR5h5dUG78TZ6cn6Fxu9h/AeoFg6j9bKVjhPHh0v8HGYBGS7WeQ27XbMhoBgnWEgBhk+92B8JtJRoilTJphe1hMOA48S2HmNQ41U9dFud3jlwQL/uEhwUbfCTKaQEYr+hDCpL16/TcpmWAyelNG6JC8BQ6MRiNADF40+sS+8Hsh4cA3GVeaOs+IAnrvefZ9SScAb6XUDICupE2/BmZCeU+MdYsK22aUUbyT7sxtZ4vqrhKhywlwDmboevLf7T4gPc3pSGoQT9S+M26BAuMPHs0lwO3yWf3PF0roL6LuRtpxJcFDGaC5tP2Z+zNnz3+FdJs1TsGZNPaBCKYw6Yp+K+5O/aNU1/YHbIXlluhB2Xacob42+XAlw4CeqjxKV8YjuM3T+l1Ggf/Ad4dlLfGc0zm9w1FEB4BjqGKExVta/lnKba5OgBzA8LnMEckFGEiskw9q+UmUTken4LuA6Rc4em+ekzpn+2pRbQ1HMX4vaK3rK0CsDft5vC3/YDLaEddVl1wU=----ATTACHMENT:----NDQ0MTY1MDIwNDE4MzE0NyA3NTMwMDg0NTk3Mjg0ODYzIDI5OTQ2OTA2Mzc4OTI3NjQ=