testUserExists( $username ); } /** * @inheritDoc * @note Reimplement this if you do anything other than * User::getCanonicalName( $req->username ) to determine the user being * authenticated. */ public function providerNormalizeUsername( $username ) { $name = User::getCanonicalName( $username ); return $name === false ? null : $name; } /** * @inheritDoc * @note Reimplement this if self::getAuthenticationRequests( AuthManager::ACTION_REMOVE ) * doesn't return requests that will revoke all access for the user. */ public function providerRevokeAccessForUser( $username ) { $reqs = $this->getAuthenticationRequests( AuthManager::ACTION_REMOVE, [ 'username' => $username ] ); foreach ( $reqs as $req ) { $req->username = $username; $req->action = AuthManager::ACTION_REMOVE; $this->providerChangeAuthenticationData( $req ); } } public function providerAllowsPropertyChange( $property ) { return true; } public function testForAccountCreation( $user, $creator, array $reqs ) { return \StatusValue::newGood(); } public function continuePrimaryAccountCreation( $user, $creator, array $reqs ) { throw new \BadMethodCallException( __METHOD__ . ' is not implemented.' ); } public function finishAccountCreation( $user, $creator, AuthenticationResponse $response ) { return null; } public function postAccountCreation( $user, $creator, AuthenticationResponse $response ) { } public function testUserForCreation( $user, $autocreate, array $options = [] ) { return \StatusValue::newGood(); } public function autoCreatedAccount( $user, $source ) { } public function beginPrimaryAccountLink( $user, array $reqs ) { if ( $this->accountCreationType() === self::TYPE_LINK ) { throw new \BadMethodCallException( __METHOD__ . ' is not implemented.' ); } else { throw new \BadMethodCallException( __METHOD__ . ' should not be called on a non-link provider.' ); } } public function continuePrimaryAccountLink( $user, array $reqs ) { throw new \BadMethodCallException( __METHOD__ . ' is not implemented.' ); } public function postAccountLink( $user, AuthenticationResponse $response ) { } }