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