diff options
author | Christian Stocker <me@chregu.tv> | 2011-02-22 06:39:59 +0100 |
---|---|---|
committer | Christian Stocker <me@chregu.tv> | 2011-02-22 06:39:59 +0100 |
commit | 2596d68e278dc6b5b1c0bb91ca86ba141b2abd73 (patch) | |
tree | e9da80f9c0669f2c3efb5d5691f36a6c6fa77956 | |
parent | a1e43c5aeb09bfbdd594572f42cb6d044d150e62 (diff) | |
download | GoogleAuthenticator.php-2596d68e278dc6b5b1c0bb91ca86ba141b2abd73.zip GoogleAuthenticator.php-2596d68e278dc6b5b1c0bb91ca86ba141b2abd73.tar.gz GoogleAuthenticator.php-2596d68e278dc6b5b1c0bb91ca86ba141b2abd73.tar.bz2 |
added debug option (it just automatically adds the OTP token for now)
-rw-r--r-- | tmpl/ask-for-otp.php | 6 | ||||
-rw-r--r-- | web/index.php | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/tmpl/ask-for-otp.php b/tmpl/ask-for-otp.php index 4d69c77..8df43f3 100644 --- a/tmpl/ask-for-otp.php +++ b/tmpl/ask-for-otp.php @@ -4,8 +4,10 @@ <form method="post" action="./"> otp: <input name="otp" value="<?php +if ($debug) { $g = new GoogleAuthenticator(); - -echo $g->getCode($user->getSecret());?>"/><br/> +echo $g->getCode($user->getSecret()) +} +;?>"/><br/> <input type="submit"/> </form>
\ No newline at end of file diff --git a/web/index.php b/web/index.php index 1a4c9e7..abeed44 100644 --- a/web/index.php +++ b/web/index.php @@ -12,7 +12,7 @@ ini_set("session.cookie_httponly", 1); include_once("../lib/GoogleAuthenticator.php"); include_once("Users.php"); - +$debug = true; $users = new Users(); if ($username = $users->hasSession()) { |