简体   繁体   English

将OpenId与Bottle一起使用

[英]Using OpenId with Bottle

So i'm creating a blog engine in python with bottle. 所以我用python用瓶子创建了一个博客引擎。 I would like to be able to have it create and run it's own login system and use OpenId. 我希望能够创建并运行它自己的登录系统并使用OpenId。

Can I use OpenId with bottle? 我可以将OpenId与bottle一起使用吗? If so how? 如果可以,怎么办? Bonus brownie points if you can tell me how to request information from the user profile through this. 如果您能告诉我如何通过此方法从用户个人资料中请求信息,则可以获得布朗尼积分。

Are there any other alternatives that works with Google? 还有其他与Google兼容的替代方法吗?

Do you have any Tips or guides for making a secure login system? 您是否有制作安全登录系统的提示或指南?

BTW: I use python 3 顺便说一句:我使用python 3

Edit: I have decided to just move to Flask it has openid and heaps more. 编辑:我决定只是移动到Flask,它具有openid并堆积更多。

I couldn't find any turnkey solution for this, but you might want to check out this simple auth class for bottle: https://github.com/bbrodriges/bottlepy-user-auth , which shows an example how to bind together your bottle webapp and your user database. 我为此找不到任何交钥匙解决方案,但您可能想检查一下这个用于瓶子的简单auth类: https : //github.com/bbrodriges/bottlepy-user-auth ,它显示了如何将您的捆绑在一起的示例bottle webapp和您的用户数据库。 So by using this as a base and a implementing a wrapper class on the top of the python-openid library, and use it as the 'db' class in the linked auth class. 因此,通过使用它作为基础并在python-openid库的顶部实现一个包装器类,并将其用作链接的auth类中的“ db”类。 You can also extend this class to handle further profile infos you need. 您也可以扩展此类,以处理所需的更多个人资料信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM