【发布时间】:2011-07-24 01:10:07
【问题描述】:
大家好...我一直在阅读 tornado 文档并遇到了 open id mixin,所以我心想“我身边没有可怕的密码系统”,然后我研究了如何实现它,这是我来的唯一示例对面是这个
class GoogleHandler(tornado.web.RequestHandler, tornado.auth.GoogleMixin):
@tornado.web.asynchronous
def get(self):
if self.get_argument("openid.mode", None):
self.get_authenticated_user(self.async_callback(self._on_auth))
return
self.authenticate_redirect()
def _on_auth(self, user):
if not user:
raise tornado.web.HTTPError(500, "Google auth failed")
不会显示更大的图景,例如路线、应用设置等 # 保存用户,例如 set_secure_cookie()
所以我的问题是。这如何适应龙卷风网站的大局。
【问题讨论】:
标签: python openid document tornado