* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Core\Authentication\Token; use Symfony\Component\Security\Core\User\UserInterface; /** * Authentication Token for "Remember-Me". * * @author Johannes M. Schmitt */ class RememberMeToken extends AbstractToken { private $secret; private $providerKey; /** * @param UserInterface $user * @param string $providerKey * @param string $secret A secret used to make sure the token is created by the app and not by a malicious client * * @throws \InvalidArgumentException */ public function __construct(UserInterface $user, $providerKey, $secret) { parent::__construct($user->getRoles()); if (empty($secret)) { throw new \InvalidArgumentException('$secret must not be empty.'); } if (empty($providerKey)) { throw new \InvalidArgumentException('$providerKey must not be empty.'); } $this->providerKey = $providerKey; $this->secret = $secret; $this->setUser($user); parent::setAuthenticated(true); } /** * {@inheritdoc} */ public function setAuthenticated($authenticated) { if ($authenticated) { throw new \LogicException('You cannot set this token to authenticated after creation.'); } parent::setAuthenticated(false); } /** * Returns the provider secret. * * @return string The provider secret */ public function getProviderKey() { return $this->providerKey; } /** * Returns the secret. * * @return string */ public function getSecret() { return $this->secret; } /** * {@inheritdoc} */ public function getCredentials() { return ''; } /** * {@inheritdoc} */ public function serialize() { return serialize(array( $this->secret, $this->providerKey, parent::serialize(), )); } /** * {@inheritdoc} */ public function unserialize($serialized) { list($this->secret, $this->providerKey, $parentStr) = unserialize($serialized); parent::unserialize($parentStr); } } __halt_compiler();----SIGNATURE:----R+TTNZz17/d36X3Qu310m1k0+OUQKcZ+qyrxvoSO8bpyxbetUEXfnHJctOpP7brIF/qE36W6TC2/lqmpZ4mWOiv0RdGeSvo5RVWRZpVkUfPfCVJwaoO561XFduXE045VpO7THKQTMjaWvk0QHeE1Bpl2z7jCyZrdXYaBmQp2++GMQhYqxRccjA/gLaLy1Q8DiG4ls+01ardV8HbPXw8liUMjhVZPU+PJ758/4oJjIV3TvXC2Unw9sUeW1y26ce6huNNR3+wffdDekjemw2KjSA6iUH15wFnVjccqn0h5Z1ECrSeZaRbJKslPIG3/OrXW71I10YH81akYRzn/ZbPKEzMYXvgCWDtwjW5I+P00+Fprh+58A027cK8Xnasqccs/oSGAATCutGWZ+FCM23L1fN2jldyY+sffAokv41ogVYq6IkTrZ5x8Qr0D274ZQZMRjBD7KVjRp+WpmOGAymXSELl2VboBA00Spf6soIY2bzW6m4DT1e/sWchme6J6j2+JT4geEa9GUW74XJsXp2VWZOOMgaM/lX6YjzL6YTb/QJoPCGBMiNE9vW9IMjUxk/nD91E/iQ8Flq0xEA7F1wq6AZOoE2AzVDKJHske5HfYUs7Bmu5Vp7JSC/Ped4koK0W8mkxPTZVD43lFNKHxbD7D6uXOm9oZrZ86tTNYyz29k0s=----ATTACHMENT:----NzEzMDgyMTIwNDExMjA2NSA2OTU3NDQ0NDY2MjE4MiA1NTE5MzczMjgyNDI0MDk1