updated todo
[gwvp.git] / gwvplib / gwvpauth.php
index 2602256..0cd3212 100644 (file)
@@ -37,11 +37,8 @@ function gwvp_AuthCallMe()
 
 function gwvp_AskForBasicAuth()
 {
-       error_log("AUTH: asking for basic auth");
-       if(!isset($_SERVER["PHP_AUTH_USER"])) {
-               header('WWW-Authenticate: Basic realm="GIT Repo"');
-               header('HTTP/1.1 401 Unauthorized');
-       } else return; 
+       header('WWW-Authenticate: Basic realm="GIT Repo"');
+       header('HTTP/1.1 401 Unauthorized');
 }
 
 // $levels is checked against $LOGIN_TYPE, levels can be either just "admin" or admin,user anon,user anon, etc.
@@ -208,6 +205,8 @@ function gwvp_checkBasicAuthLogin()
        $auth = gwvp_authUserPass($user, $pass);
        if($auth !== false) {
                error_log("auth passes");
+       } else {
+               error_log("auth failes");
        }
        
        return $auth;