public function __construct(Application $app) { $this->app = $app; $this->setFlashMessage($app); $this->input = Request::createFromGlobals(); $this->data['token'] = Token::generate(); $this->data['current_user'] = $this->currentUser(); // $this->app['csrf']->setInput($this->input); $this->setCsrfInput($this->input); }
public function checkCsrf($tokenv) { print_r($token); // return $token; return Token::check($tokenv); }
/** * @return bool */ public function check() { return Token::check($this->_input->request->get('token')); }