ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
getUserInfo.php
Go to the documentation of this file.
1 <?php
2 
3 require_once(dirname(dirname(__FILE__)) . '/libextinc/OAuth.php');
4 
6 
7 if (!$oauthconfig->getBoolean('getUserInfo.enable', FALSE)) {
8  throw new Exception('Get user info endpoint is disabled. This endpoint can be enabled in the module_oauth.php configuration file.');
9 }
10 
13 
16 
17 $server->add_signature_method($hmac_method);
18 $server->add_signature_method($plaintext_method);
19 
21 list($consumer, $token) = $server->verify_request($req);
22 
23 $data = $store->getAuthorizedData($token->key);
24 
25 echo json_encode($data);
26 
static from_request($http_method=null, $http_url=null, $parameters=null)
attempt to build up a request from what was passed to the server
Definition: OAuth.php:293
$data
Definition: getUserInfo.php:23
$plaintext_method
Definition: getUserInfo.php:15
$oauthconfig
Definition: getUserInfo.php:5
$req
Definition: getUserInfo.php:20
if(! $oauthconfig->getBoolean('getUserInfo.enable', FALSE)) $store
Definition: getUserInfo.php:11
$hmac_method
Definition: getUserInfo.php:14
static getConfig($filename='config.php', $configSet='simplesaml')
Load a configuration file from a configuration set.
The PLAINTEXT method does not provide any security protection and SHOULD only be used over a secure c...
Definition: OAuth.php:168
$server
Definition: getUserInfo.php:12
The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104] where t...
Definition: OAuth.php:139