ILIAS
Release_4_4_x_branch Revision 61816
|
Public Member Functions | |
Auth_Container_MDB2 ($dsn) | |
Constructor of the container class. | |
_connect ($dsn) | |
Connect to database by using the given DSN string. | |
_prepare () | |
Prepare database connection. | |
query ($query) | |
Prepare query to the database. | |
_setDefaults () | |
Set some default options. | |
_parseOptions ($array) | |
Parse options passed to the container class. | |
_quoteDBFields () | |
Quote the db_fields option to avoid the possibility of SQL injection. | |
fetchData ($username, $password, $isChallengeResponse=false) | |
Get user information from database. | |
listUsers () | |
Returns a list of users from the container. | |
addUser ($username, $password, $additional="") | |
Add user to the storage container. | |
removeUser ($username) | |
Remove user from the storage container. | |
changePassword ($username, $password) | |
Change password for user in the storage container. | |
supportsChallengeResponse () | |
Determine if this container supports password authentication with challenge response. | |
getCryptType () | |
Returns the selected crypt type for this container. | |
Public Member Functions inherited from Auth_Container | |
Auth_Container () | |
Constructor. | |
verifyPassword ($password1, $password2, $cryptType="md5") | |
Crypt and verfiy the entered password. | |
getUser ($username) | |
Returns a user assoc array. | |
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() | |
$db = null | |
$dsn = '' | |
$activeUser = '' | |
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. |
Auth_Container_MDB2::_connect | ( | $dsn | ) |
Connect to database by using the given DSN string.
private
mixed | DSN string | array | mdb object |
Definition at line 110 of file MDB2.php.
References $dsn, $t, AUTH_LOG_DEBUG, MDB2\connect(), PEAR\isError(), MDB2\isError(), Auth_Container\log(), PEAR_ERROR_RETURN, and PEAR\raiseError().
Referenced by _prepare().
Auth_Container_MDB2::_parseOptions | ( | $array | ) |
Parse options passed to the container class.
private
array |
Definition at line 229 of file MDB2.php.
Referenced by Auth_Container_MDB2().
Auth_Container_MDB2::_prepare | ( | ) |
Prepare database connection.
This function checks if we have already opened a connection to the database. If that's not the case, a new connection is opened.
private
Definition at line 165 of file MDB2.php.
References _connect().
Referenced by addUser(), changePassword(), fetchData(), listUsers(), query(), and removeUser().
Auth_Container_MDB2::_quoteDBFields | ( | ) |
Quote the db_fields option to avoid the possibility of SQL injection.
private
Definition at line 248 of file MDB2.php.
Referenced by fetchData(), and listUsers().
Auth_Container_MDB2::_setDefaults | ( | ) |
Set some default options.
private
Definition at line 207 of file MDB2.php.
Referenced by Auth_Container_MDB2().
Auth_Container_MDB2::addUser | ( | $username, | |
$password, | |||
$additional = "" |
|||
) |
Add user to the storage container.
public
string | Username |
string | Password |
mixed | Additional information that are stored in the DB |
Reimplemented from Auth_Container.
Definition at line 445 of file MDB2.php.
References $additional, $query, $res, _prepare(), AUTH_LOG_DEBUG, MDB2\isError(), Auth_Container\log(), query(), and PEAR\raiseError().
Auth_Container_MDB2::Auth_Container_MDB2 | ( | $dsn | ) |
Constructor of the container class.
Initate connection to the database via PEAR::MDB2
string | Connection data or MDB2 object |
Definition at line 86 of file MDB2.php.
References $dsn, _parseOptions(), _setDefaults(), and PEAR\raiseError().
Referenced by ilAuthContainerDatabase\ilAuthContainerDatabase().
Auth_Container_MDB2::changePassword | ( | $username, | |
$password | |||
) |
Change password for user in the storage container.
string | Username |
string | The new password (plain text) |
Reimplemented from Auth_Container.
Definition at line 550 of file MDB2.php.
References $query, $res, _prepare(), AUTH_LOG_DEBUG, MDB2\isError(), Auth_Container\log(), query(), and PEAR\raiseError().
Auth_Container_MDB2::fetchData | ( | $username, | |
$password, | |||
$isChallengeResponse = false |
|||
) |
Get user information from database.
This function uses the given username to fetch the corresponding login data from the database table. If an account that matches the passed username and password is found, the function returns true. Otherwise it returns false.
string | Username |
string | Password |
boolean | If true password is secured using a md5 hash the frontend and auth are responsible for making sure the container supports challenge response password authentication |
Reimplemented from Auth_Container.
Reimplemented in ilAuthContainerDatabase.
Definition at line 294 of file MDB2.php.
References $query, $res, _prepare(), _quoteDBFields(), AUTH_LOG_DEBUG, PEAR\isError(), MDB2\isError(), Auth_Container\log(), MDB2_FETCHMODE_ASSOC, PEAR\raiseError(), and Auth_Container\verifyPassword().
Auth_Container_MDB2::getCryptType | ( | ) |
Returns the selected crypt type for this container.
Reimplemented from Auth_Container.
Definition at line 616 of file MDB2.php.
Auth_Container_MDB2::listUsers | ( | ) |
Returns a list of users from the container.
Reimplemented from Auth_Container.
Definition at line 383 of file MDB2.php.
References $query, $res, _prepare(), _quoteDBFields(), AUTH_LOG_DEBUG, MDB2\isError(), Auth_Container\log(), MDB2_FETCHMODE_ASSOC, and PEAR\raiseError().
Auth_Container_MDB2::query | ( | $query | ) |
Prepare query to the database.
This function checks if we have already opened a connection to the database. If that's not the case, a new connection is opened. After that the query is passed to the database.
public
string | Query string |
Definition at line 188 of file MDB2.php.
References $query, _prepare(), AUTH_LOG_DEBUG, and Auth_Container\log().
Referenced by addUser(), changePassword(), and removeUser().
Auth_Container_MDB2::removeUser | ( | $username | ) |
Remove user from the storage container.
public
string | Username |
Reimplemented from Auth_Container.
Definition at line 510 of file MDB2.php.
References $query, $res, _prepare(), AUTH_LOG_DEBUG, MDB2\isError(), Auth_Container\log(), query(), and PEAR\raiseError().
Auth_Container_MDB2::supportsChallengeResponse | ( | ) |
Determine if this container supports password authentication with challenge response.
Reimplemented from Auth_Container.
Definition at line 603 of file MDB2.php.
Auth_Container_MDB2::$dsn = '' |
Definition at line 67 of file MDB2.php.
Referenced by _connect(), Auth_Container_MDB2(), and ilAuthContainerDatabase\ilAuthContainerDatabase().
Auth_Container_MDB2::$options = array() |
Definition at line 60 of file MDB2.php.
Referenced by ilAuthContainerMDB2\__construct().