【发布时间】:2013-11-24 19:43:01
【问题描述】:
我有两个不同的 Web 应用程序,但身份验证仅由一个(使用 python 和 tornado)完成,我希望第二个应用程序透明地访问用户的凭据,目前我可以读取登录的 cookie用户通过标题:Access-Control-Allow-Credentials,那么我将如何访问 cookie,以便我可以存储它(mongodb/redis/anywhere-but-mysql),并在第二个应用程序中检索它?
我尝试过的:
self.set_secure_cookie('cookie_name') # works i can see the cookie in subsequent request headers
self.get_secure_cookie("cookie_name") # just after setting the cookie returns None
我的想法是存储加密值并稍后在需要时在第二个应用程序中进行比较,这是否明智?我需要做的就是确保用户 登录并且他们目前存在于用户列表中。
【问题讨论】:
标签: cookies python-3.x tornado