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

Public Member Functions

 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

 $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 39 of file Container.php.

Member Function Documentation

Auth_Container::addUser (   $username,
  $password,
  $additional = null 
)

Add a new user to the storage container.

Parameters
stringUsername
stringPassword
arrayAdditional information
Returns
boolean

Reimplemented in Auth_Container_DB, Auth_Container_MDB, Auth_Container_MDB2, Auth_Container_File, and Auth_Container_SMBPasswd.

Definition at line 201 of file Container.php.

References AUTH_LOG_DEBUG, AUTH_METHOD_NOT_SUPPORTED, and log().

{
$this->log('Auth_Container::addUser() called.', AUTH_LOG_DEBUG);
}

+ Here is the call graph for this function:

Auth_Container::Auth_Container ( )

Constructor.

Has to be overwritten by each storage class

public

Definition at line 68 of file Container.php.

{
}
Auth_Container::changePassword (   $username,
  $password 
)

Change password for user in the storage container.

Parameters
stringUsername
stringThe new password

Reimplemented in Auth_Container_DB, Auth_Container_MDB, Auth_Container_MDB2, Auth_Container_File, and Auth_Container_SMBPasswd.

Definition at line 230 of file Container.php.

References AUTH_LOG_DEBUG, AUTH_METHOD_NOT_SUPPORTED, and log().

{
$this->log('Auth_Container::changePassword() called.', AUTH_LOG_DEBUG);
}

+ Here is the call graph for this function:

Auth_Container::fetchData (   $username,
  $password,
  $isChallengeResponse = false 
)

Fetch data from storage container.

Has to be overwritten by each storage class

public

Reimplemented in Auth_Container_DB, Auth_Container_MDB, Auth_Container_MDB2, ilAuthContainerCAS, Auth_Container_RADIUS, and ilAuthContainerDatabase.

Definition at line 82 of file Container.php.

References AUTH_LOG_DEBUG, and log().

{
$this->log('Auth_Container::fetchData() called.', AUTH_LOG_DEBUG);
}

+ Here is the call graph for this function:

Auth_Container::getCryptType ( )

Returns the crypt current crypt type of the container.

Returns
string

Reimplemented in Auth_Container_DB, Auth_Container_MDB, and Auth_Container_MDB2.

Definition at line 147 of file Container.php.

{
return('');
}
Auth_Container::getUser (   $username)

Returns a user assoc array.

Containers which want should overide this

Parameters
stringThe username

Reimplemented in ilAuthContainerDatabase.

Definition at line 174 of file Container.php.

References AUTH_LOG_DEBUG, AUTH_METHOD_NOT_SUPPORTED, listUsers(), and log().

{
$this->log('Auth_Container::getUser() called.', AUTH_LOG_DEBUG);
$users = $this->listUsers();
if ($users === AUTH_METHOD_NOT_SUPPORTED) {
}
for ($i=0; $c = count($users), $i<$c; $i++) {
if ($users[$i]['username'] == $username) {
return $users[$i];
}
}
return false;
}

+ Here is the call graph for this function:

Auth_Container::listUsers ( )

List all users that are available from the storage container.

Reimplemented in Auth_Container_DB, Auth_Container_MDB, Auth_Container_MDB2, Auth_Container_Array, Auth_Container_File, and Auth_Container_SMBPasswd.

Definition at line 158 of file Container.php.

References AUTH_LOG_DEBUG, AUTH_METHOD_NOT_SUPPORTED, and log().

Referenced by getUser().

