@@ -14,12 +14,10 @@ |
||
14 | 14 | |
15 | 15 | class AuthApache extends Apache { |
16 | 16 | protected $stored_realm; |
17 | - public function setRealm($r) |
|
18 | - { |
|
17 | + public function setRealm($r) { |
|
19 | 18 | $stored_realm = $r; |
20 | 19 | } |
21 | - public function challenge(RequestInterface $rq, ResponseInterface $rs) |
|
22 | - { |
|
20 | + public function challenge(RequestInterface $rq, ResponseInterface $rs) { |
|
23 | 21 | $rs->addHeader("WWW-Authenticate", "Basic realm=$stored_realm"); |
24 | 22 | } |
25 | 23 | } |
@@ -38,7 +38,8 @@ |
||
38 | 38 | $gdavBackend = new GrommunioDavBackend(new GLogger('dav')); |
39 | 39 | if (defined("SABRE_AUTH_BACKEND") && strcmp(SABRE_AUTH_BACKEND, "apache") == 0) { |
40 | 40 | $authBackend = new AuthApache; |
41 | -} else { |
|
41 | +} |
|
42 | +else { |
|
42 | 43 | $authBackend = new AuthBasicBackend($gdavBackend); |
43 | 44 | } |
44 | 45 | $authBackend->setRealm(SABRE_AUTH_REALM); |