set token types
[ga4php.git] / authserver / authd / authd.php
index 15416c0..576a507 100644 (file)
@@ -115,6 +115,24 @@ if($pid == -1) {
                                }
                                
                                break;
+                       case MSG_SYNC_TOKEN:
+                               if(!isset($msg["username"])) {
+                                       msg_send($cl_queue, MSG_SYNC_TOKEN, false);
+                               } else {
+                                       $tokenone = $msg["tokenone"];
+                                       $tokentwo = $msg["tokentwo"];
+                                       
+                                       msg_send($cl_queue, MSG_SYNC_TOKEN, $myga->resyncCode($msg["username"], $tokenone, $tokentwo));
+                               }
+                               
+                               break;
+                       case MSG_GET_TOKEN_TYPE:
+                               if(!isset($msg["username"])) {
+                                       msg_send($cl_queue, MSG_GET_TOKEN_TYPE, false);
+                               } else {
+                                       msg_send($cl_queue, MSG_GET_TOKEN_TYPE, $myga->getTokenType($msg["username"]));
+                               }
+                               break;
                        case MSG_ADD_USER_TOKEN:
                                echo "Call to add user token\n";
                                if(!isset($msg["username"])) {