示例#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
文件: Csrf.php 项目: doowebdev/core
 public function checkCsrf($tokenv)
 {
     print_r($token);
     //   return $token;
     return Token::check($tokenv);
 }
示例#3
0
文件: Csrf.php 项目: doowebdev/core
 /**
  * @return bool
  */
 public function check()
 {
     return Token::check($this->_input->request->get('token'));
 }