* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Http\Util; use Symfony\Component\HttpFoundation\Session\SessionInterface; /** * Trait to get (and set) the URL the user last visited before being forced to authenticate. */ trait TargetPathTrait { /** * Sets the target path the user should be redirected to after authentication. * * Usually, you do not need to set this directly. * * @param SessionInterface $session * @param string $providerKey The name of your firewall * @param string $uri The URI to set as the target path */ private function saveTargetPath(SessionInterface $session, $providerKey, $uri) { $session->set('_security.'.$providerKey.'.target_path', $uri); } /** * Returns the URL (if any) the user visited that forced them to login. * * @param SessionInterface $session * @param string $providerKey The name of your firewall * * @return string */ private function getTargetPath(SessionInterface $session, $providerKey) { return $session->get('_security.'.$providerKey.'.target_path'); } /** * Removes the target path from the session. * * @param SessionInterface $session * @param string $providerKey The name of your firewall */ private function removeTargetPath(SessionInterface $session, $providerKey) { $session->remove('_security.'.$providerKey.'.target_path'); } } __halt_compiler();----SIGNATURE:----E6XXpaS4YtxG820VKUznjqZT+f6n7jIwGW+XdNoylW3mW/Wd3gTMr/n2utE+wdxBxPrLvLu5IuWfyrXkyRZeAVOVS9sfkoLc6iaC2MMox9VU8RUeFAGVFp6VLFu5iwKin9jihJN8WXoLLEn6x4b7fgMXxxhUkcwPP62YFTsZKcW2gi5NSqaLv8haXRaVt6yf3gCv85it+rpYPybiS0QuTu7P76NCi6Rxil+v/FjK1C2ga8nOfVUHqa2sTLqlZO9Q/+QohCj0k0DJs3JD8beGcnRdHzgQdIb7QuIAt8dWxogaltA17Y8XPT32cgQpImDlBVUGxBfD400nSlk3ZP0QRm0RqZdwpYu4ub/tHMZ9BVMH26n5w0O3guamU9OOB3p6zxfgkzoJrqHKvjGoujxBNkn2jfFvjbxkjggC9alVgfBl/6qL4woaNgngPA5RiWxwGHtPT29HA3/vjEFEW/HB/J3qDUZ4VGG0+gRMEMS//w48+Y6ZxxzjZzLcJRX0Wifx/G9+TpwvS325OgSjH/Y6Lh6zROdfRltrhnU791dvNRIYegBe4BKZP2aP27l9zAKBQ6KDxl5pAYwxyhECNcjcbekTXl9HilKjVRFDEf3ab1+7w44Bssk/YDU+LF3UGDcGnBgs0IK6b2fM4ZP/L8DBBlKE9ZZk0lRvQF7bNol+opQ=----ATTACHMENT:----MTI3NzgwNzYzMTY4Nzc5NCAzMDc4Mzc0MTkxMTQ0NzAwIDExMTAzNDQ4MzM5ODY5MTM=