From 2e867180ea2f5ba6aeaac1509966473424ced8dd Mon Sep 17 00:00:00 2001 From: paulr Date: Sun, 27 Feb 2011 03:40:18 +1100 Subject: [PATCH] added a few columns in the user table for admin and pin made a list of methods we need to support --- gaas/lib/gaasdLib.php | 6 +++--- gaas/lib/globalLib.php | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/gaas/lib/gaasdLib.php b/gaas/lib/gaasdLib.php index 6d56e31..b54390e 100644 --- a/gaas/lib/gaasdLib.php +++ b/gaas/lib/gaasdLib.php @@ -51,7 +51,7 @@ function createDB() // users_tokendata is used by ga4php, users_otk is the qrcode data link if needed, // tokentype is the software/hardware token types - $sql = 'CREATE TABLE "users" ("users_id" INTEGER PRIMARY KEY AUTOINCREMENT,"users_username" TEXT, "users_realname" TEXT, "users_password" TEXT, "users_tokendata" TEXT, "users_qrcodeid" TEXT, "user_enabled" TEXT, "users_tokentype" TEXT);'; + $sql = 'CREATE TABLE "users" ("users_id" INTEGER PRIMARY KEY AUTOINCREMENT,"users_username" TEXT, "users_realname" TEXT, "users_password" TEXT, "users_tokendata" TEXT, "users_qrcodeid" TEXT, "user_enabled" TEXT, "users_tokentype" TEXT, "users_isadmin" TEXT, "users_pin" TEXT);'; $dbobject->query($sql); //if(!$res) { //echo "Create user table failed\n"; @@ -117,7 +117,7 @@ function createUserInDB($username, $realname) { $db = getDB(); - $sql = "insert into users values (NULL, '$username', '$realname', '', '$data', '', '1', '')"; + $sql = "insert into users values (NULL, '$username', '$realname', '', '$data', '', '1', '', '0', '')"; } // a funciton to deal with Config Vars @@ -207,7 +207,7 @@ class gaasdGA extends GoogleAuthenticator } else { // do insert //error_log("doing user data create"); - $sql = "insert into users values (NULL, '$username', '', '', '$data', '', '1', 'software')"; + $sql = "insert into users values (NULL, '$username', '', '', '$data', '', '1', 'software', '0', '')"; } if($dbObject->query($sql)) { diff --git a/gaas/lib/globalLib.php b/gaas/lib/globalLib.php index b5e840b..4aea836 100644 --- a/gaas/lib/globalLib.php +++ b/gaas/lib/globalLib.php @@ -9,6 +9,30 @@ $TCP_PORT_NUMBER = 21256; global $TCP_PORT_NUMBER; +/* tasks we need to do (- prefix means done or working) + * - status + * - init + * - set ad login + * - set ad client group + * - set ad admin group + * - provision user + * - get users + * - delete user + * - create hardware token + * - list hardware tokens + * - assign hardware token + * disable user + * set user password + * enable admin for user + * disable admin for user + * resync token + * get qrcode + * re-create user token + * set user pin + * authenticate token + * authenticate pin + * + */ // the messages structure, used to extend gaas if needed -- 1.7.0.4