MediaWiki  REL1_31
AbstractPreAuthenticationProvider.php
Go to the documentation of this file.
1 <?php
22 namespace MediaWiki\Auth;
23 
30  implements PreAuthenticationProvider
31 {
32 
34  return [];
35  }
36 
37  public function testForAuthentication( array $reqs ) {
38  return \StatusValue::newGood();
39  }
40 
42  }
43 
44  public function testForAccountCreation( $user, $creator, array $reqs ) {
45  return \StatusValue::newGood();
46  }
47 
48  public function testUserForCreation( $user, $autocreate, array $options = [] ) {
49  return \StatusValue::newGood();
50  }
51 
53  }
54 
55  public function testForAccountLink( $user ) {
56  return \StatusValue::newGood();
57  }
58 
60  }
61 
62 }
$user
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
Definition: hooks.txt:247
MediaWiki\$action
String $action
Cache what action this request is.
Definition: MediaWiki.php:48
MediaWiki\Auth\AbstractPreAuthenticationProvider\postAccountCreation
postAccountCreation( $user, $creator, AuthenticationResponse $response)
Post-creation callback.
Definition: AbstractPreAuthenticationProvider.php:52
$response
this hook is for auditing only $response
Definition: hooks.txt:783
array
the array() calling protocol came about after MediaWiki 1.4rc1.
MediaWiki\Auth\AbstractPreAuthenticationProvider\postAccountLink
postAccountLink( $user, AuthenticationResponse $response)
Post-link callback.
Definition: AbstractPreAuthenticationProvider.php:59
php
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition: injection.txt:37
MediaWiki\Auth\AbstractPreAuthenticationProvider\getAuthenticationRequests
getAuthenticationRequests( $action, array $options)
Return the applicable list of AuthenticationRequests.
Definition: AbstractPreAuthenticationProvider.php:33
MediaWiki\Auth\PreAuthenticationProvider
A pre-authentication provider can prevent authentication early on.
Definition: PreAuthenticationProvider.php:44
MediaWiki\Auth\AuthenticationResponse
This is a value object to hold authentication response data.
Definition: AuthenticationResponse.php:37
MediaWiki\Auth\AbstractPreAuthenticationProvider\testForAuthentication
testForAuthentication(array $reqs)
Determine whether an authentication may begin.
Definition: AbstractPreAuthenticationProvider.php:37
MediaWiki\Auth\AbstractPreAuthenticationProvider\testForAccountCreation
testForAccountCreation( $user, $creator, array $reqs)
Determine whether an account creation may begin.
Definition: AbstractPreAuthenticationProvider.php:44
$options
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
Definition: hooks.txt:2001
MediaWiki\Auth\AbstractPreAuthenticationProvider\postAuthentication
postAuthentication( $user, AuthenticationResponse $response)
Post-login callback.
Definition: AbstractPreAuthenticationProvider.php:41
MediaWiki\Auth\AbstractPreAuthenticationProvider
A base class that implements some of the boilerplate for a PreAuthenticationProvider.
Definition: AbstractPreAuthenticationProvider.php:31
MediaWiki\Auth\AbstractAuthenticationProvider
A base class that implements some of the boilerplate for an AuthenticationProvider.
Definition: AbstractAuthenticationProvider.php:32
MediaWiki\Auth\AbstractPreAuthenticationProvider\testForAccountLink
testForAccountLink( $user)
Determine whether an account may linked to another authentication method.
Definition: AbstractPreAuthenticationProvider.php:55
MediaWiki\Auth\AbstractPreAuthenticationProvider\testUserForCreation
testUserForCreation( $user, $autocreate, array $options=[])
Determine whether an account may be created.
Definition: AbstractPreAuthenticationProvider.php:48
MediaWiki\Auth
Definition: AbstractAuthenticationProvider.php:22