protected function isCsrfTokenValid($value = null, $id = 'bolt')
    {
        $token = new CsrfToken($id, $value ?: $this->app['request_stack']->getCurrentRequest()->get('bolt_csrf_token'));

        return $this->app['csrf']->isTokenValid($token);
    }
protected function isCsrfTokenValid($value = null, $id = 'bolt')
    {
        $token = new CsrfToken($id, $value ?: $this->app['request_stack']->getCurrentRequest()->get('bolt_csrf_token'));

        return $this->app['csrf']->isTokenValid($token);
    }
protected function isCsrfTokenValid ( $ value = null , $ id = 'bolt' ) { $ token = new CsrfToken ( $ id , $ value ? : $ this -> app [ 'request_stack' ] -> getCurrentRequest ( ) -> get ( 'bolt_csrf_token' ) ) ; return $ this -> app [ 'csrf' ] -> isTokenValid ( $ token ) ; }
Check if csrf token is valid.

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

@return bool
Check if csrf token is valid .