| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
namespace MediaWiki\Auth; |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
abstract class AbstractSecondaryAuthenticationProvider extends AbstractAuthenticationProvider |
| 32 |
implements SecondaryAuthenticationProvider |
| 33 |
{ |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
public function continueSecondaryAuthentication( $user, array $reqs ) { |
| 40 |
throw new \BadMethodCallException( __METHOD__ . ' is not implemented.' ); |
| 41 |
} |
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
public function postAuthentication( $user, AuthenticationResponse $response ) { |
| 48 |
} |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
public function providerAllowsPropertyChange( $property ) { |
| 55 |
return true; |
| 56 |
} |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
public function providerRevokeAccessForUser( $username ) { |
| 65 |
$reqs = $this->getAuthenticationRequests( |
| 66 |
AuthManager::ACTION_REMOVE, [ 'username' => $username ] |
| 67 |
); |
| 68 |
foreach ( $reqs as $req ) { |
| 69 |
$req->username = $username; |
| 70 |
$this->providerChangeAuthenticationData( $req ); |
| 71 |
} |
| 72 |
} |
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
public function providerAllowsAuthenticationDataChange( |
| 79 |
AuthenticationRequest $req, $checkData = true |
| 80 |
) { |
| 81 |
return \StatusValue::newGood( 'ignored' ); |
| 82 |
} |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
public function providerChangeAuthenticationData( AuthenticationRequest $req ) { |
| 89 |
} |
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
public function testForAccountCreation( $user, $creator, array $reqs ) { |
| 96 |
return \StatusValue::newGood(); |
| 97 |
} |
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
public function continueSecondaryAccountCreation( $user, $creator, array $reqs ) { |
| 104 |
throw new \BadMethodCallException( __METHOD__ . ' is not implemented.' ); |
| 105 |
} |
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
public function postAccountCreation( $user, $creator, AuthenticationResponse $response ) { |
| 112 |
} |
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
public function testUserForCreation( $user, $autocreate, array $options = [] ) { |
| 119 |
return \StatusValue::newGood(); |
| 120 |
} |
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
public function autoCreatedAccount( $user, $source ) { |
| 127 |
} |
| 128 |
} |