* * 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:----lAW7/uZNORU9SfMmdcuvVGOHV6lv6QkR7SVMMpxsm35xlk7OHjJ2IIDAksC1mCzORUs8tvd5m+2CVNEh3U7BUCBgaWtHMkHfRI0v9rBRTVUIArF31x0S3osiQaXk3a0FzNXPl3+CV8Q/QAh8Zxm9OzFP4EGXKrRkuWmKJ6OGGUEMt1gdOFJcLSL+inT1iHk1HtVi92/eu+At9Y9Lvh1eDtk3Ft3tKKOJmggXq+ZCD2uSk+c9mP0/nDOvVwIxi/J41FIVKc9J+8h7t0Qb1G0S9/S4LrGCXg69ATo0UB4FFdl1mkQ4gTbD6iOYM1XgsCn6gbI86x+u2v8GRMgmgPdQDXxekKSf7e1x/wguFbgCShYpot2hO1vqwcsZposPdGP6qMNIPx9eYf13yQ8b1pvhiwdoQqatfPBzjuZENJtEzViWQsQIx0FuYRG+nxfbSNWo3/Wny/XuX8OeMJHWZQTCBhUiZXnufIEsdzg5cYZKlqBGfIBVpRt48bjRL2DxsqeryRPmLZMwaItgzH8UeaHfVNkmLzFLt/yoUnDZ9Co5sGokaV//zs9GgxkigJwiS9htwmZg3H1X1e0S7M+YEfDbpNC0mw6ep5RAwSXxLZ1dDlANSI25BjPnG+Oknc/rm4cm0Z7b0pX1C6xJU+uhqbjZXDvwDL/SV7PCTuXHK0shySM=----ATTACHMENT:----NjAxNzE2NzY3OTQyNzQ1NSAyNDkxNTY3MjkzMDM1NTE3IDY1ODAzNDU4ODkxNjUwMTk=