diff options
Diffstat (limited to 'mod/amcd.php')
-rw-r--r-- | mod/amcd.php | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/mod/amcd.php b/mod/amcd.php index 01c6b92da..a2a1327e6 100644 --- a/mod/amcd.php +++ b/mod/amcd.php @@ -1,10 +1,15 @@ <?php function amcd_content(&$a) { -header("Content-type: text/json"); +//header("Content-type: text/json"); echo <<< EOT { - "methods": { + "version":1, + "sessionstatus":{ + "method":"GET", + "path":"/session" + }, + "auth-methods": { "username-password-form": { "connect": { "method":"POST", @@ -12,11 +17,29 @@ echo <<< EOT "params": { "username":"login-name", "password":"password" - } + }, + "onsuccess": { "action":"reload" } + }, + "disconnect": { + "method":"GET", + "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" + "path":"\/logout" } } } |