MediaWiki master
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.
 
- 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 107 of file AbstractAuthenticationProvider.php.

◆ getHookRunner()

MediaWiki\Auth\AbstractAuthenticationProvider::getHookRunner ( )
protected
Access: internal
This is for use by core only. Hook interfaces may be removed without notice.
Since
1.35
Returns
HookRunner

Definition at line 117 of file AbstractAuthenticationProvider.php.

Referenced by MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider\sendNewAccountEmail(), and MediaWiki\Auth\ThrottlePreAuthenticationProvider\testForAccountCreation().

◆ 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 99 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

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: