kvspb / nginx-auth-ldap

LDAP authentication module for nginx
BSD 2-Clause "Simplified" License
731 stars 251 forks source link

add variable support for auth_ldap parameter #238

Open 532910 opened 4 years ago

532910 commented 4 years ago

Please add support to use variable as a parameter for auth_ldap.

if ($ssl_client_verify = "SUCCESS"){
    set $auth "off";
}
if ($ssl_client_verify != "SUCCESS"){
    set $auth "Forbidden";
}

While this:

auth_basic_user_file passwd;
auth_basic $auth;  

works as expected, this:

auth_ldap_servers ldap_uid;
auth_ldap $auth;

always says: "The site says: “$auth”"