X-Git-Url: http://git.pjr.cc/?p=ga4php.git;a=blobdiff_plain;f=lib%2Flib.php;h=558e2159dca76fbf13db290d07cafb127d5e7401;hp=2513ebc06084f9c00d417e6ed15771212e27d8e7;hb=7d9ad0ded6fb7efc1d04f51ba86e5cf88ead0630;hpb=eb25b7f233389067c8e571f67f273477ec14792f diff --git a/lib/lib.php b/lib/lib.php index 2513ebc..558e215 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -123,11 +123,12 @@ abstract class GoogleAuthenticator { error_log("dat is $asdf"); switch($ttype) { case "HOTP": + error_log("in hotp"); $st = $tlid; $en = $tlid+20; for($i=$st; $i<$en; $i++) { $stest = $this->oath_hotp($tkey, $i); - //error_log("code: $code, $stest, $tkey, $tid"); + error_log("testing code: $code, $stest, $tkey, $tid"); if($code == $stest) { $tokendata["tokencounter"] = $i; $this->internalPutData($username, $tokendata); @@ -137,6 +138,7 @@ abstract class GoogleAuthenticator { return false; break; case "TOTP": + error_log("in totp"); $t_now = time(); $t_ear = $t_now - 45; $t_lat = $t_now + 60; @@ -145,7 +147,7 @@ abstract class GoogleAuthenticator { //error_log("kmac: $t_now, $t_ear, $t_lat, $t_st, $t_en"); for($i=$t_st; $i<=$t_en; $i++) { $stest = $this->oath_hotp($tkey, $i); - //error_log("code: $code, $stest, $tkey\n"); + error_log("testing code: $code, $stest, $tkey\n"); if($code == $stest) { return true; }