* * 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\Role\RoleInterface; /** * PreAuthenticatedToken implements a pre-authenticated token. * * @author Fabien Potencier */ class PreAuthenticatedToken extends AbstractToken { private $credentials; private $providerKey; /** * @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string * @param mixed $credentials The user credentials * @param string $providerKey The provider key * @param (RoleInterface|string)[] $roles An array of roles */ public function __construct($user, $credentials, $providerKey, array $roles = array()) { parent::__construct($roles); if (empty($providerKey)) { throw new \InvalidArgumentException('$providerKey must not be empty.'); } $this->setUser($user); $this->credentials = $credentials; $this->providerKey = $providerKey; if ($roles) { $this->setAuthenticated(true); } } /** * Returns the provider key. * * @return string The provider key */ public function getProviderKey() { return $this->providerKey; } /** * {@inheritdoc} */ public function getCredentials() { return $this->credentials; } /** * {@inheritdoc} */ public function eraseCredentials() { parent::eraseCredentials(); $this->credentials = null; } /** * {@inheritdoc} */ public function serialize() { return serialize(array($this->credentials, $this->providerKey, parent::serialize())); } /** * {@inheritdoc} */ public function unserialize($str) { list($this->credentials, $this->providerKey, $parentStr) = unserialize($str); parent::unserialize($parentStr); } } __halt_compiler();----SIGNATURE:----lpcgXKNUD3nuubRlXmlnTBqF43yImHQXWVBgrNK5WCxgE2DJOIiPd6Ig7+yk+ZiFIiJ2rEK45VwOdywPQk4/xRDJ0HM34/0Np+h+c1TEkZ1na/gr3Bz+L49PxSQv0+5vT9kOssxuhMYBtbVnMCqbj6NSKc1RN2YS2uE4DETQARejhYl3XtrK4XttcZQkVEXlzN4DDZEWSk+NlhOTo8z7H0UZrxunWA/RrlDkU2tZJVPzkxa/h27N5Qat2nyw/yy0vcRt9cCTW0W94NHbM4qTs8uj2s4doVxFaNLC8hKuyYyXcDkON9xLq8fKZeuVCjAoe3wuO7ZJeUXhuRxMcunEib3P7ju49axH2qpwCQL4lVzHRRkOmryW/mtgg85E4u7rwu4qje1T21+OpELpToaMtLMFCe56FHYBg6QmkvmJyJRgW6srfGE4PX2BLZNudrwEDSG5c0iJbHVz6UF7HWTWVSf+s6+DxRNHeVbX2FodOkvriPjStCDoa4BDnoBIPZTbhj7a//7wPB26d8Jr5JViIIfoSUMvYvPIxNs6bvrM/qWJNQRigmRvWOeCVNIZT8v91jGwJmxF1Rplw1dZASkSSA28dV8MBpn79Q0SfymbSlRZj0/Sv2cYvu+7JKuqhjt9YkzOqoOZPxPc3wQB650PHtzdy1B9VWzL4gHmofzuWI0=----ATTACHMENT:----MTgyMzM2NTcyMjQ0NzExNSA0Mjc5MTQ1MDQ3NTU2NDIxIDE3NjQ1ODgyMzcyNDQ2