Issues (187)

lib/AuthApache.php (2 issues)

1
<?php
2
3
/*
4
 * SPDX-License-Identifier: AGPL-3.0-or-later
5
 * SPDX-FileCopyrightText: 2025 grommunio GmbH
6
 *
7
 * Use this class when the HTTP server is in charge of authentication.
8
 */
9
10
namespace grommunio\DAV;
11
12
use Sabre\DAV\Auth\Backend\Apache;
13
use Sabre\HTTP\RequestInterface;
14
use Sabre\HTTP\ResponseInterface;
15
16
class AuthApache extends Apache {
17
	protected $stored_realm;
18
19
	public function setRealm($r) {
20
		$stored_realm = $r;
0 ignored issues
show
The assignment to $stored_realm is dead and can be removed.
Loading history...
21
	}
22
23
	public function challenge(RequestInterface $rq, ResponseInterface $rs) {
24
		$rs->addHeader("WWW-Authenticate", "Basic realm={$stored_realm}");
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $stored_realm seems to be never defined.
Loading history...
25
	}
26
}
27