29 require_once
'HTTP/Client.php';
33 require_once
'Auth/Container.php';
66 var
$url =
'https://pear.php.net/rest-login.php/';
91 if (!is_array(
$data)) {
94 if (isset(
$data[
'karma'])) {
95 if (is_array(
$data[
'karma'])) {
96 $this->karma =
$data[
'karma'];
98 $this->karma = array(
$data[
'karma']);
102 if (isset(
$data[
'url'])) {
103 $this->url =
$data[
'url'];
127 $code =
$client->get($this->url .
'/getsalt');
131 $resp =
$client->currentResponse();
132 $salt = $resp[
'body'];
134 $this->
log(
'Auth_Container_PEAR::fetchData() calling validate.',
AUTH_LOG_DEBUG);
135 $postOptions = array(
136 'username' => $username,
137 'password' => md5($salt . md5($password))
139 if (is_array($this->karma) && count($this->karma) > 0) {
140 $postOptions[
'karma'] = implode(
',', $this->karma);
143 $code =
$client->post($this->url .
'/validate', $postOptions);
147 $resp =
$client->currentResponse();
149 list($code, $message) = explode(
' ', $resp[
'body'], 1);
const AUTH_LOG_DEBUG
Auth Log level - DEBUG.
while($lm_rec=$ilDB->fetchAssoc($lm_set)) $data
& raiseError($message=null, $code=null, $mode=null, $options=null, $userinfo=null, $error_class=null, $skipmsg=false)
This method is a wrapper that returns an instance of the configured error class with this object's de...
log($message, $level=AUTH_LOG_DEBUG)
Log a message to the Auth log.
Auth_Container_Pear($data=null)
Constructor.
fetchData($username, $password)
Get user information from pear.php.net.