Source
$http_options = CTestArrayHelper::get($data, 'http_authentication', ['Enable HTTP authentication' => false]);
<?php
/*
** Zabbix
** Copyright (C) 2001-2022 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
require_once dirname(__FILE__).'/../include/CLegacyWebTest.php';
/**
* @onBefore removeGuestFromDisabledGroup
* @onAfter addGuestToDisabledGroup
*/
class testFormAdministrationAuthenticationHttp extends CLegacyWebTest {
const LOGIN_GUEST = 1;
const LOGIN_USER = 2;
const LOGIN_HTTP = 3;
public function getHttpData() {
return [
// HTTP authentication disabled, default zabbix login form.
[
[
'user' => 'Admin',
'password' => 'zabbix',
'pages' => [
[
'page' => 'zabbix.php?action=dashboard.view',
'action' => self::LOGIN_GUEST,
'target' => 'Global view'
],
[
'page' => 'index.php?form=default',
'action' => self::LOGIN_USER,
'target' => 'Global view'
],
[
'page' => 'index.php',
'action' => self::LOGIN_USER,
'target' => 'Global view'
],
// Redirect to default zabbix login form, if open HTTP login form.
[
'page' => 'index_http.php',
'action' => self::LOGIN_USER,
'target' => 'Global view'
],
// Couldn't open GUI page due access.
[