ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Static Public Member Functions | |
static | getPersistentAuthData (array $state) |
Get the persistent authentication state from the state array. More... | |
static | getStateId (&$state, $rawId=false) |
Retrieve the ID of a state array. More... | |
static | saveState (&$state, $stage, $rawId=false) |
Save the state. More... | |
static | cloneState (array $state) |
Clone the state. More... | |
static | loadState ($id, $stage, $allowMissing=false) |
Retrieve saved state. More... | |
static | deleteState (&$state) |
Delete state. More... | |
static | throwException ($state, SimpleSAML_Error_Exception $exception) |
Throw exception to the state exception handler. More... | |
static | loadExceptionState ($id=null) |
Retrieve an exception state. More... | |
static | parseStateID ($stateId) |
Get the ID and (optionally) a URL embedded in a StateID, in the form 'id:url'. More... | |
Data Fields | |
const | ID = 'SimpleSAML_Auth_State.id' |
The index in the state array which contains the identifier. More... | |
const | CLONE_ORIGINAL_ID = 'SimpleSAML_Auth_State.cloneOriginalId' |
The index in the cloned state array which contains the identifier of the original state. More... | |
const | STAGE = 'SimpleSAML_Auth_State.stage' |
The index in the state array which contains the current stage. More... | |
const | RESTART = 'SimpleSAML_Auth_State.restartURL' |
The index in the state array which contains the restart URL. More... | |
const | EXCEPTION_HANDLER_URL = 'SimpleSAML_Auth_State.exceptionURL' |
The index in the state array which contains the exception handler URL. More... | |
const | EXCEPTION_HANDLER_FUNC = 'SimpleSAML_Auth_State.exceptionFunc' |
The index in the state array which contains the exception handler function. More... | |
const | EXCEPTION_DATA = 'SimpleSAML_Auth_State.exceptionData' |
The index in the state array which contains the exception data. More... | |
const | EXCEPTION_STAGE = 'SimpleSAML_Auth_State.exceptionStage' |
The stage of a state with an exception. More... | |
const | EXCEPTION_PARAM = 'SimpleSAML_Auth_State_exceptionId' |
The URL parameter which contains the exception state id. More... | |
Static Private Member Functions | |
static | getStateTimeout () |
Retrieve state timeout. More... | |
Static Private Attributes | |
static | $stateTimeout = null |
State timeout. More... | |
|
static |
Clone the state.
This function clones and returns the new cloned state.
array | $state | The original request state. |
Definition at line 226 of file State.php.
References $state, CLONE_ORIGINAL_ID, SimpleSAML\Logger\debug(), and ID.
|
static |
Delete state.
This function deletes the given state to prevent the user from reusing it later.
array | &$state | The state which should be deleted. |
Definition at line 319 of file State.php.
Referenced by SimpleSAML_Auth_Source\completeAuth(), SimpleSAML_Auth_Source\completeLogout(), sspmod_cas_Auth_Source_CAS\logout(), and SimpleSAML_Auth_ProcessingChain\resumeProcessing().
|
static |
Get the persistent authentication state from the state array.
array | $state | The state array to analyze. |
Definition at line 103 of file State.php.
Referenced by SimpleSAML_Auth_Default\extractPersistentAuthState(), sspmod_saml_Auth_Source_SP\handleUnsolicitedAuth(), SimpleSAML_Auth_Source\loginCompleted(), and sspmod_saml_Auth_Source_SP\reauthPostLogin().
|
static |
Retrieve the ID of a state array.
Note that this function will not save the state.
array | &$state | The state array. |
bool | $rawId | Return a raw ID, without a restart URL. Defaults to FALSE. |
Definition at line 145 of file State.php.
References $id, $state, SimpleSAML\Utils\Random\generateID(), ID, and RESTART.
Referenced by sspmod_authlinkedin_Auth_Source_LinkedIn\authenticate(), sspmod_authfacebook_Facebook\establishCSRFTokenState(), and saveState().
|
staticprivate |
Retrieve state timeout.
Definition at line 171 of file State.php.
References $globalConfig, $stateTimeout, and SimpleSAML_Configuration\getInstance().
|
static |
Retrieve an exception state.
string | NULL | $id | The exception id. Can be NULL, in which case it will be retrieved from the request. |
Definition at line 381 of file State.php.
References $id, $state, EXCEPTION_PARAM, and loadState().
|
static |
Retrieve saved state.
This function retrieves saved state information. If the state information has been lost, it will attempt to restart the request by calling the restart URL which is embedded in the state information. If there is no restart information available, an exception will be thrown.
string | $id | State identifier (with embedded restart information). |
string | $stage | The stage the state should have been saved in. |
bool | $allowMissing | Whether to allow the state to be missing. |
SimpleSAML_Error_NoState | If we couldn't find the state and there's no URL defined to redirect to. |
Exception | If the stage of the state is invalid and there's no URL defined to redirect to. |
Definition at line 259 of file State.php.
References $id, $session, $state, SimpleSAML\Logger\debug(), SimpleSAML_Session\getSessionFromRequest(), parseStateID(), SimpleSAML\Utils\HTTP\redirectUntrustedURL(), and STAGE.
Referenced by SimpleSAML_Auth_ProcessingChain\fetchProcessedState(), sspmod_authYubiKey_Auth_Source_YubiKey\handleLogin(), sspmod_core_Auth_UserPassBase\handleLogin(), sspmod_core_Auth_UserPassOrgBase\handleLogin(), sspmod_core_Auth_UserPassOrgBase\listOrganizations(), loadExceptionState(), SimpleSAML\IdP\TraditionalLogoutHandler\onResponse(), and sspmod_exampleauth_Auth_Source_External\resume().
|
static |
Get the ID and (optionally) a URL embedded in a StateID, in the form 'id:url'.
string | $stateId | The state ID to use. |
Definition at line 411 of file State.php.
References $id, $stateId, and $url.
Referenced by loadState(), and SimpleSAML_Utilities\parseStateID().
|
static |
Save the state.
This function saves the state, and returns an id which can be used to retrieve it later. It will also update the $state array with the identifier.
array | &$state | The login request state. |
string | $stage | The current stage in the login process. |
bool | $rawId | Return a raw ID, without a restart URL. |
Definition at line 194 of file State.php.
References $id, $session, $state, SimpleSAML\Logger\debug(), SimpleSAML_Session\getSessionFromRequest(), getStateId(), ID, and STAGE.
Referenced by sspmod_saml_Auth_Source_SP\askForIdPChange(), sspmod_authfacebook_Auth_Source_Facebook\authenticate(), sspmod_authlinkedin_Auth_Source_LinkedIn\authenticate(), sspmod_authmyspace_Auth_Source_MySpace\authenticate(), sspmod_authtwitter_Auth_Source_Twitter\authenticate(), sspmod_authwindowslive_Auth_Source_LiveID\authenticate(), sspmod_authYubiKey_Auth_Source_YubiKey\authenticate(), sspmod_cas_Auth_Source_CAS\authenticate(), sspmod_core_Auth_UserPassBase\authenticate(), sspmod_core_Auth_UserPassOrgBase\authenticate(), sspmod_exampleauth_Auth_Source_External\authenticate(), sspmod_multiauth_Auth_Source_MultiAuth\authenticate(), sspmod_negotiate_Auth_Source_Negotiate\authenticate(), sspmod_cas_Auth_Source_CAS\finalStep(), SimpleSAML_IdP\handleLogoutRequest(), SimpleSAML\IdP\TraditionalLogoutHandler\logoutNextSP(), sspmod_authX509_Auth_Process_ExpiryWarning\process(), sspmod_cdc_Auth_Process_CDC\process(), sspmod_consent_Auth_Process_Consent\process(), sspmod_core_Auth_Process_WarnShortSSOInterval\process(), sspmod_exampleauth_Auth_Process_RedirectTest\process(), sspmod_expirycheck_Auth_Process_ExpiryDate\process(), sspmod_preprodwarning_Auth_Process_Warning\process(), SimpleSAML_Auth_ProcessingChain\resumeProcessing(), sspmod_saml_Auth_Source_SP\startDisco(), SimpleSAML\IdP\IFrameLogoutHandler\startLogout(), sspmod_saml_Auth_Source_SP\startSLO2(), sspmod_saml_Auth_Source_SP\startSSO1(), sspmod_saml_Auth_Source_SP\startSSO2(), throwException(), sspmod_authorize_Auth_Process_Authorize\unauthorized(), and sspmod_saml_Auth_Process_ExpectedAuthnContextClassRef\unauthorized().
|
static |
Throw exception to the state exception handler.
array | $state | The state array. |
SimpleSAML_Error_Exception | $exception | The exception. |
SimpleSAML_Error_Exception | If there is no exception handler defined, it will just throw the $exception. |
Definition at line 343 of file State.php.
References $id, $state, EXCEPTION_DATA, EXCEPTION_HANDLER_FUNC, SimpleSAML\Utils\HTTP\redirectTrustedURL(), and saveState().
Referenced by sspmod_multiauth_Auth_Source_MultiAuth\delegateAuthentication(), sspmod_negotiate_Auth_Source_Negotiate\fallBack(), SimpleSAML_IdP\handleAuthenticationRequest(), SimpleSAML_Auth_Source\initLogin(), SimpleSAML_Auth_ProcessingChain\resumeProcessing(), and sspmod_saml_Auth_Source_SP\startSSO2().
|
staticprivate |
const SimpleSAML_Auth_State::CLONE_ORIGINAL_ID = 'SimpleSAML_Auth_State.cloneOriginalId' |
The index in the cloned state array which contains the identifier of the original state.
Definition at line 45 of file State.php.
Referenced by cloneState().
const SimpleSAML_Auth_State::EXCEPTION_DATA = 'SimpleSAML_Auth_State.exceptionData' |
The index in the state array which contains the exception data.
Definition at line 75 of file State.php.
Referenced by throwException().
const SimpleSAML_Auth_State::EXCEPTION_HANDLER_FUNC = 'SimpleSAML_Auth_State.exceptionFunc' |
The index in the state array which contains the exception handler function.
Definition at line 69 of file State.php.
Referenced by sspmod_saml_IdP_SAML2\receiveAuthnRequest(), and throwException().
const SimpleSAML_Auth_State::EXCEPTION_HANDLER_URL = 'SimpleSAML_Auth_State.exceptionURL' |
The index in the state array which contains the exception handler URL.
Definition at line 63 of file State.php.
Referenced by SimpleSAML_Auth_Source\initLogin().
const SimpleSAML_Auth_State::EXCEPTION_PARAM = 'SimpleSAML_Auth_State_exceptionId' |
The URL parameter which contains the exception state id.
Definition at line 87 of file State.php.
Referenced by loadExceptionState().
const SimpleSAML_Auth_State::EXCEPTION_STAGE = 'SimpleSAML_Auth_State.exceptionStage' |
const SimpleSAML_Auth_State::ID = 'SimpleSAML_Auth_State.id' |
The index in the state array which contains the identifier.
Definition at line 38 of file State.php.
Referenced by cloneState(), getStateId(), and saveState().
const SimpleSAML_Auth_State::RESTART = 'SimpleSAML_Auth_State.restartURL' |
The index in the state array which contains the restart URL.
Definition at line 57 of file State.php.
Referenced by getStateId(), sspmod_saml_IdP_SAML1\receiveAuthnRequest(), and sspmod_saml_IdP_SAML2\receiveAuthnRequest().
const SimpleSAML_Auth_State::STAGE = 'SimpleSAML_Auth_State.stage' |
The index in the state array which contains the current stage.
Definition at line 51 of file State.php.
Referenced by loadState(), and saveState().