diff --git a/info.textgrid.middleware.tgauth.webauth/WebAuthN/authenticate.php b/info.textgrid.middleware.tgauth.webauth/WebAuthN/authenticate.php index 49decc7edb5fb0cd28a40db83b6872241bb1468f..2cf5653f9e5269894483eb8bbdb689c87b48bce8 100644 --- a/info.textgrid.middleware.tgauth.webauth/WebAuthN/authenticate.php +++ b/info.textgrid.middleware.tgauth.webauth/WebAuthN/authenticate.php @@ -26,12 +26,14 @@ $authZinstance = $_REQUEST["authZinstance"]; $login = $_REQUEST["loginname"]; $password = $_REQUEST["password"]; - // LDAP $ldapconn = ldap_connect( $ldaphost, $ldapport ) or die( "Cannot connect to {$ldaphost}!" ); ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3); -#ldap_start_tls( $ldapconn ); +$return = ldap_start_tls( $ldapconn ); +$file = fopen ("/tmp/ssstls", "a+"); +fwrite ($file, serialize($return)); +fclose($file); $binddn = preg_replace ('/\${login}/', $login, $binddn); $bound = ldap_bind($ldapconn, $binddn , $password);