def prepare(self): if not self.current_user_id: self.redirect('/login') else: session = Session.new(self.current_user_id) self.set_cookie('S', session, domain="." + HOST, expires_days=SESSION_EXPIRE)
def _session_new(self, account, user_id): session = Session.new(user_id) self.set_cookie('S', session, domain="." + HOST, expires_days=SESSION_EXPIRE) self.set_cookie('E', account, domain="auth." + HOST, expires_days=SESSION_EXPIRE)