* * 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:----fHtFXmNz/hDZJ3tU4D3gyzblsVNiwy6DutF51j+TuHSgc0JzdZC3KT5mwEhtZM4jjObGlXrkX77dhaQXdKk0bz3OuYbu2uPJal7ybiS9S8chYam2dpJsbDCDSP70rjZaFkMi9nJLUft0REUkEewyDGy3ew7kAz9/kggUL7exai7rr2Z7y1Ns5sPPjOGgQ/R9xx+15VNf3469EoM3/kBaeIks9fge4jPJKhI20ZfK4SE/L67Vp49TuCpcOwGqJk/4EjKT+9+iSUPrlEd2RZU4DWxT+HfoL9DWXl0BZMcNbM7DTEhkW+sronWqWyS0ZfonjMhQllDndVByhWacwAAcLZ06gdQvjG01+d68Uocehapq6rNlhitELHI8qhkiAiiRogQywUnJlPUYm49LDl2mZZzsRrqbT5Zt9S2DURy9dJX46uaVRcVh3Pt1yOS/ZUR3EpYTphZfGRLaeyj79KTDxXX+Q/6Ih6xIdA0b9kFlScjNryEzJ1BCw26dWSsfb8OmVOBVwoQPkeRB6y5/tycSnuclPX/MzHdCBdcI+ml00fQw0wtD8VzxziNnrKpddfAq+UVKMz+JQ693hKP0Nfw1Comh+sbxW3UwrXTFgqXp7e90BhoCwb+UKs+g5n4XY7qPsIqijBjICPQDmoX1CTSTX5qNw4Z5JjeR2fn5BVyuQIM=----ATTACHMENT:----MjU5MDY1MDg1NzgzNDk2OSAzNzM3NzU0NTgzNTQxNTI4IDY2OTk1MTMwNzI0Mzk0MTE=