开发者

equivalent of rails' "devise" for a python micro-framework?

开发者 https://www.devze.com 2023-03-11 16:07 出处:网络
I have a new project that requires a user authentication system... I\'ve done this in PHP, but I have the desire to use Python this time ar开发者_开发百科ound, and I really don\'t want to hand-roll al

I have a new project that requires a user authentication system... I've done this in PHP, but I have the desire to use Python this time ar开发者_开发百科ound, and I really don't want to hand-roll all the forms and controller logic.

I seem to remember something equivalent in Djano, but I'd rather avoid having to learn a monolithic framework. I'd also like to avoid having to learn Ruby.


If you want you can use a WSGI middleware and plug it in to handle auth, there are a few modules for this repoze.who and AuthKit comes to mind. For flask there is also Flask-Principal. It's also not particularly hard to roll your own.


AuthLib has an example OAuth2 server that works as advertised right after you clone it and follow the directions under "Take a quick look".

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号