Reputation: 349
I'm looking for solution how to setup domain authorization with aiohttp. There are several ldap librarys, but all of them blocks event loop, plus i don't have clear understanding about user authorization with aiohttp. As i see i need session managment and store isLogdedIn=True in cookie file, check that cookie at every route -> redirect at login handler, and check key in every template? It seems very insecure, session could be stolen.
Upvotes: 2
Views: 691
Reputation: 17376
You may call synchronous LDAP library in thread pool (loop.run_in_executor()
).
aiohttp
itself doesn't contain abstractions for sessions and authentication but there are aiohttp_session
and aiohttp_security
libraries. I'm working on these but current status is alpha. You may try it as beta-tester :)
Upvotes: 2