2010-11-11 10:49:28 +00:00
|
|
|
<?php
|
2016-02-05 20:52:39 +00:00
|
|
|
if(! function_exists('amcd_content')) {
|
2010-11-11 10:49:28 +00:00
|
|
|
function amcd_content(&$a) {
|
2010-11-11 22:53:39 +00:00
|
|
|
//header("Content-type: text/json");
|
2010-11-11 10:49:28 +00:00
|
|
|
echo <<< EOT
|
|
|
|
{
|
2010-11-11 22:53:39 +00:00
|
|
|
"version":1,
|
|
|
|
"sessionstatus":{
|
|
|
|
"method":"GET",
|
|
|
|
"path":"/session"
|
|
|
|
},
|
|
|
|
"auth-methods": {
|
2010-11-11 10:49:28 +00:00
|
|
|
"username-password-form": {
|
|
|
|
"connect": {
|
|
|
|
"method":"POST",
|
|
|
|
"path":"/login",
|
|
|
|
"params": {
|
|
|
|
"username":"login-name",
|
|
|
|
"password":"password"
|
2010-11-11 22:53:39 +00:00
|
|
|
},
|
|
|
|
"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 10:49:28 +00:00
|
|
|
},
|
|
|
|
"disconnect": {
|
|
|
|
"method":"GET",
|
2010-11-11 22:53:39 +00:00
|
|
|
"path":"\/logout"
|
2010-11-11 10:49:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
EOT;
|
|
|
|
killme();
|
2016-02-05 20:52:39 +00:00
|
|
|
}
|
|
|
|
}
|