auth: Set constant visibility
Change-Id: I639495cd939474b19547e204401e791d8523fa99
This commit is contained in:
parent
3f94708eff
commit
877684ed2d
3 changed files with 23 additions and 23 deletions
|
|
@ -83,42 +83,42 @@ use Wikimedia\ObjectFactory;
|
|||
*/
|
||||
class AuthManager implements LoggerAwareInterface {
|
||||
/** Log in with an existing (not necessarily local) user */
|
||||
const ACTION_LOGIN = 'login';
|
||||
public const ACTION_LOGIN = 'login';
|
||||
/** Continue a login process that was interrupted by the need for user input or communication
|
||||
* with an external provider
|
||||
*/
|
||||
const ACTION_LOGIN_CONTINUE = 'login-continue';
|
||||
public const ACTION_LOGIN_CONTINUE = 'login-continue';
|
||||
/** Create a new user */
|
||||
const ACTION_CREATE = 'create';
|
||||
public const ACTION_CREATE = 'create';
|
||||
/** Continue a user creation process that was interrupted by the need for user input or
|
||||
* communication with an external provider
|
||||
*/
|
||||
const ACTION_CREATE_CONTINUE = 'create-continue';
|
||||
public const ACTION_CREATE_CONTINUE = 'create-continue';
|
||||
/** Link an existing user to a third-party account */
|
||||
const ACTION_LINK = 'link';
|
||||
public const ACTION_LINK = 'link';
|
||||
/** Continue a user linking process that was interrupted by the need for user input or
|
||||
* communication with an external provider
|
||||
*/
|
||||
const ACTION_LINK_CONTINUE = 'link-continue';
|
||||
public const ACTION_LINK_CONTINUE = 'link-continue';
|
||||
/** Change a user's credentials */
|
||||
const ACTION_CHANGE = 'change';
|
||||
public const ACTION_CHANGE = 'change';
|
||||
/** Remove a user's credentials */
|
||||
const ACTION_REMOVE = 'remove';
|
||||
public const ACTION_REMOVE = 'remove';
|
||||
/** Like ACTION_REMOVE but for linking providers only */
|
||||
const ACTION_UNLINK = 'unlink';
|
||||
public const ACTION_UNLINK = 'unlink';
|
||||
|
||||
/** Security-sensitive operations are ok. */
|
||||
const SEC_OK = 'ok';
|
||||
public const SEC_OK = 'ok';
|
||||
/** Security-sensitive operations should re-authenticate. */
|
||||
const SEC_REAUTH = 'reauth';
|
||||
public const SEC_REAUTH = 'reauth';
|
||||
/** Security-sensitive should not be performed. */
|
||||
const SEC_FAIL = 'fail';
|
||||
public const SEC_FAIL = 'fail';
|
||||
|
||||
/** Auto-creation is due to SessionManager */
|
||||
const AUTOCREATE_SOURCE_SESSION = \MediaWiki\Session\SessionManager::class;
|
||||
public const AUTOCREATE_SOURCE_SESSION = \MediaWiki\Session\SessionManager::class;
|
||||
|
||||
/** Auto-creation is due to a Maintenance script */
|
||||
const AUTOCREATE_SOURCE_MAINT = '::Maintenance::';
|
||||
public const AUTOCREATE_SOURCE_MAINT = '::Maintenance::';
|
||||
|
||||
/** @var AuthManager|null */
|
||||
private static $instance = null;
|
||||
|
|
|
|||
|
|
@ -37,19 +37,19 @@ use Message;
|
|||
abstract class AuthenticationRequest {
|
||||
|
||||
/** Indicates that the request is not required for authentication to proceed. */
|
||||
const OPTIONAL = 0;
|
||||
public const OPTIONAL = 0;
|
||||
|
||||
/** Indicates that the request is required for authentication to proceed.
|
||||
* This will only be used for UI purposes; it is the authentication providers'
|
||||
* responsibility to verify that all required requests are present.
|
||||
*/
|
||||
const REQUIRED = 1;
|
||||
public const REQUIRED = 1;
|
||||
|
||||
/** Indicates that the request is required by a primary authentication
|
||||
* provider. Since the user can choose which primary to authenticate with,
|
||||
* the request might or might not end up being actually required.
|
||||
*/
|
||||
const PRIMARY_REQUIRED = 2;
|
||||
public const PRIMARY_REQUIRED = 2;
|
||||
|
||||
/** @var string|null The AuthManager::ACTION_* constant this request was
|
||||
* created to be used for. The *_CONTINUE constants are not used here, the
|
||||
|
|
|
|||
|
|
@ -36,26 +36,26 @@ use Message;
|
|||
*/
|
||||
class AuthenticationResponse {
|
||||
/** Indicates that the authentication succeeded. */
|
||||
const PASS = 'PASS';
|
||||
public const PASS = 'PASS';
|
||||
|
||||
/** Indicates that the authentication failed. */
|
||||
const FAIL = 'FAIL';
|
||||
public const FAIL = 'FAIL';
|
||||
|
||||
/** Indicates that third-party authentication succeeded but no user exists.
|
||||
* Either treat this like a UI response or pass $this->createRequest to
|
||||
* AuthManager::beginCreateAccount(). For use by AuthManager only (providers
|
||||
* should just return a PASS with no username).
|
||||
*/
|
||||
const RESTART = 'RESTART';
|
||||
public const RESTART = 'RESTART';
|
||||
|
||||
/** Indicates that the authentication provider does not handle this request. */
|
||||
const ABSTAIN = 'ABSTAIN';
|
||||
public const ABSTAIN = 'ABSTAIN';
|
||||
|
||||
/** Indicates that the authentication needs further user input of some sort. */
|
||||
const UI = 'UI';
|
||||
public const UI = 'UI';
|
||||
|
||||
/** Indicates that the authentication needs to be redirected to a third party to proceed. */
|
||||
const REDIRECT = 'REDIRECT';
|
||||
public const REDIRECT = 'REDIRECT';
|
||||
|
||||
/** @var string One of the constants above */
|
||||
public $status;
|
||||
|
|
|
|||
Loading…
Reference in a new issue