* * 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:----FaFw+OPk5X3XwLeIEjpfE2R0djDxTPlkANycuXKeET8MvXtBSZEjyQnIRV9lArQJJYn9PGC6rKIi90PymX7os3EQVA6w8Hp8zSAqvI52jK93tf6+RIeBuNNXN2FXpJoeLekiU85LHSHn3xcsjiESkZ5ZkHl4jae0izvjHOiXNMnihN4RLwhhHJGymFxEEPow5SG1Mys1mUApCqdEE0i9BLSFlBOwaEJGi4KHhDErzqcQ9rR1Cy8y2706KBcHZzku8TpTzCDkeuPvwv6h3GMQ5xC5xsUsXvLFvsDJgpdN3Rt9+YFlIghY93h/qd1BEAyuYvoSMsWFXPhuJDVDrjJYkokR7lQLmFyAOchmn1zw9zbDFM4jm661R2t67+a0OymPN4eZmjpFnYvc9tyhSq5i2bzLp0avSsEp6NpMAWTPLoA7QosAvmtwLhnQ4fs+lOkUztMWj9rTJrsEdmySvUHDnUrOt7GEt9ZM4pvQZ9as8MFLGKWUT3R+6tsweauwBFQxLlZHtLXah0k6heGT3H+XQE8vsP8k4mD9yLn4pYMHn35kOpQNoU2ZI6vQ1kD5BXgEaM2Id5Uj5Xd25PZjamB6DxKtwXWf1NYbqlMkyvy4ULGgW+AGcxYMKr1d0OpaHPwT7kQz2G8N5bu4GBkdhcipemdTBp+AS66bRktIHtYu454=----ATTACHMENT:----ODA2MTk5NzYyNzIwOTkzNiA1ODI0NTg2NTQ1NzA1OTA4IDE2MjI3MjUwNTU4MzA1MzU=