diff options
Diffstat (limited to 'srcs/phpmyadmin/libraries/classes/Plugins')
119 files changed, 0 insertions, 26125 deletions
diff --git a/srcs/phpmyadmin/libraries/classes/Plugins/Auth/AuthenticationConfig.php b/srcs/phpmyadmin/libraries/classes/Plugins/Auth/AuthenticationConfig.php deleted file mode 100644 index 7ebd1ae..0000000 --- a/srcs/phpmyadmin/libraries/classes/Plugins/Auth/AuthenticationConfig.php +++ /dev/null @@ -1,172 +0,0 @@ -<?php -/* vim: set expandtab sw=4 ts=4 sts=4: */ -/** - * Config Authentication plugin for phpMyAdmin - * - * @package PhpMyAdmin-Authentication - * @subpackage Config - */ -declare(strict_types=1); - -namespace PhpMyAdmin\Plugins\Auth; - -use PhpMyAdmin\Plugins\AuthenticationPlugin; -use PhpMyAdmin\Response; -use PhpMyAdmin\Server\Select; -use PhpMyAdmin\Url; -use PhpMyAdmin\Util; - -/** - * Handles the config authentication method - * - * @package PhpMyAdmin-Authentication - */ -class AuthenticationConfig extends AuthenticationPlugin -{ - /** - * Displays authentication form - * - * @return boolean always true - */ - public function showLoginForm() - { - $response = Response::getInstance(); - if ($response->isAjax()) { - $response->setRequestStatus(false); - // reload_flag removes the token parameter from the URL and reloads - $response->addJSON('reload_flag', '1'); - if (defined('TESTSUITE')) { - return true; - } else { - exit; - } - } - - return true; - } - - /** - * Gets authentication credentials - * - * @return boolean always true - */ - public function readCredentials() - { - if ($GLOBALS['token_provided'] && $GLOBALS['token_mismatch']) { - return false; - } - - $this->user = $GLOBALS['cfg']['Server']['user']; - $this->password = $GLOBALS['cfg']['Server']['password']; - - return true; - } - - /** - * User is not allowed to login to MySQL -> authentication failed - * - * @param string $failure String describing why authentication has failed - * - * @return void - */ - public function showFailure($failure) - { - parent::showFailure($failure); - $conn_error = $GLOBALS['dbi']->getError(); - if (! $conn_error) { - $conn_error = __('Cannot connect: invalid settings.'); - } - - /* HTML header */ - $response = Response::getInstance(); - $response->getFooter() - ->setMinimal(); - $header = $response->getHeader(); - $header->setBodyId('loginform'); - $header->setTitle(__('Access denied!')); - $header->disableMenuAndConsole(); - echo '< |
