public function regenerateToken()
    {
        do {
            $token = $this->getGenerator()->getBytes(self::TOKEN_LENGTH);
        } while ($token === $this->token);

        $this->token = $token;
        $this->storage->storeToken($this->token);

        return $this;
    }
public function regenerateToken()
    {
        do {
            $token = $this->getGenerator()->getBytes(self::TOKEN_LENGTH);
        } while ($token === $this->token);

        $this->token = $token;
        $this->storage->storeToken($this->token);

        return $this;
    }
public function regenerateToken ( ) { do { $ token = $ this -> getGenerator ( ) -> getBytes ( self :: TOKEN_LENGTH ) ; } while ( $ token === $ this -> token ) ; $ this -> token = $ token ; $ this -> storage -> storeToken ( $ this -> token ) ; return $ this ; }
Regenerates the actual CSRF token.

After this method has been called, any token that has been previously
generated by `getToken()` is no longer considered valid. It is highly
recommended to regenerate the CSRF token after any user authentication.

@return CSRFHandler Returns self for call chaining
@throws Storage\TokenStorageException If the secret token cannot be stored
Regenerates the actual CSRF token .