X-Git-Url: http://git.pjr.cc/?a=blobdiff_plain;f=authserver%2Fwww%2Fuser_actions.php;h=35b1f8a4daa47fc23c6a55576f671f5a29604d84;hb=4104b257d1998fe7cac9c651975e6e3cb8948705;hp=6b763b6e1331d2039e72dc611b8efa6d13a72870;hpb=d4590a3f34021216c9da29786922fddaf804d113;p=ga4php.git diff --git a/authserver/www/user_actions.php b/authserver/www/user_actions.php index 6b763b6..35b1f8a 100644 --- a/authserver/www/user_actions.php +++ b/authserver/www/user_actions.php @@ -16,6 +16,15 @@ if(isset($_SESSION["user_loggedin"])) if($_SESSION["user_loggedin"]) { if(isset($_REQUEST["action"])) { error_log("action set: ".$_REQUEST["action"]); switch($_REQUEST["action"]) { + case "actuallygettoken": + $otkid = $_REQUEST["otkid"]; + $username = $_REQUEST["username"]; + error_log("requesting otk, $otk"); + $otk_img = $myAC->getOtkPng($username,$otkid); + header("Content-type: image/png"); + echo $otk_img; + exit(0); + break; case "login": error_log("being login"); $username = $_REQUEST["username"]; @@ -34,7 +43,7 @@ if(isset($_REQUEST["action"])) { case "logout": $_SESSION["user_loggedin"] = false; $_SESSION["username"] = ""; - header("Location: admin.php"); + header("Location: index.php?message=".urlencode("logged out")); exit(0); break;