X-Git-Url: http://git.pjr.cc/?p=ga4php.git;a=blobdiff_plain;f=example%2Findex.php;h=1699691ed1dcb11bcf4733ebe2364e520878d22e;hp=54d50a50a64885e6070555734049ec06a781efde;hb=50ec224ca5ec919ee34e4b7482f1fb6c0c9cde75;hpb=3d4474b6139a576914e18033ccbcbee432889ebd diff --git a/example/index.php b/example/index.php index 54d50a5..1699691 100644 --- a/example/index.php +++ b/example/index.php @@ -33,24 +33,61 @@ if(isset($_REQUEST["action"])) { echo "Failed!"; } break; + case "resync": + $username = $_REQUEST["username"]; + $code1 = $_REQUEST["code1"]; + $code2 = $_REQUEST["code2"]; + if($ga->resyncCode($username, $code1, $code2)) { + echo "Passed!"; + } else { + echo "Failed!"; + } + break; + case "destroy": + unlink("/tmp/gaexpage.db"); + break; default: // do nothing } } ?> - -Create a User: +

Destroy the DB

+This is UNDOABLE - but this is a test system, so you dont care +

Create a User:

Username:
Type (ignored for now):


+

Test Token

-Username:
+Username:
Code:


+

Resync Code (only valid for HOTP codes)

+
+Username:
+Code one:
+Code two:
+
+
+
\ No newline at end of file