12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <?php
- if (!defined('STATUSNET')) {
- exit(1);
- }
- class AccountManagementControlDocumentAction extends Action
- {
-
- function handle()
- {
- parent::handle();
- header('Content-Type: application/json; charset=utf-8');
- $amcd = array();
- if(Event::handle('StartAccountManagementControlDocument', array(&$amcd))) {
- $amcd['version'] = 1;
- $amcd['sessionstatus'] = array(
- 'method' => 'GET',
- 'path' => common_local_url('AccountManagementSessionStatus')
- );
- $amcd['auth-methods'] = array(
- 'username-password-form' => array(
- 'connect' => array(
- 'method' => 'POST',
- 'path' => common_local_url('login'),
- 'params' => array(
- 'username' => 'nickname',
- 'password' => 'password'
- )
- ),
- 'disconnect' => array(
- 'method' => 'GET',
- 'path' => common_local_url('logout')
- )
- )
- );
- Event::handle('EndAccountManagementControlDocument', array(&$amcd));
- }
-
- print json_encode($amcd);
- return true;
- }
- function isReadOnly()
- {
- return true;
- }
- }
|