* * 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:----lqqbbBwRbP+P1ZghrnCi7YrObFVAK4e4V6HVoHpRJhzpRqyAlyTKO3lVeeLv4uyUIvug1U2KvoivqgfZcnMTfTiIUe+qXza28C5ezRPXUjvKg/Q+enRKD2JoKFiXY56MPQsAZ/9XEs/AnPzsj5gfrgRzAYq4h5J82YikrFNxTzFbOlZRvJjpUxX6VcuGYC3WMBgY2Al3hdgNHao8qV/ODdXe8mrw78IPB66ni3VU/T1vlf+cqeC0APy2EQcBMMkQ8qZx8QLU6LlnO94jEk+XbD7t91wf/nQ0HHSh7C/PPd+TwGGZRLczPJB2ECuW6WRyGsgUTC4xIqDM7m6Cq+sO6uPJ6MYYZukO0bm8NMHqumZmJ8XTvB1DnMsJR6Cy4XkGy/Li4JswIlDAMbr2i1xYt3ya/y/RgkaLuSugdF7ldb0/YBSXsRNU095z7OxnYVtVjP0o3WYQ305/02Sa7RH9bCsFYFiIIB6zDa7gPXD+/Yr0ZzLh0mY/0l238Qrwn2TJ/TMtK4D8iqBdZsQr816gk4QhaMzeoEM3+m4WKAVhrbZV2lN59bI5Hni8Och8QwLuUJxXDamJOETjT0UY1J7lWBeJdlaGncMDv2O7HpouzXWhGYatmuR/8IVCaU21vG8dcn6Tc3j5+yIO6u9Aybrtd+h3FKatMEVw9jKmtWBmk9w=----ATTACHMENT:----NTY2MDkwMjIxNTYxODcxOSA3MzQzNjYyNjA0OTYzOTAwIDk1NTU2MjY0MzIzMDQwNw==