from aiohttp.web import json_response
def status(request):
response = {
'ldap': {
'connected': not request.app['ldap_client'].connection.closed,
'bound': request.app['ldap_client'].connection.bound
}
return json_response(response)