ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Public Member Functions | |
__construct ($info, &$config) | |
Constructor for this authentication source. More... | |
setForcedUsername ($forcedUsername) | |
Set forced username. More... | |
getLoginLinks () | |
Return login links from configuration. More... | |
getRememberUsernameEnabled () | |
Getter for the authsource config option remember.username.enabled. More... | |
getRememberUsernameChecked () | |
Getter for the authsource config option remember.username.checked. More... | |
isRememberMeEnabled () | |
Check if the "remember me" feature is enabled. More... | |
isRememberMeChecked () | |
Check if the "remember me" checkbox should be checked. More... | |
authenticate (&$state) | |
Initialize login. More... | |
Public Member Functions inherited from SimpleSAML_Auth_Source | |
__construct ($info, &$config) | |
Constructor for an authentication source. More... | |
getAuthId () | |
Retrieve the ID of this authentication source. More... | |
authenticate (&$state) | |
Process a request. More... | |
reauthenticate (array &$state) | |
Reauthenticate an user. More... | |
initLogin ($return, $errorURL=null, array $params=array()) | |
Start authentication. More... | |
logout (&$state) | |
Log out from this authentication source. More... | |
Static Public Member Functions | |
static | handleLogin ($authStateId, $username, $password) |
Handle login request. More... | |
Static Public Member Functions inherited from SimpleSAML_Auth_Source | |
static | getSourcesOfType ($type) |
Get sources of a specific type. More... | |
static | completeAuth (&$state) |
Complete authentication. More... | |
static | loginCompleted ($state) |
Called when a login operation has finished. More... | |
static | completeLogout (&$state) |
Complete logout. More... | |
static | getById ($authId, $type=null) |
Retrieve authentication source. More... | |
static | logoutCallback ($state) |
Called when the authentication source receives an external logout request. More... | |
static | getSources () |
Retrieve list of authentication sources. More... | |
Data Fields | |
const | STAGEID = 'sspmod_core_Auth_UserPassBase.state' |
The string used to identify our states. More... | |
const | AUTHID = 'sspmod_core_Auth_UserPassBase.AuthId' |
The key of the AuthId field in the state. More... | |
Protected Member Functions | |
login ($username, $password) | |
Attempt to log in using the given username and password. More... | |
Protected Member Functions inherited from SimpleSAML_Auth_Source | |
addLogoutCallback ($assoc, $state) | |
Add a logout callback association. More... | |
callLogoutCallback ($assoc) | |
Call a logout callback based on association. More... | |
Protected Attributes | |
$loginLinks | |
Links to pages from login page. More... | |
$rememberUsernameEnabled = FALSE | |
$rememberUsernameChecked = FALSE | |
$rememberMeEnabled = FALSE | |
$rememberMeChecked = FALSE | |
Protected Attributes inherited from SimpleSAML_Auth_Source | |
$authId | |
Private Attributes | |
$forcedUsername | |
Username we should force. More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from SimpleSAML_Auth_Source | |
static | validateSource ($source, $id) |
Make sure that the first element of an auth source is its identifier. More... | |
Definition at line 12 of file UserPassBase.php.
sspmod_core_Auth_UserPassBase::__construct | ( | $info, | |
& | $config | ||
) |
Constructor for this authentication source.
All subclasses who implement their own constructor must call this constructor before using $config for anything.
array | $info | Information about this authentication source. |
array | &$config | Configuration for this authentication source. |
Definition at line 84 of file UserPassBase.php.
References $config, $info, and SimpleSAML_Configuration\getInstance().
sspmod_core_Auth_UserPassBase::authenticate | ( | & | $state | ) |
Initialize login.
This function saves the information about the login, and redirects to a login page.
array | &$state | Information about the current authentication. |
Definition at line 169 of file UserPassBase.php.
References SimpleSAML_Auth_Source\$authId, $forcedUsername, $id, $params, $password, $state, $url, array, SimpleSAML\Module\getModuleURL(), login(), SimpleSAML\Utils\HTTP\redirectTrustedURL(), and SimpleSAML_Auth_State\saveState().
sspmod_core_Auth_UserPassBase::getLoginLinks | ( | ) |
Return login links from configuration.
Definition at line 125 of file UserPassBase.php.
References $loginLinks.
sspmod_core_Auth_UserPassBase::getRememberUsernameChecked | ( | ) |
Getter for the authsource config option remember.username.checked.
Definition at line 141 of file UserPassBase.php.
References $rememberUsernameChecked.
sspmod_core_Auth_UserPassBase::getRememberUsernameEnabled | ( | ) |
Getter for the authsource config option remember.username.enabled.
Definition at line 133 of file UserPassBase.php.
References $rememberUsernameEnabled.
|
static |
Handle login request.
This function is used by the login form (core/www/loginuserpass.php) when the user enters a username and password. On success, it will not return. On wrong username/password failure, and other errors, it will throw an exception.
string | $authStateId | The identifier of the authentication state. |
string | $username | The username the user wrote. |
string | $password | The password the user wrote. |
Definition at line 231 of file UserPassBase.php.
References $_SERVER, $attributes, $authStateId, $password, $source, $state, SimpleSAML_Auth_Source\getById(), SimpleSAML_Auth_State\loadState(), and SimpleSAML\Logger\stats().
sspmod_core_Auth_UserPassBase::isRememberMeChecked | ( | ) |
Check if the "remember me" checkbox should be checked.
Definition at line 157 of file UserPassBase.php.
References $rememberMeChecked.
sspmod_core_Auth_UserPassBase::isRememberMeEnabled | ( | ) |
Check if the "remember me" feature is enabled.
Definition at line 149 of file UserPassBase.php.
References $rememberMeEnabled.
|
abstractprotected |
Attempt to log in using the given username and password.
On a successful login, this function should return the users attributes. On failure, it should throw an exception/error. If the error was caused by the user entering the wrong username or password, a SimpleSAML_Error_Error('WRONGUSERPASS') should be thrown.
Note that both the username and the password are UTF-8 encoded.
string | $username | The username the user wrote. |
string | $password | The password the user wrote. |
Referenced by authenticate().
sspmod_core_Auth_UserPassBase::setForcedUsername | ( | $forcedUsername | ) |
Set forced username.
string | NULL | $forcedUsername | The forced username. |
Definition at line 117 of file UserPassBase.php.
References $forcedUsername.
Referenced by sspmod_core_Auth_Source_AdminPassword\__construct().
|
private |
Username we should force.
A forced username cannot be changed by the user. If this is NULL, we won't force any username.
Definition at line 33 of file UserPassBase.php.
Referenced by authenticate(), and setForcedUsername().
|
protected |
Links to pages from login page.
From configuration
Definition at line 39 of file UserPassBase.php.
Referenced by getLoginLinks().
|
protected |
Definition at line 73 of file UserPassBase.php.
Referenced by isRememberMeChecked().
|
protected |
Definition at line 65 of file UserPassBase.php.
Referenced by isRememberMeEnabled().
|
protected |
Definition at line 55 of file UserPassBase.php.
Referenced by getRememberUsernameChecked().
|
protected |
Definition at line 47 of file UserPassBase.php.
Referenced by getRememberUsernameEnabled().
const sspmod_core_Auth_UserPassBase::AUTHID = 'sspmod_core_Auth_UserPassBase.AuthId' |
The key of the AuthId field in the state.
Definition at line 24 of file UserPassBase.php.
const sspmod_core_Auth_UserPassBase::STAGEID = 'sspmod_core_Auth_UserPassBase.state' |
The string used to identify our states.
Definition at line 18 of file UserPassBase.php.