Go to the documentation of this file.00001 <?php
00002
00003 require_once "Auth/OpenID/Consumer.php";
00004 require_once "Auth/Yadis/Manager.php";
00005 require_once "Auth/Yadis/PlainHTTPFetcher.php";
00006
00011 class oxOpenIdGenericConsumer extends Auth_OpenID_GenericConsumer
00012 {
00021 public function oxOpenIdGenericConsumer( &$store )
00022 {
00023 $this->store =& $store;
00024 $this->negotiator =& Auth_OpenID_getDefaultNegotiator();
00025 $this->_use_assocs = ($this->store ? true : false);
00026
00027 $this->fetcher = $this->getHTTPFetcher();
00028
00029 $this->session_types = Auth_OpenID_getAvailableSessionTypes();
00030 }
00031
00039 public function getHTTPFetcher( $iTimeout = 20 )
00040 {
00041 if (Auth_Yadis_Yadis::curlPresent() &&
00042 (!defined('Auth_Yadis_CURL_OVERRIDE'))) {
00043 $fetcher = new oxOpenIdHTTPFetcher( $iTimeout );
00044 } else {
00045 $fetcher = new Auth_Yadis_PlainHTTPFetcher( $iTimeout );
00046 }
00047 return $fetcher;
00048 }
00049
00050 }