MediaWiki REL1_40
MediaWiki\Auth\AbstractAuthenticationProvider Class Reference

A base class that implements some of the boilerplate for an AuthenticationProvider. More...

Inherits MediaWiki\Auth\AuthenticationProvider.

Inherited by MediaWiki\Auth\AbstractPreAuthenticationProvider, MediaWiki\Auth\AbstractPrimaryAuthenticationProvider, and MediaWiki\Auth\AbstractSecondaryAuthenticationProvider.

Collaboration diagram for MediaWiki\Auth\AbstractAuthenticationProvider:

Public Member Functions

 getUniqueId ()
 Return a unique identifier for this instance.This must be the same across requests. If multiple instances return the same ID, exceptions will be thrown from AuthManager.
Returns
string

 
 init (LoggerInterface $logger, AuthManager $manager, HookContainer $hookContainer, Config $config, UserNameUtils $userNameUtils)
 Initialise with dependencies of an AuthenticationProvider.
 
 setConfig (Config $config)
 
 setHookContainer (HookContainer $hookContainer)
 
 setLogger (LoggerInterface $logger)
 
 setManager (AuthManager $manager)
 
- Public Member Functions inherited from MediaWiki\Auth\AuthenticationProvider
 getAuthenticationRequests ( $action, array $options)
 Return the applicable list of AuthenticationRequests.
 

Protected Member Functions

 getHookContainer ()
 
 getHookRunner ()
 
 postInitSetup ()
 A provider can override this to do any necessary setup after init() is called.
 

Protected Attributes

Config $config
 
LoggerInterface $logger
 
AuthManager $manager
 
UserNameUtils $userNameUtils
 

Detailed Description

A base class that implements some of the boilerplate for an AuthenticationProvider.

Stability: stable
to extend
Since
1.27

Definition at line 36 of file AbstractAuthenticationProvider.php.

Member Function Documentation

◆ getHookContainer()

MediaWiki\Auth\AbstractAuthenticationProvider::getHookContainer ( )
protected
Since
1.35
Returns
HookContainer

Definition at line 161 of file AbstractAuthenticationProvider.php.

◆ getHookRunner()

MediaWiki\Auth\AbstractAuthenticationProvider::getHookRunner ( )
protected

◆ getUniqueId()

MediaWiki\Auth\AbstractAuthenticationProvider::getUniqueId ( )

Return a unique identifier for this instance.This must be the same across requests. If multiple instances return the same ID, exceptions will be thrown from AuthManager.

Returns
string

Note
Override this if it makes sense to support more than one instance

Implements MediaWiki\Auth\AuthenticationProvider.

Definition at line 153 of file AbstractAuthenticationProvider.php.

◆ init()

MediaWiki\Auth\AbstractAuthenticationProvider::init ( LoggerInterface $logger,
AuthManager $manager,
HookContainer $hookContainer,
Config $config,
UserNameUtils $userNameUtils )

Initialise with dependencies of an AuthenticationProvider.

Since
1.37
Access: internal
In production code AuthManager will initialize the AbstractAuthenticationProvider, in tests AuthenticationProviderTestTrait must be used.
Parameters
LoggerInterface$logger
AuthManager$manager
HookContainer$hookContainer
Config$config
UserNameUtils$userNameUtils

Definition at line 69 of file AbstractAuthenticationProvider.php.

References MediaWiki\Auth\AbstractAuthenticationProvider\$config, MediaWiki\Auth\AbstractAuthenticationProvider\$logger, MediaWiki\Auth\AbstractAuthenticationProvider\$manager, MediaWiki\Auth\AbstractAuthenticationProvider\$userNameUtils, and MediaWiki\Auth\AbstractAuthenticationProvider\postInitSetup().

◆ postInitSetup()

MediaWiki\Auth\AbstractAuthenticationProvider::postInitSetup ( )
protected

◆ setConfig()

MediaWiki\Auth\AbstractAuthenticationProvider::setConfig ( Config $config)
Deprecated
since 1.37. For extension-defined authentication providers that were using this method to trigger other work, please override AbstractAuthenticationProvider::postInitSetup instead. If your extension was using this to explicitly change the Config of an existing AuthenticationProvider object, please file a report on phabricator - there is no non-deprecated way to do this anymore.
Parameters
Config$config

Implements MediaWiki\Auth\AuthenticationProvider.

Definition at line 130 of file AbstractAuthenticationProvider.php.

References MediaWiki\Auth\AbstractAuthenticationProvider\$config, and wfDeprecated().

◆ setHookContainer()

MediaWiki\Auth\AbstractAuthenticationProvider::setHookContainer ( HookContainer $hookContainer)
Deprecated
since 1.37. For extension-defined authentication providers that were using this method to trigger other work, please override AbstractAuthenticationProvider::postInitSetup instead. If your extension was using this to explicitly change the HookContainer of an existing AuthenticationProvider object, please file a report on phabricator - there is no non-deprecated way to do this anymore.

Implements MediaWiki\Auth\AuthenticationProvider.

Definition at line 143 of file AbstractAuthenticationProvider.php.

References wfDeprecated().

◆ setLogger()

MediaWiki\Auth\AbstractAuthenticationProvider::setLogger ( LoggerInterface $logger)
Deprecated
since 1.37. For extension-defined authentication providers that were using this method to trigger other work, please override AbstractAuthenticationProvider::postInitSetup instead. If your extension was using this to explicitly change the logger of an existing AuthenticationProvider object, please file a report on phabricator - there is no non-deprecated way to do this anymore.

Definition at line 103 of file AbstractAuthenticationProvider.php.

References MediaWiki\Auth\AbstractAuthenticationProvider\$logger, and wfDeprecated().

◆ setManager()

MediaWiki\Auth\AbstractAuthenticationProvider::setManager ( AuthManager $manager)
Deprecated
since 1.37. For extension-defined authentication providers that were using this method to trigger other work, please override AbstractAuthenticationProvider::postInitSetup instead. If your extension was using this to explicitly change the AuthManager of an existing AuthenticationProvider object, please file a report on phabricator - there is no non-deprecated way to do this anymore.

Implements MediaWiki\Auth\AuthenticationProvider.

Definition at line 116 of file AbstractAuthenticationProvider.php.

References MediaWiki\Auth\AbstractAuthenticationProvider\$manager, and wfDeprecated().

Member Data Documentation

◆ $config

Config MediaWiki\Auth\AbstractAuthenticationProvider::$config
protected

◆ $logger

LoggerInterface MediaWiki\Auth\AbstractAuthenticationProvider::$logger
protected

◆ $manager

AuthManager MediaWiki\Auth\AbstractAuthenticationProvider::$manager
protected

◆ $userNameUtils

UserNameUtils MediaWiki\Auth\AbstractAuthenticationProvider::$userNameUtils
protected

The documentation for this class was generated from the following file: