Пример #1
0
 function OpenIDConsumer($http_client = null, $assoc_mngr = null)
 {
     $this->http_client = $http_client ? $http_client : HTTPClient::getHTTPClient();
     $this->assoc_mngr = $assoc_mngr ? $assoc_mngr : new DumbAssociationManager();
 }
Пример #2
0
                    parse_str($parts['query'], $this->query);
                    $response = $this->consumer->check_auth($su, $rt, $pd);
                    $response->doAction($this);
                } else {
                    $this->_headers();
                    echo $this->_inputForm();
                }
            }
        }
    }
}
if (strstr($_SERVER['REQUEST_URI'], 'httpconsumer.php')) {
    // flags used to control consumer behavior.
    $dumb = false;
    $split = false;
    $http_client = HTTPClient::getHTTPClient();
    $assoc_mngr = null;
    $consumer = null;
    if ($dumb) {
        $assoc_mngr = new DumbAssociationManager($http_client);
    } else {
        $assoc_mngr = new DictionaryAssociationManager($http_client);
    }
    $consumer = new SampleConsumer($http_client, $assoc_mngr);
    // print 'Consumer Server running...'
    $handler = new ConsumerHandler($consumer, $_SERVER['SCRIPT_URI'], $split, $dumb);
    $handler->do_GET();
}
?>