ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
Auth_Container_KADM5 Class Reference
+ Inheritance diagram for Auth_Container_KADM5:
+ Collaboration diagram for Auth_Container_KADM5:

Public Member Functions

 Auth_Container_KADM5 ($options)
 Constructor of the container class.
 fetchData ($username, $password)
 Try to login to the KADM5 server.
 _setDefaults ()
 Set some default options.
 _checkServer ()
 Check if the given server and port are reachable.
- 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.
 supportsCaptchaVerification ()
 Returns whether or not the auth container supports the verification of captchas This should be true for those auth methods, which are available in the default login form.

Data Fields

 $options = 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 55 of file KADM5.php.

Member Function Documentation

Auth_Container_KADM5::_checkServer ( )

Check if the given server and port are reachable.

private

Definition at line 156 of file KADM5.php.

References PEAR_ERROR_DIE, and PEAR\raiseError().

Referenced by Auth_Container_KADM5().

{
$fp = @fsockopen ($this->options['hostname'], 88, $errno, $errstr, $this->options['timeout']);
if (is_resource($fp)) {
@fclose($fp);
} else {
$message = "Error connecting to Kerberos V server "
.$this->options['hostname'].":".$this->options['port'];
return PEAR::raiseError($message, 41, PEAR_ERROR_DIE);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Auth_Container_KADM5::_setDefaults ( )

Set some default options.

private

Definition at line 141 of file KADM5.php.

Referenced by Auth_Container_KADM5().

{
$this->options['hostname'] = 'localhost';
$this->options['realm'] = NULL;
$this->options['timeout'] = 10;
$this->options['checkServer'] = false;
}

+ Here is the caller graph for this function:

Auth_Container_KADM5::Auth_Container_KADM5 (   $options)

Constructor of the container class.

$options can have these keys: 'hostname' The hostname of the kerberos server 'realm' The Kerberos V realm 'timeout' The timeout for checking the server 'checkServer' Set to true to check if the server is running when constructing the object

Parameters
$optionsassociative array
Returns
object Returns an error object if something went wrong

Definition at line 81 of file KADM5.php.

References $options, _checkServer(), _setDefaults(), PEAR_ERROR_DIE, and PEAR\raiseError().

{
if (!extension_loaded('kadm5')) {
return PEAR::raiseError("Cannot use Kerberos V authentication, KADM5 extension not loaded!", 41, PEAR_ERROR_DIE);
}
$this->_setDefaults();
if (isset($options['hostname'])) {
$this->options['hostname'] = $options['hostname'];
}
if (isset($options['realm'])) {
$this->options['realm'] = $options['realm'];
}
if (isset($options['timeout'])) {
$this->options['timeout'] = $options['timeout'];
}
if (isset($options['checkServer'])) {
$this->options['checkServer'] = $options['checkServer'];
}
if ($this->options['checkServer']) {
$this->_checkServer();
}
}

+ Here is the call graph for this function:

Auth_Container_KADM5::fetchData (   $username,
  $password 
)

Try to login to the KADM5 server.

Parameters
stringUsername
stringPassword
Returns
boolean

Definition at line 116 of file KADM5.php.

References $server, AUTH_LOG_DEBUG, and Auth_Container\log().

{
$this->log('Auth_Container_KADM5::fetchData() called.', AUTH_LOG_DEBUG);
if ( ($username == NULL) || ($password == NULL) ) {
return false;
}
$server = $this->options['hostname'];
$realm = $this->options['realm'];
$check = @kadm5_init_with_password($server, $realm, $username, $password);
if ($check == false) {
return false;
} else {
return true;
}
}

+ Here is the call graph for this function:

Field Documentation

Auth_Container_KADM5::$options = array()

Definition at line 63 of file KADM5.php.

Referenced by Auth_Container_KADM5().


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