SessionTokenStorage::getToken()

string getToken(string $tokenId) Reads a stored CSRF token. Parameters string $tokenId The token ID Return Value string The stored token Exceptions TokenNotFoundException If the token ID does not exist

SessionTokenStorage

class SessionTokenStorage implements TokenStorageInterface Token storage that uses a Symfony Session object. Constants SESSION_NAMESPACE The namespace used to store values in the session. Methods __construct(SessionInterface $session, string $namespace = self::SESSION_NAMESPACE) Initializes the storage with a Session object and a session namespace. string getToken(string $tokenId) Reads a stored CSRF token. setToken(string $tokenId, string $token) Stores a CSRF token. b

SessionStorageInterface::start()

bool start() Starts the session. Return Value bool True if started Exceptions RuntimeException If something goes wrong starting the session.

SessionStorageInterface::setName()

setName(string $name) Sets the session name. Parameters string $name

SessionStorageInterface::setId()

setId(string $id) Sets the session ID. Parameters string $id

SessionStorageInterface::save()

save() Force the session to be saved and closed. This method must invoke sessionwriteclose() unless this interface is used for a storage object design for unit or functional testing where a real PHP session would interfere with testing, in which case it should actually persist the session data if required. Exceptions RuntimeException If the session is saved without being started, or if the session is already closed.

SessionStorageInterface::registerBag()

registerBag(SessionBagInterface $bag) Registers a SessionBagInterface for use. Parameters SessionBagInterface $bag

SessionStorageInterface::regenerate()

bool regenerate(bool $destroy = false, int $lifetime = null) Regenerates id that represents this storage. This method must invoke sessionregenerateid($destroy) unless this interface is used for a storage object designed for unit or functional testing where a real PHP session would interfere with testing. Note regenerate+destroy should not clear the session data in memory only delete the session data from persistent storage. Care: When regenerating the session ID no locking is inv

SessionStorageInterface::isStarted()

bool isStarted() Checks if the session is started. Return Value bool True if started, false otherwise

SessionStorageInterface::getName()

mixed getName() Returns the session name. Return Value mixed The session name