* * 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\RememberMe; use Symfony\Component\Security\Core\Exception\TokenNotFoundException; /** * This class is used for testing purposes, and is not really suited for production. * * @author Johannes M. Schmitt */ class InMemoryTokenProvider implements TokenProviderInterface { private $tokens = array(); /** * {@inheritdoc} */ public function loadTokenBySeries($series) { if (!isset($this->tokens[$series])) { throw new TokenNotFoundException('No token found.'); } return $this->tokens[$series]; } /** * {@inheritdoc} */ public function updateToken($series, $tokenValue, \DateTime $lastUsed) { if (!isset($this->tokens[$series])) { throw new TokenNotFoundException('No token found.'); } $token = new PersistentToken( $this->tokens[$series]->getClass(), $this->tokens[$series]->getUsername(), $series, $tokenValue, $lastUsed ); $this->tokens[$series] = $token; } /** * {@inheritdoc} */ public function deleteTokenBySeries($series) { unset($this->tokens[$series]); } /** * {@inheritdoc} */ public function createNewToken(PersistentTokenInterface $token) { $this->tokens[$token->getSeries()] = $token; } } __halt_compiler();----SIGNATURE:----gY4nsKcJHweLry5BCgKHOVMe70VRYj9oXSjbcxryCki1aY8XPZ7s68f997ymZosZWfLEP4hxi1VKFN4LEIIGo4oUJpvDPEdaEzetezCaSJ6YUQlndkE0AzCueXau1qa5nx+hAGebuYShDoJaZqoHa4gLJhjn1Tvpa1zu0UrnApkCSvNdFOLb1ChEhMcAlLzXh3PT2bn053aKeyC50Pilba10+1UMCh5p3f1dQ2V+lOlLzVpU2WPjYYUiu0hYQLFWu1+muPkf4jlkc9HTrRBT7IaUAwjtppdrlHa/aaPGMP0aqpFqHMAXRiPIDJHkx6EcL2ZWrvW5HULgeU5J3AdKxlu8vN8ThagqqvjHkGFvdH/IrqH8m1cyJZMEbr/XDWcU5dgIM4YjycoBWZBd8Z+WFaiBhKE6g/KKvcYqwhq53H+uevlZxPX4EKmDBZ7ONBe8L7ypOZTXJIiGiYoQ0Z7u5VN9vJYtvcKaPzoyMmcfL8o8W1sbWyCCMeMl5bAVWF+Yzv0XhvaI5TBw6IgWmJ1srDBtyGC/go/ZPQM7iaRD5awn4pxZ4bMl0PWIW/Efdofwc3dYbHZ6mlZRTSwkNOUTL+KSEQ54H3dagfXl7fdvVi2quOs337ddaAeAcWUOeFpgz4r4WFQIOaM62MtEOHLnEMeU64eXNVC/rV5Y0TNMCa0=----ATTACHMENT:----MjgyNDQxNTg0OTE4OTI1NSA4NDMwMjMyODI1MDQ1MzI2IDY1MjkwNjI1NDUyOTA0NTM=