user4549992
user4549992

Reputation: 349

Proper way to setup ldap auth with aiohttp.web

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

Answers (1)

Andrew Svetlov
Andrew Svetlov

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

Related Questions