protected function validateCsrfToken($value = null, $id = 'bolt')
    {
        if (!$this->isCsrfTokenValid($value, $id)) {
            $this->abort(Response::HTTP_BAD_REQUEST, Trans::__('general.phrase.something-went-wrong'));
        }
    }
protected function validateCsrfToken($value = null, $id = 'bolt')
    {
        if (!$this->isCsrfTokenValid($value, $id)) {
            $this->abort(Response::HTTP_BAD_REQUEST, Trans::__('general.phrase.something-went-wrong'));
        }
    }
protected function validateCsrfToken ( $ value = null , $ id = 'bolt' ) { if ( ! $ this -> isCsrfTokenValid ( $ value , $ id ) ) { $ this -> abort ( Response :: HTTP_BAD_REQUEST , Trans :: __ ( 'general.phrase.something-went-wrong' ) ) ; } }
Validates CSRF token and throws HttpException if not.

@param string|null $value the token value or null to use "bolt_csrf_token" parameter from request
@param string      $id    the token ID

@throws HttpExceptionInterface
Validates CSRF token and throws HttpException if not .