Security/Firewall/LdapFormLoginListener.php
protected function validateCsrfToken(Request $request)
    {
        if (is_null($this->csrfTokenManager)) {
            return;
        }
        $csrfToken = $this->getParameterFromRequest($request, $this->options['csrf_parameter']);

        if (false === $this->csrfTokenManager->isTokenValid(new CsrfToken($this->options['intention'], $csrfToken))) {
            throw new InvalidCsrfTokenException('Invalid CSRF token.');
        }
    }
protected function validateCsrfToken(Request $request)
    {
        if (is_null($this->csrfTokenManager)) {
            return;
        }
        $csrfToken = $this->getParameterFromRequest($request, $this->options['csrf_parameter']);

        if (false === $this->csrfTokenManager->isTokenValid(new CsrfToken($this->options['intention'], $csrfToken))) {
            throw new InvalidCsrfTokenException('Invalid CSRF token.');
        }
    }
Provide a BC wrapper for CSRF token manager/provider compatibility between versions.

@param Request $request