2010-11-11 05:49:28 -05:00
|
|
|
<?php
|
2016-02-07 09:11:34 -05:00
|
|
|
|
2016-12-20 04:58:55 -05:00
|
|
|
function amcd_content(App &$a) {
|
2010-11-11 17:53:39 -05:00
|
|
|
//header("Content-type: text/json");
|
2010-11-11 05:49:28 -05:00
|
|
|
echo <<< EOT
|
|
|
|
{
|
2010-11-11 17:53:39 -05:00
|
|
|
"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"
|
2010-11-11 17:53:39 -05: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 05:49:28 -05:00
|
|
|
},
|
|
|
|
"disconnect": {
|
|
|
|
"method":"GET",
|
2010-11-11 17:53:39 -05:00
|
|
|
"path":"\/logout"
|
2010-11-11 05:49:28 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
EOT;
|
|
|
|
killme();
|
2016-02-07 09:11:34 -05:00
|
|
|
}
|