ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
Auth_Container_SOAP5 Class Reference
+ Inheritance diagram for Auth_Container_SOAP5:
+ Collaboration diagram for Auth_Container_SOAP5:

Public Member Functions

 Auth_Container_SOAP5 ($options)
 Constructor of the container class.
 fetchData ($username, $password)
 Fetch data from SOAP service.
 _validateOptions ()
 Validate that the options passed to the container class are enough for us to proceed.
 _setDefaults ()
 Set some default options.
- Public Member Functions inherited from Auth_Container
 Auth_Container ()
 Constructor.
 fetchData ($username, $password, $isChallengeResponse=false)
 Fetch data from storage container.
 verifyPassword ($password1, $password2, $cryptType="md5")
 Crypt and verfiy the entered password.
 supportsChallengeResponse ()
 Returns true if the container supports Challenge Response password authentication.
 getCryptType ()
 Returns the crypt current crypt type of the container.
 listUsers ()
 List all users that are available from the storage container.
 getUser ($username)
 Returns a user assoc array.
 addUser ($username, $password, $additional=null)
 Add a new user to the storage container.
 removeUser ($username)
 Remove user from the storage container.
 changePassword ($username, $password)
 Change password for user in the storage container.
 log ($message, $level=AUTH_LOG_DEBUG)
 Log a message to the Auth log.
- Public Member Functions inherited from ilAuthContainerBase
 loginObserver ($a_username, $a_auth)
 Called after successful login.
 failedLoginObserver ($a_username, $a_auth)
 Called after failed login.
 checkAuthObserver ($a_username, $a_auth)
 Called after check auth requests.
 logoutObserver ($a_username, $a_auth)
 Called after logout.

Data Fields

 $_requiredOptions
 $_options = array()
 $_features = array()
 $soapResponse = array()
- Data Fields inherited from Auth_Container
 $activeUser = ""
 User that is currently selected from the storage container.
 $_auth_obj = null
 The Auth object this container is attached to.

Detailed Description

Definition at line 107 of file SOAP5.php.

Member Function Documentation

Auth_Container_SOAP5::_setDefaults ( )

Set some default options.

private

Returns
void

Definition at line 254 of file SOAP5.php.

Referenced by Auth_Container_SOAP5().

{
$this->_options['wsdl'] = null;
$this->_options['location'] = null;
$this->_options['uri'] = null;
$this->_options['method'] = null;
$this->_options['usernamefield'] = 'username';
$this->_options['passwordfield'] = 'password';
$this->_options['matchpasswords'] = true;
}

+ Here is the caller graph for this function:

Auth_Container_SOAP5::_validateOptions ( )

Validate that the options passed to the container class are enough for us to proceed.

private

Parameters
array

Definition at line 229 of file SOAP5.php.

References PEAR\raiseError().

Referenced by fetchData().

{
if ( ( is_null($this->_options['wsdl'])
&& is_null($this->_options['location'])
&& is_null($this->_options['uri']))
|| ( is_null($this->_options['wsdl'])
&& ( is_null($this->_options['location'])
|| is_null($this->_options['uri'])))) {
return PEAR::raiseError('Either a WSDL file or a location/uri pair must be specified.');
}
if (is_null($this->_options['method'])) {
return PEAR::raiseError('A method to call on the soap service must be specified.');
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Auth_Container_SOAP5::Auth_Container_SOAP5 (   $options)

Constructor of the container class.

Parameters
$options,associativearray with endpoint, namespace, method, usernamefield, passwordfield and optional features

Definition at line 156 of file SOAP5.php.

References _setDefaults().

{
$this->_setDefaults();
foreach ($options as $name => $value) {
$this->_options[$name] = $value;
}
if (!empty($this->_options['_features'])) {
$this->_features = $this->_options['_features'];
unset($this->_options['_features']);
}
}

+ Here is the call graph for this function:

Auth_Container_SOAP5::fetchData (   $username,
  $password 
)

Fetch data from SOAP service.

Requests the SOAP service for the given username/password combination.

Parameters
stringUsername
stringPassword
Returns
mixed Returns the SOAP response or false if something went wrong

Definition at line 183 of file SOAP5.php.

References $result, _validateOptions(), AUTH_LOG_DEBUG, PEAR\isError(), Auth_Container\log(), and PEAR\raiseError().

{
$this->log('Auth_Container_SOAP5::fetchData() called.', AUTH_LOG_DEBUG);
return $result;
// create a SOAP client
$soapClient = new SoapClient($this->_options["wsdl"], $this->_options);
$params = array();
// first, assign the optional features
foreach ($this->_features as $fieldName => $fieldValue) {
$params[$fieldName] = $fieldValue;
}
// assign username and password ...
$params[$this->_options['usernamefield']] = $username;
$params[$this->_options['passwordfield']] = $password;
try {
$this->soapResponse = $soapClient->__soapCall($this->_options['method'], $params);
if ($this->_options['matchpasswords']) {
// check if passwords match
if ($password == $this->soapResponse[$this->_options['passwordfield']]) {
return true;
} else {
return false;
}
} else {
return true;
}
} catch (SoapFault $e) {
return PEAR::raiseError("Error retrieving authentication data. Received SOAP Fault: ".$e->faultstring, $e->faultcode);
}
}

+ Here is the call graph for this function:

Field Documentation

Auth_Container_SOAP5::$_features = array()

Definition at line 138 of file SOAP5.php.

Auth_Container_SOAP5::$_options = array()

Definition at line 131 of file SOAP5.php.

Auth_Container_SOAP5::$_requiredOptions
Initial value:
array(
'location',
'uri',
'method',
'usernamefield',
'passwordfield',
'wsdl',
)

Definition at line 117 of file SOAP5.php.

Auth_Container_SOAP5::$soapResponse = array()

Definition at line 145 of file SOAP5.php.


The documentation for this class was generated from the following file: