예제 #1
0
파일: auth.py 프로젝트: cheshang/cheshang
 def POST(self):
     email, passwd, name =  self.arguments('email', 'passwd', 'name')
     if email and passwd:
         uid = account_new(email, passwd, name)
     if uid:
         return self.redirect('/signin')
     return self.render()
예제 #2
0
 def _on_auth(self, user):
     if not user:
         raise tornado.web.HTTPError(500, "Google auth failed")
     else:
         name = user['name']
         email = user['email']
         user_id = account_new(name, email)
         login(self, user_id)
         self.redirect('/:')