Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

49 lines
906 B

  1. <?php
  2. function amcd_content(&$a) {
  3. //header("Content-type: text/json");
  4. echo <<< EOT
  5. {
  6. "version":1,
  7. "sessionstatus":{
  8. "method":"GET",
  9. "path":"/session"
  10. },
  11. "auth-methods": {
  12. "username-password-form": {
  13. "connect": {
  14. "method":"POST",
  15. "path":"/login",
  16. "params": {
  17. "username":"login-name",
  18. "password":"password"
  19. },
  20. "onsuccess": { "action":"reload" }
  21. },
  22. "disconnect": {
  23. "method":"GET",
  24. "path":"\/logout"
  25. }
  26. }
  27. }
  28. "methods": {
  29. "username-password-form": {
  30. "connect": {
  31. "method":"POST",
  32. "path":"\/login",
  33. "params": {
  34. "username":"login-name",
  35. "password":"password"
  36. },
  37. "onsuccess": { "action":"reload" }
  38. },
  39. "disconnect": {
  40. "method":"GET",
  41. "path":"\/logout"
  42. }
  43. }
  44. }
  45. }
  46. EOT;
  47. killme();
  48. }