X-Git-Url: http://git.pjr.cc/?p=ga4php.git;a=blobdiff_plain;f=example%2Fprovisioning%2Findex.php;fp=example%2Fprovisioning%2Findex.php;h=c3577ed0a76242d450d324a988262495ed2eda41;hp=0000000000000000000000000000000000000000;hb=ddd5c8118fb9ad4f6e8f4ea7371f189e1b152064;hpb=195c42d5711d000a987ed3a0a376ac09b98867fc
diff --git a/example/provisioning/index.php b/example/provisioning/index.php
new file mode 100644
index 0000000..c3577ed
--- /dev/null
+++ b/example/provisioning/index.php
@@ -0,0 +1,151 @@
+
+
+
+
Welcome to GA Provisioning!
+
+".$_REQUEST["success"]."
";
+}
+if(isset($_REQUEST["failure"])) {
+ echo "
".$_REQUEST["failure"]."
";
+}
+?>
+
+
+
+
+
+Users
+
+Username/Login | Fullname | Has Token? | Key | Base 32 Key | Hex Key |
+query("select * from users");
+foreach($result as $row) {
+ if($myga->hasToken($row["users_username"])) {
+ $hastoken = "Yes";
+ $type = $myga->getTokenType($row["users_username"]);
+ if($type == "HOTP") {
+ $type = "- Counter Based";
+ } else {
+ $type = "- Time Based";
+ }
+ $hexkey = $myga->getKey($row["users_username"]);
+ $b32key = $myga->helperhex2b32($hexkey);
+
+ $url = urlencode($myga->createURL($row["users_username"]));
+ $keyurl = "";
+
+ }
+ else {
+ $b32key = "";
+ $hexkey = "";
+ $type = "";
+ $hastoken = "no";
+ $keyurl = "";
+ }
+
+
+ // now we generate the qrcode for the user
+
+ echo "".$row["users_username"]." | ".$row["users_fullname"]." | $hastoken $type | $keyurl | $b32key | $hexkey |
";
+}
+closeDatabase($db);
+?>
+
+Create a User:
+
+
+
+
+
+
+
+Create Token
+This form allows you to provision a token for the user
+
+
+
+Test Authentication
+