ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
Auth_Container_SOAP Class Reference
+ Inheritance diagram for Auth_Container_SOAP:
+ Collaboration diagram for Auth_Container_SOAP:

Public Member Functions

 Auth_Container_SOAP ($options)
 Constructor of the container class.
 fetchData ($username, $password)
 Fetch data from SOAP service.
- 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()
 $soapClient = null
- 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 90 of file SOAP.php.

Member Function Documentation

Auth_Container_SOAP::Auth_Container_SOAP (   $options)

Constructor of the container class.

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

Definition at line 146 of file SOAP.php.

{
$this->_options = $options;
if (!isset($this->_options['matchpasswords'])) {
$this->_options['matchpasswords'] = true;
}
if (!empty($this->_options['_features'])) {
$this->_features = $this->_options['_features'];
unset($this->_options['_features']);
}
}
Auth_Container_SOAP::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 171 of file SOAP.php.

References AUTH_LOG_DEBUG, PEAR\isError(), and Auth_Container\log().

{
$this->log('Auth_Container_SOAP::fetchData() called.', AUTH_LOG_DEBUG);
// check if all required options are set
if (array_intersect($this->_requiredOptions, array_keys($this->_options)) != $this->_requiredOptions) {
return false;
} else {
// create a SOAP client and set encoding
$this->soapClient = new SOAP_Client($this->_options['endpoint']);
$this->soapClient->setEncoding($this->_options['encoding']);
}
// set the trace option if requested
if (isset($this->_options['trace'])) {
$this->soapClient->__options['trace'] = true;
}
// set the timeout option if requested
if (isset($this->_options['timeout'])) {
$this->soapClient->__options['timeout'] = $this->_options['timeout'];
}
// assign username and password fields
$usernameField = new SOAP_Value($this->_options['usernamefield'],'string', $username);
$passwordField = new SOAP_Value($this->_options['passwordfield'],'string', $password);
$SOAPParams = array($usernameField, $passwordField);
// assign optional features
foreach ($this->_features as $fieldName => $fieldValue) {
$SOAPParams[] = new SOAP_Value($fieldName, 'string', $fieldValue);
}
// make SOAP call
$this->soapResponse = $this->soapClient->call(
$this->_options['method'],
$SOAPParams,
array('namespace' => $this->_options['namespace'])
);
if (!PEAR::isError($this->soapResponse)) {
if ($this->_options['matchpasswords']) {
// check if passwords match
if ($password == $this->soapResponse->{$this->_options['passwordfield']}) {
return true;
} else {
return false;
}
} else {
return true;
}
} else {
return false;
}
}

+ Here is the call graph for this function:

Field Documentation

Auth_Container_SOAP::$_features = array()

Definition at line 121 of file SOAP.php.

Auth_Container_SOAP::$_options = array()

Definition at line 114 of file SOAP.php.

Auth_Container_SOAP::$_requiredOptions
Initial value:
array(
'endpoint',
'namespace',
'method',
'encoding',
'usernamefield',
'passwordfield',
)

Definition at line 100 of file SOAP.php.

Auth_Container_SOAP::$soapClient = null

Definition at line 135 of file SOAP.php.

Auth_Container_SOAP::$soapResponse = array()

Definition at line 128 of file SOAP.php.


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