MediaWiki  master
AbstractPreAuthenticationProvider.php
Go to the documentation of this file.
1 <?php
22 namespace MediaWiki\Auth;
23 
32  implements PreAuthenticationProvider
33 {
34 
39  public function getAuthenticationRequests( $action, array $options ) {
40  return [];
41  }
42 
47  public function testForAuthentication( array $reqs ) {
48  return \StatusValue::newGood();
49  }
50 
55  public function postAuthentication( $user, AuthenticationResponse $response ) {
56  }
57 
62  public function testForAccountCreation( $user, $creator, array $reqs ) {
63  return \StatusValue::newGood();
64  }
65 
70  public function testUserForCreation( $user, $autocreate, array $options = [] ) {
71  return \StatusValue::newGood();
72  }
73 
78  public function postAccountCreation( $user, $creator, AuthenticationResponse $response ) {
79  }
80 
85  public function testForAccountLink( $user ) {
86  return \StatusValue::newGood();
87  }
88 
93  public function postAccountLink( $user, AuthenticationResponse $response ) {
94  }
95 
96 }
A base class that implements some of the boilerplate for an AuthenticationProvider.
A base class that implements some of the boilerplate for a PreAuthenticationProvider.
testUserForCreation( $user, $autocreate, array $options=[])
Determine whether an account may be created.User being created (not added to the database yet)....
postAuthentication( $user, AuthenticationResponse $response)
Post-login callback.This will be called at the end of a login attempt. It will not be called for unfi...
testForAccountLink( $user)
Determine whether an account may linked to another authentication method.User being linked....
postAccountLink( $user, AuthenticationResponse $response)
Post-link callback.This will be called at the end of an account linking attempt.User that was attempt...
getAuthenticationRequests( $action, array $options)
Return the applicable list of AuthenticationRequests.Possible values for $action depend on whether th...
testForAuthentication(array $reqs)
Determine whether an authentication may begin.Called from AuthManager::beginAuthentication()StatusVal...
postAccountCreation( $user, $creator, AuthenticationResponse $response)
Post-creation callback.This will be called at the end of an account creation attempt....
testForAccountCreation( $user, $creator, array $reqs)
Determine whether an account creation may begin.Called from AuthManager::beginAccountCreation()No nee...
This is a value object to hold authentication response data.
A pre-authentication provider can prevent authentication early on.