Handle LDAP operations asynchronously using nginx event architecture

A connection is opened using nginx framework and then fed to OpenLDAP using
ldap_init_fd() call with custom SockBuf IO handlers. When some credentials
need to be validated, ngx_http_auth_ldap_authenticate() is called multiple
times, returning NGX_AGAIN each time the process is waiting for the LDAP
server to reply.

(Note: This only an initial implementation and as such, it is of course
very buggy and limited. Further work is needed to make it useful.)
main
Jiri Hruska 11 years ago
parent 7acf3b4a98
commit afda839edb
  1. 2
      config
  2. 1072
      ngx_http_auth_ldap_module.c

@ -2,4 +2,4 @@ ngx_addon_name=ngx_http_auth_ldap_module
HTTP_MODULES="$HTTP_MODULES ngx_http_auth_ldap_module" HTTP_MODULES="$HTTP_MODULES ngx_http_auth_ldap_module"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_auth_ldap_module.c" NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_auth_ldap_module.c"
CORE_LIBS="$CORE_LIBS -lldap" CORE_LIBS="$CORE_LIBS -lldap"
CFLAGS="$CFLAGS -DLDAP_DEPRECATED" CFLAGS="$CFLAGS"

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save