ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
__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 | 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... | |
Protected Member Functions | |
addLogoutCallback ($assoc, $state) | |
Add a logout callback association. More... | |
callLogoutCallback ($assoc) | |
Call a logout callback based on association. More... | |
Static Protected Member Functions | |
static | validateSource ($source, $id) |
Make sure that the first element of an auth source is its identifier. More... | |
Protected Attributes | |
$authId | |
Definition at line 13 of file Source.php.
SimpleSAML_Auth_Source::__construct | ( | $info, | |
& | $config | ||
) |
Constructor for an authentication source.
Any authentication source which implements its own constructor must call this constructor first.
array | $info | Information about this authentication source. |
array | &$config | Configuration for this authentication source. |
Definition at line 35 of file Source.php.
References $config, and $info.
|
protected |
Add a logout callback association.
This function adds a logout callback association, which allows us to initiate a logout later based on the $assoc-value.
Note that logout-associations exists per authentication source. A logout association from one authentication source cannot be called from a different authentication source.
string | $assoc | The identifier for this logout association. |
array | $state | The state array passed to the authenticate-function. |
Definition at line 411 of file Source.php.
References $data, $id, $session, $state, SimpleSAML_Session\DATA_TIMEOUT_SESSION_END, and SimpleSAML_Session\getSessionFromRequest().
|
abstract |
Process a request.
If an authentication source returns from this function, it is assumed to have authenticated the user, and should have set elements in $state with the attributes of the user.
If the authentication process requires additional steps which make it impossible to complete before returning from this function, the authentication source should save the state, and at a later stage, load the state, update it with the authentication information about the user, and call completeAuth with the state array.
array | &$state | Information about the current authentication. |
Referenced by getAuthId(), and initLogin().
|
protected |
Call a logout callback based on association.
This function calls a logout callback based on an association saved with addLogoutCallback(...).
This function always returns.
string | $assoc | The logout association which should be called. |
Definition at line 455 of file Source.php.
References $data, $id, $session, and SimpleSAML_Session\getSessionFromRequest().
Referenced by sspmod_saml_Auth_Source_SP\handleLogout().
|
static |
Complete authentication.
This function should be called if authentication has completed. It will never return, except in the case of exceptions. Exceptions thrown from this page should not be caught, but should instead be passed to the top-level exception handler.
array | &$state | Information about the current authentication. |
Definition at line 136 of file Source.php.
References $state, and SimpleSAML_Auth_State\deleteState().
Referenced by sspmod_negotiate_Auth_Source_Negotiate\authenticate(), sspmod_authX509_Auth_Source_X509userCert\authSuccesful(), sspmod_multiauth_Auth_Source_MultiAuth\delegateAuthentication(), sspmod_cas_Auth_Source_CAS\finalStep(), sspmod_authYubiKey_Auth_Source_YubiKey\handleLogin(), sspmod_core_Auth_UserPassOrgBase\handleLogin(), sspmod_saml_Auth_Source_SP\onProcessingCompleted(), and sspmod_exampleauth_Auth_Source_External\resume().
|
static |
Complete logout.
This function should be called after logout has completed. It will never return, except in the case of exceptions. Exceptions thrown from this page should not be caught, but should instead be passed to the top-level exception handler.
array | &$state | Information about the current authentication. |
Definition at line 265 of file Source.php.
References $authId, $config, $factory, $id, $info, $state, SimpleSAML_Auth_State\deleteState(), and SimpleSAML\Module\resolveClass().
SimpleSAML_Auth_Source::getAuthId | ( | ) |
Retrieve the ID of this authentication source.
Definition at line 83 of file Source.php.
References $authId, $state, and authenticate().
|
static |
Retrieve authentication source.
This function takes an id of an authentication source, and returns the AuthSource object. If no authentication source with the given id can be found, NULL will be returned.
If the $type parameter is specified, this function will return an authentication source of the given type. If no authentication source or if an authentication source of a different type is found, an exception will be thrown.
string | $authId | The authentication source identifier. |
string | NULL | $type | The type of authentication source. If NULL, any type will be accepted. |
SimpleSAML_Error_Exception | If no such authentication source is found or it is invalid. |
Definition at line 340 of file Source.php.
References $authId, $config, $ret, $type, and SimpleSAML_Configuration\getConfig().
Referenced by SimpleSAML_IdP\__construct(), sspmod_multiauth_Auth_Source_MultiAuth\delegateAuthentication(), sspmod_negotiate_Auth_Source_Negotiate\fallBack(), SimpleSAML_Auth_Default\getAuthSource(), sspmod_authYubiKey_Auth_Source_YubiKey\handleLogin(), sspmod_core_Auth_UserPassOrgBase\handleLogin(), sspmod_core_Auth_UserPassBase\handleLogin(), SimpleSAML_Auth_Default\initLogoutReturn(), sspmod_core_Auth_UserPassOrgBase\listOrganizations(), sspmod_multiauth_Auth_Source_MultiAuth\logout(), sspmod_negotiate_Auth_Source_Negotiate\logout(), sspmod_saml_Auth_Source_SP\onProcessingCompleted(), sspmod_saml_Auth_Source_SP\reauthPostLogin(), SimpleSAML\Utils\Auth\requireAdmin(), and sspmod_exampleauth_Auth_Source_External\resume().
|
static |
Retrieve list of authentication sources.
Definition at line 488 of file Source.php.
References $config, and SimpleSAML_Configuration\getOptionalConfig().
|
static |
Get sources of a specific type.
string | $type | The type of the authentication source. |
Exception | If the authentication source is invalid. |
Definition at line 53 of file Source.php.
References $config, $id, $ret, $source, $type, and SimpleSAML_Configuration\getConfig().
Referenced by saml_hook_metadata_hosted().
SimpleSAML_Auth_Source::initLogin | ( | $return, | |
$errorURL = null , |
|||
array | $params = array() |
||
) |
Start authentication.
This method never returns.
string | array | $return | The URL or function we should direct the user to after authentication. If using a URL obtained from user input, please make sure to check it by calling ::checkURLAllowed(). |
string | null | $errorURL | The URL we should direct the user to after failed authentication. Can be null, in which case a standard error page will be shown. If using a URL obtained from user input, please make sure to check it by calling ::checkURLAllowed(). |
array | $params | Extra information about the login. Different authentication requestors may provide different information. Optional, will default to an empty array. |
Definition at line 164 of file Source.php.
References PHPMailer\PHPMailer\$params, $state, authenticate(), SimpleSAML_Auth_State\EXCEPTION_HANDLER_URL, and SimpleSAML_Auth_State\throwException().
|
static |
Called when a login operation has finished.
This method never returns.
array | $state | The state after the login has completed. |
Definition at line 212 of file Source.php.
References $authId, $session, $state, SimpleSAML_Auth_State\getPersistentAuthData(), SimpleSAML_Session\getSessionFromRequest(), and SimpleSAML\Utils\HTTP\redirectTrustedURL().
Referenced by SimpleSAML_Auth_Default\loginCompleted().
SimpleSAML_Auth_Source::logout | ( | & | $state | ) |
Log out from this authentication source.
This function should be overridden if the authentication source requires special steps to complete a logout operation.
If the logout process requires a redirect, the state should be saved. Once the logout operation is completed, the state should be restored, and completeLogout should be called with the state. If this operation can be completed without showing the user a page, or redirecting, this function should return.
array | &$state | Information about the current logout operation. |
Definition at line 249 of file Source.php.
References $state.
|
static |
Called when the authentication source receives an external logout request.
array | $state | State array for the logout operation. |
Definition at line 379 of file Source.php.
References $session, $source, $state, SimpleSAML_Session\getSessionFromRequest(), and SimpleSAML\Logger\warning().
Referenced by SimpleSAML_Auth_Default\logoutCallback().
SimpleSAML_Auth_Source::reauthenticate | ( | array & | $state | ) |
Reauthenticate an user.
This function is called by the IdP to give the authentication source a chance to interact with the user even in the case when the user is already authenticated.
array | &$state | Information about the current authentication. |
Definition at line 114 of file Source.php.
References $data, $session, and SimpleSAML_Session\getSessionFromRequest().
|
staticprotected |
Make sure that the first element of an auth source is its identifier.
array | $source | An array with the auth source configuration. |
string | $id | The auth source identifier. |
Exception | If the first element of $source is not an identifier for the auth source. |
Definition at line 504 of file Source.php.
|
protected |
Definition at line 23 of file Source.php.
Referenced by sspmod_authwindowslive_Auth_Source_LiveID\authenticate(), sspmod_authlinkedin_Auth_Source_LinkedIn\authenticate(), sspmod_authtwitter_Auth_Source_Twitter\authenticate(), sspmod_negotiate_Auth_Source_Negotiate\authenticate(), sspmod_authfacebook_Auth_Source_Facebook\authenticate(), sspmod_exampleauth_Auth_Source_External\authenticate(), sspmod_authYubiKey_Auth_Source_YubiKey\authenticate(), sspmod_multiauth_Auth_Source_MultiAuth\authenticate(), sspmod_core_Auth_UserPassOrgBase\authenticate(), sspmod_core_Auth_UserPassBase\authenticate(), sspmod_cas_Auth_Source_CAS\authenticate(), sspmod_saml_Auth_Source_SP\authenticate(), completeLogout(), sspmod_multiauth_Auth_Source_MultiAuth\delegateAuthentication(), sspmod_negotiate_Auth_Source_Negotiate\fallBack(), getAuthId(), getById(), sspmod_multiauth_Auth_Source_MultiAuth\getPreviousSource(), sspmod_saml_Auth_Source_SP\handleUnsolicitedAuth(), loginCompleted(), sspmod_multiauth_Auth_Source_MultiAuth\logout(), sspmod_negotiate_Auth_Source_Negotiate\logout(), sspmod_saml_Auth_Source_SP\reauthenticate(), sspmod_saml_Auth_Source_SP\reauthPostLogin(), and sspmod_multiauth_Auth_Source_MultiAuth\setPreviousSource().