friendica/mod/amcd.php

49 lines
910 B
PHP
Raw Normal View History

2010-11-11 05:49:28 -05:00
<?php
function amcd_content(App &$a) {
//header("Content-type: text/json");
2010-11-11 05:49:28 -05:00
echo <<< EOT
{
"version":1,
"sessionstatus":{
"method":"GET",
"path":"/session"
},
"auth-methods": {
2010-11-11 05:49:28 -05:00
"username-password-form": {
"connect": {
"method":"POST",
"path":"/login",
"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" }
2010-11-11 05:49:28 -05:00
},
"disconnect": {
"method":"GET",
"path":"\/logout"
2010-11-11 05:49:28 -05:00
}
}
}
}
EOT;
killme();
}