]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/Router.php
Add an endpoint to refresh the token
[github/shaarli/Shaarli.git] / application / Router.php
index c9a519120eecf3274c1b66a7df5f4e2deacbec95..f6896b1cfcd578ac02792d0f9c4f673f169aa136 100644 (file)
@@ -45,6 +45,8 @@ class Router
 
     public static $PAGE_SAVE_PLUGINSADMIN = 'save_pluginadmin';
 
+    public static $GET_TOKEN = 'token';
+
     /**
      * Reproducing renderPage() if hell, to avoid regression.
      *
@@ -142,6 +144,10 @@ class Router
             return self::$PAGE_SAVE_PLUGINSADMIN;
         }
 
+        if (startsWith($query, 'do='. self::$GET_TOKEN)) {
+            return self::$GET_TOKEN;
+        }
+
         return self::$PAGE_LINKLIST;
     }
 }