use custom HTTP adapter to get rid of HTTP warnings thrown by XML_XRD's simplexml_load_file usage
This commit is contained in:
parent
3acd0e8db4
commit
09cf21aa7e
@ -105,15 +105,15 @@
|
||||
channel="pear.php.net"
|
||||
minimum_version="0.4.0"
|
||||
/>
|
||||
<package name="HTML_Request2"
|
||||
channel="pear.php.net"
|
||||
minimum_version="2.0.0"
|
||||
/>
|
||||
<package name="Net_WebFinger"
|
||||
channel="pear.php.net"
|
||||
minimum_version="0.2.0"
|
||||
/>
|
||||
<!-- unit tests: -->
|
||||
<package name="HTML_Request2"
|
||||
channel="pear.php.net"
|
||||
minimum_version="2.0.0"
|
||||
/>
|
||||
<package name="Stream_Var"
|
||||
channel="pear.php.net"
|
||||
minimum_version="1.1.0"
|
||||
|
@ -16,7 +16,6 @@ require_once 'SemanticScuttle/Model/OpenId.php';
|
||||
require_once 'OpenID.php';
|
||||
require_once 'OpenID/RelyingParty.php';
|
||||
require_once 'OpenID/Extension/SREG11.php';
|
||||
require_once 'Net/WebFinger.php';
|
||||
|
||||
/**
|
||||
* SemanticScuttle OpenID verification and management
|
||||
@ -75,7 +74,14 @@ class SemanticScuttle_Service_OpenId extends SemanticScuttle_DbService
|
||||
}
|
||||
|
||||
require_once 'Net/WebFinger.php';
|
||||
require_once 'HTTP/Request2.php';
|
||||
|
||||
$req = new HTTP_Request2();
|
||||
$req->setConfig('follow_redirects', true);
|
||||
$req->setHeader('User-Agent', 'SemanticScuttle');
|
||||
|
||||
$wf = new Net_WebFinger();
|
||||
$wf->setHttpClient($req);
|
||||
$react = $wf->finger($identifier);
|
||||
if ($react->openid === null) {
|
||||
throw new SemanticScuttle_Exception_User(
|
||||
|
Loading…
Reference in New Issue
Block a user