ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
getUserInfo.php
Go to the documentation of this file.
1
<?php
2
3
require_once(dirname(dirname(__FILE__)) .
'/libextinc/OAuth.php'
);
4
5
$oauthconfig
=
SimpleSAML_Configuration::getConfig
(
'module_oauth.php'
);
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
11
$store
=
new
sspmod_oauth_OAuthStore
();
12
$server
=
new
sspmod_oauth_OAuthServer
(
$store
);
13
14
$hmac_method
=
new
OAuthSignatureMethod_HMAC_SHA1
();
15
$plaintext_method
=
new
OAuthSignatureMethod_PLAINTEXT
();
16
17
$server
->add_signature_method(
$hmac_method
);
18
$server
->add_signature_method(
$plaintext_method
);
19
20
$req
=
OAuthRequest::from_request
();
21
list(
$consumer
, $token) =
$server
->verify_request(
$req
);
22
23
$data
=
$store
->getAuthorizedData($token->key);
24
25
echo json_encode(
$data
);
26
$data
$data
Definition:
getUserInfo.php:23
$plaintext_method
$plaintext_method
Definition:
getUserInfo.php:15
$oauthconfig
$oauthconfig
Definition:
getUserInfo.php:5
$req
$req
Definition:
getUserInfo.php:20
$store
if(! $oauthconfig->getBoolean('getUserInfo.enable', FALSE)) $store
Definition:
getUserInfo.php:11
$hmac_method
$hmac_method
Definition:
getUserInfo.php:14
SimpleSAML_Configuration\getConfig
static getConfig($filename='config.php', $configSet='simplesaml')
Load a configuration file from a configuration set.
Definition:
Configuration.php:209
$consumer
$consumer
Definition:
demo.php:30
OAuthSignatureMethod_PLAINTEXT
The PLAINTEXT method does not provide any security protection and SHOULD only be used over a secure c...
Definition:
OAuth.php:154
$server
$server
Definition:
getUserInfo.php:12
OAuthRequest\from_request
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:270
sspmod_oauth_OAuthServer
Definition:
OAuthServer.php:11
sspmod_oauth_OAuthStore
Definition:
OAuthStore.php:14
OAuthSignatureMethod_HMAC_SHA1
The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104] where t...
Definition:
OAuth.php:128
Exception
libs
composer
vendor
simplesamlphp
simplesamlphp
modules
oauth
www
getUserInfo.php
Generated on Sat Jan 18 2025 19:01:10 for ILIAS by
1.8.13 (using
Doxyfile
)