Revision 5888,
728 bytes
checked in by cristiano, 12 years ago
(diff) |
Ticket #2598 - implementação base REST + oauth
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | require_once (dirname(__FILE__).'/api/controller.php'); |
---|
4 | |
---|
5 | $me = Controller::read(array('concept' => 'user', 'service' => 'OpenLDAP' , 'id' => Config::me('uidNumber'))); |
---|
6 | $me['token'] = $_SESSION['oauth']['access_token']; |
---|
7 | echo json_encode( $me ); |
---|
8 | |
---|
9 | // if( !$me ) |
---|
10 | // return; |
---|
11 | // |
---|
12 | // $links = Controller::links(); |
---|
13 | // |
---|
14 | // $return = array(); |
---|
15 | // |
---|
16 | // foreach( $links as $concept => $link ) |
---|
17 | // { |
---|
18 | // $concepts = array(); |
---|
19 | // |
---|
20 | // foreach( $link as $linkName => $linkTarget ) |
---|
21 | // if( Controller::isConcept( $linkName ) ) |
---|
22 | // $concepts[ $linkName ] = true; |
---|
23 | // |
---|
24 | // $return[ $concept ] = array( 'concepts' => $concepts, 'links' => $link ); |
---|
25 | // } |
---|
26 | // |
---|
27 | // echo json_encode( array( 'me' => $me, 'links' => $return ) ); |
---|
Note: See
TracBrowser
for help on using the repository browser.