]> git.mxchange.org Git - friendica.git/blobdiff - mod/amcd.php
Unescape $invite_desc in follow/register templates
[friendica.git] / mod / amcd.php
index 01c6b92da540049d1b77efa176faf3e2803cc0b6..c6013b942d92913f26334731e8b0917427e85b00 100644 (file)
@@ -1,10 +1,17 @@
 <?php
 
-function amcd_content(&$a) {
-header("Content-type: text/json");
-echo <<< EOT
+use Friendica\App;
+
+function amcd_content()
 {
-  "methods": {
+       echo <<< JSON
+{
+  "version":1,
+  "sessionstatus":{
+    "method":"GET",
+    "path":"/session"
+  },
+  "auth-methods": {
     "username-password-form": {
       "connect": {
         "method":"POST",
@@ -12,15 +19,33 @@ echo <<< EOT
         "params": {
           "username":"login-name",
           "password":"password"
-        }
+        },
+        "onsuccess": { "action":"reload" }
       },
       "disconnect": {
         "method":"GET",
-        "path":"/logout"
+        "path":"\/logout"
       }
     }
   }
+  "methods": {
+    "username-password-form": {
+      "connect": {
+        "method":"POST",
+        "path":"\/login",
+        "params": {
+          "username":"login-name",
+          "password":"password"
+        },
+        "onsuccess": { "action":"reload" }
+      },
+      "disconnect": {
+        "method":"GET",
+        "path":"\/logout"
+      }
+    }
+  }
+}
+JSON;
+       killme();
 }
-EOT;
-killme();
-}
\ No newline at end of file