Пример #1
0
 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);
 }
Пример #2
0
 public function checkCsrf($tokenv)
 {
     print_r($token);
     //   return $token;
     return Token::check($tokenv);
 }
Пример #3
0
 /**
  * @return bool
  */
 public function check()
 {
     return Token::check($this->_input->request->get('token'));
 }