Exemple #1
0
 def _setcookie(self, session_id, expires='', **kw):
     cookie_name = self._config.cookie_name
     cookie_domain = self._config.cookie_domain
     cookie_path = self._config.cookie_path
     httponly = self._config.httponly
     secure = self._config.secure
     web.setcookie(cookie_name, session_id, expires=expires, domain=cookie_domain, httponly=httponly, secure=secure, path=cookie_path)
Exemple #2
0
 def _setcookie(self, session_id, expires='', **kw):
     cookie_name = self._config.cookie_name
     cookie_domain = self._config.cookie_domain
     cookie_path = self._config.cookie_path
     httponly = self._config.httponly
     secure = self._config.secure
     web.setcookie(cookie_name, session_id, expires=expires, domain=cookie_domain, httponly=httponly, secure=secure, path=cookie_path)
Exemple #3
0
 def _save(self):
     cookie_name = self._config.cookie_name
     cookie_domain = self._config.cookie_domain
     if not self.get('_killed'):
         web.setcookie(cookie_name, self.session_id, domain=cookie_domain)
         self.store[self.session_id] = dict(self)
     else:
         web.setcookie(cookie_name, self.session_id, expires=-1, domain=cookie_domain)
Exemple #4
0
 def _save(self):
     cookie_name = self._config.cookie_name
     cookie_domain = self._config.cookie_domain
     if not self.get('_killed'):
         web.setcookie(cookie_name, self.session_id, domain=cookie_domain)
         self.store[self.session_id] = dict(self)
     else:
         web.setcookie(cookie_name, self.session_id, expires=-1, domain=cookie_domain)
    def _save(self):
        cookie_name = self._config.cookie_name
        cookie_domain = self._config.cookie_domain
        httponly = self._config.httponly

        if not self.get("_killed"):
            web.setcookie(cookie_name, self.session_id, domain=cookie_domain, httponly=httponly)
            self.store[self.session_id] = dict(self._data)
        else:
            web.setcookie(cookie_name, self.session_id, expires=-1, domain=cookie_domain, httponly=httponly)
Exemple #6
0
 def render(self):
     token = uuid.uuid4().hex
     web.setcookie("CSRF_token", token)
     self.value = token
     return super(CSRF_Token, self).render()