MediaWiki
master
|
This is a value object to hold authentication response data. More...
Static Public Member Functions | |
static | newAbstain () |
static | newFail (Message $msg) |
static | newPass ($username=null) |
static | newRedirect (array $reqs, $redirectTarget, $redirectApiData=null) |
static | newRestart (Message $msg) |
static | newUI (array $reqs, Message $msg) |
Public Attributes | |
AuthenticationRequest null | $createRequest = null |
Returned with a PrimaryAuthenticationProvider login FAIL or a PASS with no username, this holds a request that should result in a PASS when passed to that provider's PrimaryAuthenticationProvider::beginPrimaryAccountCreation(). More... | |
AuthenticationRequest null | $linkRequest = null |
Returned with a PrimaryAuthenticationProvider login PASS with no username, this holds a request to pass to AuthManager::changeAuthenticationData() to link the account once the local user has been determined. More... | |
AuthenticationRequest null | $loginRequest = null |
Returned with an AuthManager account creation PASS, this holds a request to pass to AuthManager::beginAuthentication() to immediately log into the created account. More... | |
Message null | $message = null |
I18n message to display in case of UI or FAIL. More... | |
AuthenticationRequest[] | $neededRequests = [] |
Needed AuthenticationRequests to continue after a UI or REDIRECT response. More... | |
mixed | $redirectApiData = null |
Data for a REDIRECT response that a client might use to query the remote site via its API rather than by following $redirectTarget. More... | |
string null | $redirectTarget = null |
URL to redirect to for a REDIRECT response. More... | |
string | $status |
One of the constants above. More... | |
string null | $username = null |
Local user name from authentication. More... | |
const | ABSTAIN = 'ABSTAIN' |
Indicates that the authentication provider does not handle this request. More... | |
const | FAIL = 'FAIL' |
Indicates that the authentication failed. More... | |
const | PASS = 'PASS' |
Indicates that the authentication succeeded. More... | |
const | REDIRECT = 'REDIRECT' |
Indicates that the authentication needs to be redirected to a third party to proceed. More... | |
const | RESTART = 'RESTART' |
Indicates that third-party authentication succeeded but no user exists. More... | |
const | UI = 'UI' |
Indicates that the authentication needs further user input of some sort. More... | |
This is a value object to hold authentication response data.
Definition at line 33 of file AuthenticationResponse.php.
|
static |
Definition at line 149 of file AuthenticationResponse.php.
References $ret, and MediaWiki\Auth\AuthenticationResponse\ABSTAIN.
Referenced by MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProvider\beginLinkAttempt(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider\beginPrimaryAccountCreation(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider\beginPrimaryAccountCreation(), MediaWiki\Auth\AuthPluginPrimaryAuthenticationProvider\beginPrimaryAccountCreation(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider\beginPrimaryAuthentication(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider\beginPrimaryAuthentication(), MediaWiki\Auth\AuthPluginPrimaryAuthenticationProvider\beginPrimaryAuthentication(), MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProvider\beginSecondaryAccountCreation(), MediaWiki\Auth\EmailNotificationSecondaryAuthenticationProvider\beginSecondaryAuthentication(), MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProvider\beginSecondaryAuthentication(), MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProvider\continueLinkAttempt(), MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProvider\failResponse(), MediaWiki\Auth\AuthManagerTest\provideAccountCreation(), MediaWiki\Auth\AuthManagerTest\provideAccountLink(), MediaWiki\Auth\AuthManagerTest\provideAuthentication(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest\testAccountCreation(), MediaWiki\Auth\AuthPluginPrimaryAuthenticationProviderTest\testAccountCreation(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\testAccountCreation(), MediaWiki\Auth\AuthManagerTest\testAccountCreation(), MediaWiki\Auth\AuthManagerTest\testAccountLink(), MediaWiki\Auth\AuthPluginPrimaryAuthenticationProviderTest\testAuthentication(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest\testAuthentication(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\testAuthentication(), MediaWiki\Auth\AuthManagerTest\testAuthentication(), MediaWiki\Auth\AuthManagerTest\testAutoCreateOnLogin(), MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProviderTest\testBasics(), MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProviderTest\testBeginLinkAttempt(), MediaWiki\Auth\EmailNotificationSecondaryAuthenticationProviderTest\testBeginSecondaryAuthentication(), MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProviderTest\testBeginSecondaryAuthentication(), MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProviderTest\testContinueLinkAttempt(), MediaWiki\Auth\ResetPasswordSecondaryAuthenticationProviderTest\testTryReset(), and MediaWiki\Auth\ResetPasswordSecondaryAuthenticationProvider\tryReset().
|
static |
Message | $msg |
Definition at line 128 of file AuthenticationResponse.php.
References $ret, and MediaWiki\Auth\AuthenticationResponse\FAIL.
Referenced by MediaWiki\Auth\AuthManager\beginAccountCreation(), MediaWiki\Auth\AuthManager\beginAccountLink(), MediaWiki\Auth\AuthManager\beginAuthentication(), MediaWiki\Auth\AuthPluginPrimaryAuthenticationProvider\beginPrimaryAccountCreation(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider\beginPrimaryAuthentication(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider\beginPrimaryAuthentication(), MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProvider\beginSecondaryAuthentication(), MediaWiki\Auth\AuthManager\continueAccountCreation(), MediaWiki\Auth\AuthManager\continueAccountLink(), MediaWiki\Auth\AuthManager\continueAuthentication(), MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProvider\failResponse(), MediaWiki\Auth\AuthManagerTest\provideAccountCreation(), MediaWiki\Auth\AuthManagerTest\provideAccountLink(), MediaWiki\Auth\AuthManagerTest\provideAuthentication(), MediaWiki\Auth\AuthManagerTest\testContinueAccountCreation(), MediaWiki\Auth\AuthManagerTest\testContinueAccountLink(), MediaWiki\Auth\AuthManagerTest\testCreateFromLogin(), and MediaWiki\Auth\ThrottlePreAuthenticationProviderTest\testTestForAuthentication().
|
static |
string | null | $username | Local username |
Definition at line 117 of file AuthenticationResponse.php.
References $ret, MediaWiki\Auth\AuthenticationResponse\$username, and MediaWiki\Auth\AuthenticationResponse\PASS.
Referenced by MediaWiki\Auth\AuthManager\beginAuthentication(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider\beginPrimaryAccountCreation(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider\beginPrimaryAccountCreation(), MediaWiki\Auth\AuthPluginPrimaryAuthenticationProvider\beginPrimaryAccountCreation(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider\beginPrimaryAuthentication(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider\beginPrimaryAuthentication(), MediaWiki\Auth\AuthPluginPrimaryAuthenticationProvider\beginPrimaryAuthentication(), MediaWiki\Auth\EmailNotificationSecondaryAuthenticationProvider\beginSecondaryAccountCreation(), MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProvider\beginSecondaryAuthentication(), MediaWiki\Auth\AuthManager\continueAccountCreation(), MediaWiki\Auth\AuthManager\continueAuthentication(), MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProvider\continueLinkAttempt(), MediaWiki\Auth\AuthManagerTest\provideAccountCreation(), MediaWiki\Auth\AuthManagerTest\provideAccountLink(), MediaWiki\Auth\AuthManagerTest\provideAuthentication(), MediaWiki\Auth\AbstractPreAuthenticationProviderTest\testAbstractPreAuthenticationProvider(), MediaWiki\Auth\AbstractPrimaryAuthenticationProviderTest\testAbstractPrimaryAuthenticationProvider(), MediaWiki\Auth\AbstractSecondaryAuthenticationProviderTest\testAbstractSecondaryAuthenticationProvider(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest\testAccountCreation(), MediaWiki\Auth\AuthPluginPrimaryAuthenticationProviderTest\testAccountCreation(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\testAccountCreation(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\testAccountCreationEmail(), MediaWiki\Auth\AuthManagerTest\testAccountCreationLogging(), MediaWiki\Auth\AuthPluginPrimaryAuthenticationProviderTest\testAuthentication(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest\testAuthentication(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\testAuthentication(), MediaWiki\Auth\AuthManagerTest\testAutoCreateFailOnLogin(), MediaWiki\Auth\AuthManagerTest\testAutoCreateOnLogin(), MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProviderTest\testBeginSecondaryAuthentication(), MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProviderTest\testContinueLinkAttempt(), MediaWiki\Auth\ThrottlePreAuthenticationProviderTest\testPostAuthentication(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\testProviderChangeAuthenticationData(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest\testProviderChangeAuthenticationData(), MediaWiki\Auth\ThrottlePreAuthenticationProviderTest\testTestForAuthentication(), MediaWiki\Auth\ResetPasswordSecondaryAuthenticationProviderTest\testTryReset(), and MediaWiki\Auth\ResetPasswordSecondaryAuthenticationProvider\tryReset().
|
static |
AuthenticationRequest[] | $reqs AuthenticationRequests needed to continue | |
string | $redirectTarget | URL |
mixed | $redirectApiData | Data suitable for adding to an ApiResult |
Definition at line 178 of file AuthenticationResponse.php.
References MediaWiki\Auth\AuthenticationResponse\$redirectApiData, MediaWiki\Auth\AuthenticationResponse\$redirectTarget, $ret, and MediaWiki\Auth\AuthenticationResponse\REDIRECT.
Referenced by MediaWiki\Auth\AuthManagerTest\provideAccountCreation(), MediaWiki\Auth\AuthManagerTest\provideAccountLink(), and MediaWiki\Auth\AuthManagerTest\provideAuthentication().
|
static |
Message | $msg |
Definition at line 139 of file AuthenticationResponse.php.
References $ret, and MediaWiki\Auth\AuthenticationResponse\RESTART.
Referenced by MediaWiki\Auth\AuthManager\continueAuthentication(), and MediaWiki\Auth\AuthManagerTest\provideAuthentication().
AuthenticationRequest[] | $reqs AuthenticationRequests needed to continue | |
Message | $msg |
Definition at line 160 of file AuthenticationResponse.php.
References $ret, and MediaWiki\Auth\AuthenticationResponse\UI.
Referenced by MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProvider\continueLinkAttempt(), MediaWiki\Auth\AuthManagerTest\provideAccountCreation(), MediaWiki\Auth\AuthManagerTest\provideAccountLink(), MediaWiki\Auth\AuthManagerTest\provideAuthentication(), MediaWiki\Auth\AuthManagerTest\testAutoCreateOnLogin(), MediaWiki\Auth\AuthManagerTest\testCreateFromLogin(), and MediaWiki\Auth\ResetPasswordSecondaryAuthenticationProvider\tryReset().
AuthenticationRequest null MediaWiki\Auth\AuthenticationResponse::$createRequest = null |
Returned with a PrimaryAuthenticationProvider login FAIL or a PASS with no username, this holds a request that should result in a PASS when passed to that provider's PrimaryAuthenticationProvider::beginPrimaryAccountCreation().
Returned with an AuthManager login FAIL or RESTART, this holds a CreateFromLoginAuthenticationRequest that may be passed to AuthManager::beginCreateAccount(), possibly in place of any "primary-required" requests. It may also be passed to AuthManager::beginAuthentication() to preserve state.
Definition at line 96 of file AuthenticationResponse.php.
AuthenticationRequest null MediaWiki\Auth\AuthenticationResponse::$linkRequest = null |
Returned with a PrimaryAuthenticationProvider login PASS with no username, this holds a request to pass to AuthManager::changeAuthenticationData() to link the account once the local user has been determined.
Definition at line 104 of file AuthenticationResponse.php.
AuthenticationRequest null MediaWiki\Auth\AuthenticationResponse::$loginRequest = null |
Returned with an AuthManager account creation PASS, this holds a request to pass to AuthManager::beginAuthentication() to immediately log into the created account.
Definition at line 111 of file AuthenticationResponse.php.
Message null MediaWiki\Auth\AuthenticationResponse::$message = null |
I18n message to display in case of UI or FAIL.
Definition at line 75 of file AuthenticationResponse.php.
AuthenticationRequest [] MediaWiki\Auth\AuthenticationResponse::$neededRequests = [] |
Needed AuthenticationRequests to continue after a UI or REDIRECT response.
Definition at line 72 of file AuthenticationResponse.php.
mixed MediaWiki\Auth\AuthenticationResponse::$redirectApiData = null |
Data for a REDIRECT response that a client might use to query the remote site via its API rather than by following $redirectTarget.
Value must be something acceptable to ApiResult::addValue().
Definition at line 66 of file AuthenticationResponse.php.
Referenced by MediaWiki\Auth\AuthenticationResponse\newRedirect().
string null MediaWiki\Auth\AuthenticationResponse::$redirectTarget = null |
URL to redirect to for a REDIRECT response.
Definition at line 59 of file AuthenticationResponse.php.
Referenced by MediaWiki\Auth\AuthenticationResponse\newRedirect().
string MediaWiki\Auth\AuthenticationResponse::$status |
One of the constants above.
Definition at line 56 of file AuthenticationResponse.php.
string null MediaWiki\Auth\AuthenticationResponse::$username = null |
Local user name from authentication.
May be null if the authentication passed but no local user is known.
Definition at line 81 of file AuthenticationResponse.php.
Referenced by MediaWiki\Auth\AuthenticationResponse\newPass().
const MediaWiki\Auth\AuthenticationResponse::ABSTAIN = 'ABSTAIN' |
Indicates that the authentication provider does not handle this request.
Definition at line 47 of file AuthenticationResponse.php.
Referenced by MediaWiki\Auth\AuthManager\beginAccountLink(), MediaWiki\Auth\AuthManager\continueAccountCreation(), MediaWiki\Auth\AuthManager\continueAuthentication(), MediaWiki\Auth\AuthenticationResponse\newAbstain(), MediaWiki\Auth\AuthenticationResponseTest\provideConstructors(), and MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProviderTest\testFailResponse().
const MediaWiki\Auth\AuthenticationResponse::FAIL = 'FAIL' |
Indicates that the authentication failed.
Definition at line 38 of file AuthenticationResponse.php.
Referenced by MediaWiki\Auth\AuthManagerAuthPlugin\authenticate(), MediaWiki\Auth\AuthManager\beginAccountLink(), MediaWiki\Auth\AuthManager\continueAccountCreation(), MediaWiki\Auth\AuthManager\continueAccountLink(), MediaWiki\Auth\AuthManager\continueAuthentication(), MediaWiki\Auth\AuthenticationResponse\newFail(), MediaWiki\Auth\AuthenticationResponseTest\provideConstructors(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest\testAccountCreation(), MediaWiki\Auth\AuthPluginPrimaryAuthenticationProviderTest\testAccountCreation(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\testAccountCreation(), MediaWiki\Auth\AuthManagerTest\testAccountCreation(), MediaWiki\Auth\AuthManagerTest\testAccountLink(), MediaWiki\Auth\AuthPluginPrimaryAuthenticationProviderTest\testAuthentication(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest\testAuthentication(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\testAuthentication(), MediaWiki\Auth\AuthManagerTest\testAuthentication(), MediaWiki\Auth\AuthManagerTest\testAutoCreateFailOnLogin(), MediaWiki\Auth\AuthManagerTest\testBeginAccountCreation(), MediaWiki\Auth\AuthManagerTest\testBeginAccountLink(), MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProviderTest\testBeginSecondaryAuthentication(), MediaWiki\Auth\AuthManagerTest\testContinueAccountCreation(), MediaWiki\Auth\AuthManagerTest\testContinueAccountLink(), MediaWiki\Auth\AuthManagerTest\testCreateFromLogin(), MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProviderTest\testFailResponse(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\testProviderChangeAuthenticationData(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest\testProviderChangeAuthenticationData(), and MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProviderTest\testRangeBlock().
const MediaWiki\Auth\AuthenticationResponse::PASS = 'PASS' |
Indicates that the authentication succeeded.
Definition at line 35 of file AuthenticationResponse.php.
Referenced by MediaWiki\Auth\AuthManagerAuthPlugin\authenticate(), MediaWiki\Auth\AuthManager\beginAccountLink(), MediaWiki\Auth\AuthManager\continueAccountCreation(), MediaWiki\Auth\AuthManager\continueAccountLink(), MediaWiki\Auth\AuthManager\continueAuthentication(), MediaWiki\Auth\AuthenticationResponse\newPass(), MediaWiki\Auth\ThrottlePreAuthenticationProvider\postAuthentication(), MediaWiki\Auth\AuthenticationResponseTest\provideConstructors(), MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProviderTest\testAccountCreation(), MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProviderTest\testAccountCreation(), MediaWiki\Auth\AuthManagerTest\testAccountCreation(), MediaWiki\Auth\AuthManagerTest\testAccountCreationLogging(), MediaWiki\Auth\AuthManagerTest\testAccountLink(), MediaWiki\Auth\AuthManagerTest\testAuthentication(), MediaWiki\Auth\AuthManagerTest\testAutoCreateOnLogin(), and MediaWiki\Auth\AuthManagerTest\testBeginAuthentication().
const MediaWiki\Auth\AuthenticationResponse::REDIRECT = 'REDIRECT' |
Indicates that the authentication needs to be redirected to a third party to proceed.
Definition at line 53 of file AuthenticationResponse.php.
Referenced by MediaWiki\Auth\AuthManager\beginAccountLink(), MediaWiki\Auth\AuthManager\continueAccountCreation(), MediaWiki\Auth\AuthManager\continueAccountLink(), MediaWiki\Auth\AuthManager\continueAuthentication(), MediaWiki\Auth\AuthenticationResponse\newRedirect(), and MediaWiki\Auth\AuthenticationResponseTest\provideConstructors().
const MediaWiki\Auth\AuthenticationResponse::RESTART = 'RESTART' |
Indicates that third-party authentication succeeded but no user exists.
Either treat this like a UI response or pass $this->createRequest to AuthManager::beginCreateAccount().
Definition at line 44 of file AuthenticationResponse.php.
Referenced by MediaWiki\Auth\AuthenticationResponse\newRestart(), MediaWiki\Auth\AuthenticationResponseTest\provideConstructors(), and MediaWiki\Auth\AuthManagerTest\testAuthentication().
const MediaWiki\Auth\AuthenticationResponse::UI = 'UI' |
Indicates that the authentication needs further user input of some sort.
Definition at line 50 of file AuthenticationResponse.php.
Referenced by MediaWiki\Auth\AuthManager\beginAccountLink(), MediaWiki\Auth\AuthManager\continueAccountCreation(), MediaWiki\Auth\AuthManager\continueAccountLink(), MediaWiki\Auth\AuthManager\continueAuthentication(), MediaWiki\Auth\AuthenticationResponse\newUI(), MediaWiki\Auth\AuthenticationResponseTest\provideConstructors(), MediaWiki\Auth\AuthManagerTest\testAutoCreateOnLogin(), MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProviderTest\testBeginLinkAttempt(), MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProviderTest\testContinueLinkAttempt(), MediaWiki\Auth\AuthManagerTest\testCreateFromLogin(), and MediaWiki\Auth\ResetPasswordSecondaryAuthenticationProviderTest\testTryReset().