ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
Auth_Container_Array Class Reference
+ Inheritance diagram for Auth_Container_Array:
+ Collaboration diagram for Auth_Container_Array:

Public Member Functions

 Auth_Container_Array ($data)
 Constructor for Array Container.
 fetchData ($user, $pass)
 Get user information from array.
 listUsers ()
 Returns a list of users available within the container.
- 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.
 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

 $users
 The users and their password to authenticate against.
 $cryptType = 'none'
 The cryptType used on the passwords.
- 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 71 of file Array.php.

Member Function Documentation

Auth_Container_Array::Auth_Container_Array (   $data)

Constructor for Array Container.

Parameters
array$dataOptions for the container
Returns
void

Definition at line 98 of file Array.php.

References $data, and PEAR\raiseError().

{
if (!is_array($data)) {
PEAR::raiseError('The options for Auth_Container_Array must be an array');
}
if (isset($data['users']) && is_array($data['users'])) {
$this->users = $data['users'];
} else {
$this->users = array();
PEAR::raiseError('Auth_Container_Array: no user data found in options array');
}
if (isset($data['cryptType'])) {
$this->cryptType = $data['cryptType'];
}
}

+ Here is the call graph for this function:

Auth_Container_Array::fetchData (   $user,
  $pass 
)

Get user information from array.

This function uses the given username to fetch the corresponding login data from the array. If an account that matches the passed username and password is found, the function returns true. Otherwise it returns false.

Parameters
stringUsername
stringPassword
Returns
boolean|PEAR_Error Error object or boolean

Definition at line 129 of file Array.php.

References $pass, AUTH_LOG_DEBUG, Auth_Container\log(), and Auth_Container\verifyPassword().

{
$this->log('Auth_Container_Array::fetchData() called.', AUTH_LOG_DEBUG);
if ( isset($this->users[$user])
&& $this->verifyPassword($pass, $this->users[$user], $this->cryptType)) {
return true;
}
return false;
}

+ Here is the call graph for this function:

Auth_Container_Array::listUsers ( )

Returns a list of users available within the container.

Returns
array

Reimplemented from Auth_Container.

Definition at line 147 of file Array.php.

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

{
$this->log('Auth_Container_Array::listUsers() called.', AUTH_LOG_DEBUG);
$ret = array();
foreach ($this->users as $username => $password) {
$ret[]['username'] = $username;
}
return $ret;
}

+ Here is the call graph for this function:

Field Documentation

string Auth_Container_Array::$cryptType = 'none'

The cryptType used on the passwords.

Definition at line 87 of file Array.php.

array Auth_Container_Array::$users

The users and their password to authenticate against.

Definition at line 80 of file Array.php.


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