username is considered user-submitted for this purpose, even * if it cannot be changed via $req->loadFromSubmission. * @return StatusValue */ public function providerAllowsAuthenticationDataChange( AuthenticationRequest $req, $checkData = true ); /** * Change or remove authentication data (e.g. passwords) * * If $req was returned for AuthManager::ACTION_CHANGE, the corresponding * credentials should result in a successful login in the future. * * If $req was returned for AuthManager::ACTION_REMOVE, the corresponding * credentials should no longer result in a successful login. * * @param AuthenticationRequest $req */ public function providerChangeAuthenticationData( AuthenticationRequest $req ); /** * Determine whether an account creation may begin * * Called from AuthManager::beginAccountCreation() * * @note No need to test if the account exists, AuthManager checks that * @param User $user User being created (not added to the database yet). * This may become a "UserValue" in the future, or User may be refactored * into such. * @param User $creator User doing the creation. This may become a * "UserValue" in the future, or User may be refactored into such. * @param AuthenticationRequest[] $reqs * @return StatusValue */ public function testForAccountCreation( $user, $creator, array $reqs ); /** * Start an account creation flow * @param User $user User being created (has been added to the database). * This may become a "UserValue" in the future, or User may be refactored * into such. * @param User $creator User doing the creation. This may become a * "UserValue" in the future, or User may be refactored into such. * @param AuthenticationRequest[] $reqs * @return AuthenticationResponse Expected responses: * - PASS: The user creation is ok. Additional secondary providers may run. * - ABSTAIN: Additional secondary providers may run. * - UI: Additional AuthenticationRequests are needed to complete the process. * - REDIRECT: Redirection to a third party is needed to complete the process. */ public function beginSecondaryAccountCreation( $user, $creator, array $reqs ); /** * Continue an authentication flow * @param User $user User being created (has been added to the database). * This may become a "UserValue" in the future, or User may be refactored * into such. * @param User $creator User doing the creation. This may become a * "UserValue" in the future, or User may be refactored into such. * @param AuthenticationRequest[] $reqs * @return AuthenticationResponse Expected responses: * - PASS: The user creation is ok. Additional secondary providers may run. * - ABSTAIN: Additional secondary providers may run. * - UI: Additional AuthenticationRequests are needed to complete the process. * - REDIRECT: Redirection to a third party is needed to complete the process. */ public function continueSecondaryAccountCreation( $user, $creator, array $reqs ); /** * Post-creation callback * @param User $user User that was attempted to be created. * This may become a "UserValue" in the future, or User may be refactored * into such. * @param User $creator User doing the creation. This may become a * "UserValue" in the future, or User may be refactored into such. * @param AuthenticationResponse $response Authentication response that will be returned */ public function postAccountCreation( $user, $creator, AuthenticationResponse $response ); /** * Determine whether an account may be created * * @param User $user User being created (not added to the database yet). * This may become a "UserValue" in the future, or User may be refactored * into such. * @param bool|string $autocreate False if this is not an auto-creation, or * the source of the auto-creation passed to AuthManager::autoCreateUser(). * @return StatusValue */ public function testUserForCreation( $user, $autocreate ); /** * Post-auto-creation callback * @param User $user User being created (has been added to the database now). * This may become a "UserValue" in the future, or User may be refactored * into such. * @param string $source The source of the auto-creation passed to * AuthManager::autoCreateUser(). */ public function autoCreatedAccount( $user, $source ); }