* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Http\EntryPoint; use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; /** * RetryAuthenticationEntryPoint redirects URL based on the configured scheme. * * This entry point is not intended to work with HTTP post requests. * * @author Fabien Potencier */ class RetryAuthenticationEntryPoint implements AuthenticationEntryPointInterface { private $httpPort; private $httpsPort; public function __construct($httpPort = 80, $httpsPort = 443) { $this->httpPort = $httpPort; $this->httpsPort = $httpsPort; } /** * {@inheritdoc} */ public function start(Request $request, AuthenticationException $authException = null) { $scheme = $request->isSecure() ? 'http' : 'https'; if ('http' === $scheme && 80 != $this->httpPort) { $port = ':'.$this->httpPort; } elseif ('https' === $scheme && 443 != $this->httpsPort) { $port = ':'.$this->httpsPort; } else { $port = ''; } $qs = $request->getQueryString(); if (null !== $qs) { $qs = '?'.$qs; } $url = $scheme.'://'.$request->getHost().$port.$request->getBaseUrl().$request->getPathInfo().$qs; return new RedirectResponse($url, 301); } } __halt_compiler();----SIGNATURE:----NZO/iTkQe1YGCr4ETTIuDz17oaPH4OlJM7+JzGq705cGCBeQeO7c6WFIfkxxQFoQP+Oqe37T4l1O4qAbhDcdFxX0pPhg3S5cKFlhqdf0QMG6jYsyPKbAjwT0MgBz+OmhzWPfEqzNYy4pfcdsTZ0ydkHAJ3OPmjFH//gePj3bqyRTnjocFaeKeZxJPtEkvxpXUQjI+iKECxbwhaRfkBa4SKhTrgOivClhONTY9/sgkMq/HAkE4NdWwyZTYqCxOp54TJ2xuRcX3suc6x3vtqg+9As6tHYKdipXV48/TEteY5PyTkuGQQ6Cibr+KCmIvYmEWtpMsu43SfY4qvl7n0A1dPB304bX5V6boNH7MrBrKH7hZU17sD2aMqDgY1Z/iHVb0VRXy0tqE0E2vxThXiVY7HTWsVlzUMWdp2UINZfYOxmtEFAXCdtMOerP2cL1wdL1SNQfMm8MZPo3Ymh/Tfg5n/XnDKT5ZkgeuYhiAHTzb1prDKjXsESiH59TLJm174lQ7wbYU0JqpnvBRzni/204cYxZOMtvdo/STkvDVgLWgOkhCELZt011U1lwq63Kd/WeLOmZjWoJjH/YFURcd/8B7wfe9Cbvq7RxFxvjrgZuWHSeV0VUNJdUeTmDHs00ovGFLg7Ifq4BDDLTYP3FeC9zhwwAiFk1xz0Udgrztc74wPQ=----ATTACHMENT:----OTI2NjY5MzEyMjk3NzI3MiA1MzE1OTc3MjE4ODgyMDczIDM2NjY3NTM2MDk4NTg2Njc=