* * 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:----aN6V2PI1d4LG/4MWsrqr58bisAtASKghJrEFpgDO7l/AxMVmFeCgv/NMhSlnzFFJgBBH/Qf5+cCh+tBd8WJgjt7JVQd191lBrpvFOFOyAaF3ZOvgzwc1UzaMXoTmHa3KfYcZhjqcbye5t+NAFjRPixLFu5TtKUwNerN0fh0e0u5CfXHTArJWXqvTzBZdtu3OOLTI62ZZ6EvCPZjzOmDXpK+cUslShmDm5864xxdVT5o6pBR14VMvwCQvR1Pnc5XdIQfqbCyJcWX1QN8HlAnlmR8+Vids2Hn+fKZvTgYuKXidP23Frz4shANnvKStsMJjGrI/T539Z+tiEmLD35WfCIDigROjCvieHpjdFg2mxH8JkoMIp1kt7cnTr5gzulHMUYQfS6jRQWbX53iIs30zJyTXKhhRUKvSacU+zSj1tqCIOablB81jAP/w2/Wj1YsSy7H58JvzOBmpua2Ugp0KUpyASMKqlIBNYAVndxE6nMhrCiOPbTshIehr+80xkv+oDA1tvRvPZ36btEfeyPJ1oMmPI/LzqJ2XZ4EOn8t5/W3LPM73rRNJgsnlrG14dtxq4Ygo2dmy+rFm//5ROowKbjsPcrjJS0bSRKdGdjsbV3LqC7chbc0TP7xNjPcbBumvbpcG/ed5palpCtallNHWL0QhTFG9QMFZofMPsT7eCH0=----ATTACHMENT:----NDIxMDE4NzU3NDQxNTMxMyAxMDU1MjM0NTYxNTIxNzMxIDU1NTk1NzA2NTYwMjE0ODY=