{
$this->log('Auth_Container::listUsers() called.', AUTH_LOG_DEBUG);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Auth_Container::log (   $message,
  $level = AUTH_LOG_DEBUG 
)

Log a message to the Auth log.

Parameters
stringThe message
int
Returns
boolean

Definition at line 246 of file Container.php.

Referenced by ilAuthContainerECS\__construct(), ilAuthContainerLDAP\__construct(), Auth_Container_IMAP\_checkServer(), Auth_Container_MDB\_connect(), Auth_Container_MDB2\_connect(), Auth_Container_DB\_connect(), Auth_Container_DBLite\_connect(), Auth_Container_LDAP\_connect(), Auth_Container_LDAP\_disconnect(), Auth_Container_LDAP\_getBaseDN(), Auth_Container_File\_load(), Auth_Container_SMBPasswd\addUser(), Auth_Container_File\addUser(), addUser(), Auth_Container_MDB2\addUser(), Auth_Container_MDB\addUser(), Auth_Container_DB\addUser(), Auth_Container_SMBPasswd\changePassword(), Auth_Container_File\changePassword(), changePassword(), Auth_Container_MDB2\changePassword(), Auth_Container_MDB\changePassword(), Auth_Container_DB\changePassword(), ilAuthContainerMultiple\checkAuthObserver(), ilAuthContainerLDAP\checkGroup(), Auth_Container_LDAP\checkGroup(), ilAuthContainerMultiple\failedLoginObserver(), ilAuthContainerECS\failedLoginObserver(), Auth_Container_vpopmail\fetchData(), fetchData(), ilAuthContainerMultiple\fetchData(), ilAuthContainerLDAP\fetchData(), Auth_Container_SMBPasswd\fetchData(), Auth_Container_File\fetchData(), Auth_Container_Vpopmaild\fetchData(), Auth_Container_KADM5\fetchData(), Auth_Container_SAP\fetchData(), Auth_Container_Pear\fetchData(), Auth_Container_RADIUS\fetchData(), Auth_Container_POP3\fetchData(), Auth_Container_Array\fetchData(), Auth_Container_Multiple\fetchData(), Auth_Container_SOAP\fetchData(), Auth_Container_SOAP5\fetchData(), Auth_Container_IMAP\fetchData(), Auth_Container_DBLite\fetchData(), Auth_Container_MDB2\fetchData(), Auth_Container_MDB\fetchData(), Auth_Container_DB\fetchData(), Auth_Container_LDAP\fetchData(), getUser(), Auth_Container_SMBPasswd\listUsers(), Auth_Container_File\listUsers(), Auth_Container_Array\listUsers(), listUsers(), Auth_Container_MDB2\listUsers(), Auth_Container_MDB\listUsers(), Auth_Container_DB\listUsers(), ilAuthContainerMultiple\loginObserver(), ilAuthContainerECS\loginObserver(), Auth_Container_MDB\query(), Auth_Container_MDB2\query(), Auth_Container_SMBPasswd\removeUser(), Auth_Container_File\removeUser(), removeUser(), Auth_Container_MDB2\removeUser(), Auth_Container_MDB\removeUser(), Auth_Container_DB\removeUser(), and verifyPassword().

{
if (is_null($this->_auth_obj)) {
return false;
} else {
return $this->_auth_obj->log($message, $level);
}
}

+ Here is the caller graph for this function:

Auth_Container::removeUser (   $username)

Remove user from the storage container.

Parameters
stringUsername

Reimplemented in Auth_Container_DB, Auth_Container_MDB, Auth_Container_MDB2, Auth_Container_File, and Auth_Container_SMBPasswd.

Definition at line 215 of file Container.php.

References AUTH_LOG_DEBUG, AUTH_METHOD_NOT_SUPPORTED, and log().

{
$this->log('Auth_Container::removeUser() called.', AUTH_LOG_DEBUG);
}

+ Here is the call graph for this function:

Auth_Container::supportsChallengeResponse ( )

Returns true if the container supports Challenge Response password authentication.

Reimplemented in Auth_Container_DB, Auth_Container_MDB, and Auth_Container_MDB2.

Definition at line 134 of file Container.php.

{
return(false);
}
Auth_Container::verifyPassword (   $password1,
  $password2,
  $cryptType = "md5" 
)

Crypt and verfiy the entered password.

Parameters
stringEntered password
stringPassword from the data container (usually this password is already encrypted.
stringType of algorithm with which the password from the container has been crypted. (md5, crypt etc.) Defaults to "md5".
Returns
bool True, if the passwords match

Definition at line 101 of file Container.php.

References AUTH_LOG_DEBUG, elseif(), and log().

Referenced by Auth_Container_Array\fetchData(), Auth_Container_DBLite\fetchData(), Auth_Container_MDB\fetchData(), Auth_Container_MDB2\fetchData(), and Auth_Container_DB\fetchData().

{
$this->log('Auth_Container::verifyPassword() called.', AUTH_LOG_DEBUG);
switch ($cryptType) {
case "crypt" :
return ((string)crypt($password1, $password2) === (string)$password2);
break;
case "none" :
case "" :
return ((string)$password1 === (string)$password2);
break;
case "md5" :
return ((string)md5($password1) === (string)$password2);
break;
default :
if (function_exists($cryptType)) {
return ((string)$cryptType($password1) === (string)$password2);
} elseif (method_exists($this,$cryptType)) {
return ((string)$this->$cryptType($password1) === (string)$password2);
} else {
return false;
}
break;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

Auth_Container::$_auth_obj = null

The Auth object this container is attached to.

public

Definition at line 56 of file Container.php.

Referenced by ilAuthContainerMultiple\fetchData(), and Auth_Container_Multiple\fetchData().

Auth_Container::$activeUser = ""

User that is currently selected from the storage container.

public

Definition at line 49 of file Container.php.


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