MediaWiki  master
MediaWiki\Auth\AbstractAuthenticationProvider Class Reference

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

Inheritance diagram for MediaWiki\Auth\AbstractAuthenticationProvider:
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
More...
 
 init (LoggerInterface $logger, AuthManager $manager, HookContainer $hookContainer, Config $config, UserNameUtils $userNameUtils)
 Initialise with dependencies of an AuthenticationProvider. More...
 
 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. More...
 

Protected Member Functions

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

Protected Attributes

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

Private Attributes

HookContainer $hookContainer
 
HookRunner $hookRunner
 

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

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

◆ 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 MediaWiki\Auth\AbstractAuthenticationProvider\$hookContainer, and 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

◆ $hookContainer

◆ $hookRunner

HookRunner MediaWiki\Auth\AbstractAuthenticationProvider::$hookRunner
private

◆ $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: