/**
* Constructor
*
* Note that the person is tied to a OAuth datastore here
*/
function __construct($person = NULL)
{
parent::__construct($person);
/* Find the path to simpelsamlphp and run the autoloader */
try {
$sspdir = Config::get_config('simplesaml_path');
} catch (KeyNotFoundException $knfe) {
echo "Cannot find path to simplesaml. This install is not valid. Aborting.<br />\n";
Logger::log_event(LOG_ALERT, "Trying to instantiate simpleSAMLphp without a configured path.");
exit(0);
}
require_once $sspdir . '/lib/_autoload.php';
SimpleSAML_Configuration::setConfigDir($sspdir . '/config');
$this->oauthStore = new OAuthDataStore_Confusa();
$this->oauthServer = new sspmod_oauth_OAuthServer($this->oauthStore);
$hmac_method = new OAuthSignatureMethod_HMAC_SHA1();
$this->oauthServer->add_signature_method($hmac_method);
$req = OAuthRequest::from_request();
list($consumer, $this->accessToken) = $this->oauthServer->verify_request($req);
$this->isAuthenticated = isset($this->accessToken);
}