/** * Verify CSRF protection * * @return boolean */ public function verify() { $metadata = $this->getMetadata(self::CSRF); $session = $this->session->grab(self::CSRF); $flag = $metadata == $session; return $flag; }
/** * Save data in session * * @return Session */ public function save() { $this->session->set($this->name, $this->data); $this->clean = true; return $this; }