Skip to content
Snippets Groups Projects
Commit b1d15f3d authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Added config option to enable and disable the getuserinfo endpoint in oauth module.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1497 44740490-163a-0410-bde0-09ae8108e29a
parent 34d67462
No related branches found
No related tags found
No related merge requests found
<?php
/*
* Configuration for the OAuth module.
*
* $Id$
*/
$config = array (
/* Enable the getUserInfo endpoint. Do not enable unless you know what you do.
* It may give external parties access to userInfo unless properly secured.
*/
'getUserInfo.enable' => FALSE,
);
......@@ -2,6 +2,12 @@
require_once(dirname(dirname(__FILE__)) . '/libextinc/OAuth.php');
$oauthconfig = SimpleSAML_Configuration::getConfig('module_oauth.php');
if (!$oauthconfig->getBoolean('getUserInfo.enable', FALSE)) {
throw new Exception('Get user info endpoint is disabled. This endpoint can be enabled in the module_oauth.php configuration file.');
}
$store = new sspmod_oauth_OAuthStore();
$server = new sspmod_oauth_OAuthServer($store);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment