credentialStore = $credentialStore; $this->input = $input; } /** * Attempt to authenticate the username and password pair. * * @return string|boolean A string containing a username if authentication is successful, false otherwise. * * @since 1.0 */ public function authenticate() { $username = $this->input->get('username', false, 'username'); $password = $this->input->get('password', false, 'raw'); if (!$username || !$password) { $this->status = Authentication::NO_CREDENTIALS; return false; } return $this->doAuthenticate($username, $password); } /** * Retrieve the hashed password for the specified user. * * @param string $username Username to lookup. * * @return string|boolean Hashed password on success or boolean false on failure. * * @since 1.1.0 */ protected function getHashedPassword($username) { return $this->credentialStore[$username] ?? false; } }