ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Public Member Functions | |
__construct ($info, &$config) | |
Constructor for this authentication source. More... | |
getUsernameOrgMethod () | |
Retrieve the way organizations as part of the username should be handled. More... | |
getRememberUsernameEnabled () | |
Getter for the authsource config option remember.username.enabled. More... | |
getRememberUsernameChecked () | |
Getter for the authsource config option remember.username.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, $organization) |
Handle login request. More... | |
static | listOrganizations ($authStateId) |
Get available organizations. 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_UserPassOrgBase.state' |
The string used to identify our states. More... | |
const | AUTHID = 'sspmod_core_Auth_UserPassOrgBase.AuthId' |
The key of the AuthId field in the state. More... | |
const | ORGID = 'sspmod_core_Auth_UserPassOrgBase.SelectedOrg' |
The key of the OrgId field in the state, identifies which org was selected. More... | |
Protected Member Functions | |
setUsernameOrgMethod ($usernameOrgMethod) | |
Configure the way organizations as part of the username is handled. More... | |
login ($username, $password, $organization) | |
Attempt to log in using the given username, password and organization. More... | |
getOrganizations () | |
Retrieve list of organizations. 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 | |
$rememberUsernameEnabled = FALSE | |
$rememberUsernameChecked = FALSE | |
Protected Attributes inherited from SimpleSAML_Auth_Source | |
$authId | |
Private Attributes | |
$usernameOrgMethod | |
What way do we handle the organization as part of the username. 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 14 of file UserPassOrgBase.php.
sspmod_core_Auth_UserPassOrgBase::__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 70 of file UserPassOrgBase.php.
References $config, and $info.
sspmod_core_Auth_UserPassOrgBase::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 149 of file UserPassOrgBase.php.
References SimpleSAML_Auth_Source\$authId, $id, $params, $password, $state, $url, array, SimpleSAML\Module\getModuleURL(), getOrganizations(), login(), SimpleSAML\Utils\HTTP\redirectTrustedURL(), and SimpleSAML_Auth_State\saveState().
|
abstractprotected |
Retrieve list of organizations.
The list of organizations is an associative array. The key of the array is the id of the organization, and the value is the description. The value can be another array, in which case that array is expected to contain language-code to description mappings.
Referenced by authenticate().
sspmod_core_Auth_UserPassOrgBase::getRememberUsernameChecked | ( | ) |
Getter for the authsource config option remember.username.checked.
Definition at line 136 of file UserPassOrgBase.php.
References $rememberUsernameChecked.
sspmod_core_Auth_UserPassOrgBase::getRememberUsernameEnabled | ( | ) |
Getter for the authsource config option remember.username.enabled.
Definition at line 128 of file UserPassOrgBase.php.
References $rememberUsernameEnabled.
sspmod_core_Auth_UserPassOrgBase::getUsernameOrgMethod | ( | ) |
Retrieve the way organizations as part of the username should be handled.
There are three possible values:
Definition at line 120 of file UserPassOrgBase.php.
References $usernameOrgMethod.
|
static |
Handle login request.
This function is used by the login form (core/www/loginuserpassorg.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. |
string | $organization | The id of the organization the user chose. |
Definition at line 205 of file UserPassOrgBase.php.
References $attributes, $authStateId, $password, $source, $state, SimpleSAML_Auth_Source\completeAuth(), SimpleSAML_Auth_Source\getById(), and SimpleSAML_Auth_State\loadState().
|
static |
Get available organizations.
This function is used by the login form to get the available organizations.
string | $authStateId | The identifier of the authentication state. |
Definition at line 256 of file UserPassOrgBase.php.
References $authStateId, $source, $state, SimpleSAML_Auth_Source\getById(), and SimpleSAML_Auth_State\loadState().
|
abstractprotected |
Attempt to log in using the given username, password and organization.
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. |
string | $organization | The id of the organization the user chose. |
Referenced by authenticate().
|
protected |
Configure the way organizations as part of the username is handled.
There are three possible values:
If unconfigured, the default is 'none'.
string | $usernameOrgMethod | The method which should be used. |
Definition at line 103 of file UserPassOrgBase.php.
References $usernameOrgMethod.
Referenced by sspmod_ldap_Auth_Source_LDAPMulti\__construct().
|
protected |
Definition at line 58 of file UserPassOrgBase.php.
Referenced by getRememberUsernameChecked().
|
protected |
Definition at line 50 of file UserPassOrgBase.php.
Referenced by getRememberUsernameEnabled().
|
private |
What way do we handle the organization as part of the username.
Three values: 'none': Force the user to select the correct organization from the dropdown box. 'allow': Allow the user to enter the organization as part of the username. 'force': Remove the dropdown box.
Definition at line 42 of file UserPassOrgBase.php.
Referenced by sspmod_ldap_Auth_Source_LDAPMulti\__construct(), getUsernameOrgMethod(), and setUsernameOrgMethod().
const sspmod_core_Auth_UserPassOrgBase::AUTHID = 'sspmod_core_Auth_UserPassOrgBase.AuthId' |
The key of the AuthId field in the state.
Definition at line 26 of file UserPassOrgBase.php.
const sspmod_core_Auth_UserPassOrgBase::ORGID = 'sspmod_core_Auth_UserPassOrgBase.SelectedOrg' |
The key of the OrgId field in the state, identifies which org was selected.
Definition at line 32 of file UserPassOrgBase.php.
const sspmod_core_Auth_UserPassOrgBase::STAGEID = 'sspmod_core_Auth_UserPassOrgBase.state' |
The string used to identify our states.
Definition at line 20 of file UserPassOrgBase.php.