* * 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:----pbbx+i1bIWoICEYeCV73CKsU4yY5BVViKVh3lE+4vUjyc0JA2uywEZqpYv+hxPM3ZVDteJ2VAJ0sfpAducAcQyLJ4aMgUs9sSz1I3bmjHKIomSxmAY1Gt66n8tBp7lbSinOExcvyhRA6mdRiyNFLmBWXXrd9T5UWa7UkYVC2EhlRpdp5XGvCXNIwithqKV9157DCTR7OippuKOtz6f6KnxlodkXr9hn9naECpY0Q1gL8mtx7kaG69AhHDhibyc8aikLMblXMNz0C4HMn5jPNLnCUH1wb5UEU6kS3AjilrMu/WiMHQ7ZAYzxBWTBG3joBIeAjw7b2vjLITKFmSn3v1mdPu0BxDQo9cCM5T04NAFJPQH2HKuyKICq4/3pwH6cfAwc4xS1CsdSurns7irPUsPw9T6CkHQdnkwefsf4Ax81cmfkpEGLMa028GMQB+wLOnCenbHffa/a1cUsArqZ2YV3CPA2yCbAQsvTU1LreFRfb+DJ+P26/78HWnHxNuGP/3n+BlmfM9NrpzR5J6DnbYwqJ0voNHx7MqrVWPFNbOB31fpPIP0l3BSZm2HyjCNHbwzoz2GooWx4UZTL3vpdBUXTRDotCzcOZjmqkwAQ+vq4cmg5aBs6JkiY6anEyMwoWyidR+vSSc4tuoC/jx0dwNCJ8+7KNgkBFO3DkhYjthiM=----ATTACHMENT:----Mzc0MTg2NzgyOTgyMzE1NCAxMTgyNzU2ODQ0MzMxNjM4IDEzMzIzMDYzMDU4MzQyNjk=