Skip to content
Snippets Groups Projects
Commit 71d02cef authored by Andjelko Horvat's avatar Andjelko Horvat
Browse files

authtwitter: use SimpleSAML_Configuration::loadFromArray (related to #587).

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3293 44740490-163a-0410-bde0-09ae8108e29a
parent a7a9f4b0
No related branches found
No related tags found
No related merge requests found
......@@ -38,18 +38,10 @@ class sspmod_authtwitter_Auth_Source_Twitter extends SimpleSAML_Auth_Source {
/* Call the parent constructor first, as required by the interface. */
parent::__construct($info, $config);
if (!array_key_exists('key', $config))
throw new Exception('Twitter authentication source is not properly configured: missing [key]');
$this->key = $config['key'];
if (!array_key_exists('secret', $config))
throw new Exception('Twitter authentication source is not properly configured: missing [secret]');
$this->secret = $config['secret'];
// require_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/extlibinc/facebook.php');
$configObject = SimpleSAML_Configuration::loadFromArray($config, 'authsources[' . var_export($this->authId, TRUE) . ']');
$this->key = $configObject->getString('key');
$this->secret = $configObject->getString('secret');
}
......@@ -127,5 +119,3 @@ class sspmod_authtwitter_Auth_Source_Twitter extends SimpleSAML_Auth_Source {
}
}
?>
\ No newline at end of file
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