* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Http\Session; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\HttpFoundation\Request; /** * The default session strategy implementation. * * Supports the following strategies: * NONE: the session is not changed * MIGRATE: the session id is updated, attributes are kept * INVALIDATE: the session id is updated, attributes are lost * * @author Johannes M. Schmitt */ class SessionAuthenticationStrategy implements SessionAuthenticationStrategyInterface { const NONE = 'none'; const MIGRATE = 'migrate'; const INVALIDATE = 'invalidate'; private $strategy; public function __construct($strategy) { $this->strategy = $strategy; } /** * {@inheritdoc} */ public function onAuthentication(Request $request, TokenInterface $token) { switch ($this->strategy) { case self::NONE: return; case self::MIGRATE: $request->getSession()->migrate(true); return; case self::INVALIDATE: $request->getSession()->invalidate(); return; default: throw new \RuntimeException(sprintf('Invalid session authentication strategy "%s"', $this->strategy)); } } } __halt_compiler();----SIGNATURE:----HW251APDCrKkNySml5rJXK0bsA/SlbX1BCDwFHBtsHaeizk96+mlaoi52QbutLV4fDbaWUjYeqw7g5MxdTUxyPyjFJuR3Z3ciizcsdt1ahHU0VQYOomW2EHHyvuqKyG8Zs83vC2rc0GsPHZGzORZHVeMBoe3TrNRLVdiqIrOXTjkEk0XUUtpCFIQkY3dHHDme73/WVXEgEwceBbtuPfnAWrt91233Ejt87YivGdoh0iXRt+YtDKFbZEd8h3ERSYd03P3N6dwWAQt80sUtqS6kpFESM0+OocER4lt/B9aBIVFrWnL9qH7DPtXue88CvDCpDEHVZV5BKwFPzxdCu2pD7+I6qc9DLTHYOFIocBXqvIT/Ezn5ccV17arE9EPW3fXGX0gC8EK+t6thI+eCd4EZrPeoFkKqhF+rTIy5NS0F9XodF/U16vodbPv2c8xSyoo2TlQvEn1jiU3KxjZiwMosDfOZ7GMMMdXs650zQ216uyWMVdU1Kzcb4t1aCGrfJ42pjP3SN1JD8DVwAK4L0F/7DPMQE8mgRO5RIx3ZrzLc2BWzwnI/1FUiP2tVQjEBOWGEqf6VE3h0cHeoaX/yfJ/QWA/BudnvOzKlosHV/xzUvheOBkTla7EqvtXex+YjmSQUDPuYoCd5XWJFz4xgrRO96PBLf7CiN0J+inhgxdG+YQ=----ATTACHMENT:----NzU1NzAxNTkwNzc2MjIxMiAxMTI3MTQ4NzE5Mzk4ODM0IDE5MjkzMDg4MDEzNjQ4NTc=