X-Git-Url: http://git.pjr.cc/?p=ga4php.git;a=blobdiff_plain;f=authserver%2Fusercmd.php;h=5888c0f8b0a271d5e6b8fab692fba530278ca533;hp=3c094dbb9657f77ded1ad821f43c4163dc49d103;hb=590f7600a8319d4ae08c32a32e7713ea6f9e2edb;hpb=fbe9740a0e8f0ee450cf2657fca374799e715c7d diff --git a/authserver/usercmd.php b/authserver/usercmd.php index 3c094db..5888c0f 100644 --- a/authserver/usercmd.php +++ b/authserver/usercmd.php @@ -37,10 +37,18 @@ if(!isset($argv[1])) { echo "\tgetusers: getusers - gets a list of users\n"; echo "\tgetotk: getotk - gets the OTKID for a key\n"; echo "\tradauth: radauth - for radius, only returns a code\n"; + echo "\tsynctoken: synctoken - resync's a hotp token based on two token codes\n"; return 0; } switch($argv[1]) { + case "synctoken": + if($myAC->syncUserToken($argv[2], $argv[3], $argv[4])) { + echo "Token synced\n"; + } else { + echo "Token not synced\n"; + } + break; case "radauth": if($myAC->authUserToken($argv[2], $argv[3])==1) { syslog(LOG_WARNING, "Got good request for user, ".$argv[2]);