Skip to content

Commit

Permalink
fixex #352, Http Digest Auth typo
Browse files Browse the repository at this point in the history
  • Loading branch information
gwoo committed Apr 22, 2011
1 parent c2356b2 commit c4cc363
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions libraries/lithium/security/auth/adapter/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

namespace lithium\security\auth\adapter;

use lithium\core\Libraries;

/**
* The `Http` adapter provides basic and digest authentication based on the HTTP protocol.
* By default, the adapter uses Http Digest based authentication.
Expand Down Expand Up @@ -133,7 +131,7 @@ protected function _digest($request) {
$nonce = uniqid();
$opaque = md5($realm);

$message = "WWW-Authenticate: Digest realm=\"{$realm}\" qop=\"auth\",";
$message = "WWW-Authenticate: Digest realm=\"{$realm}\",qop=\"auth\",";
$message .= "nonce=\"{$nonce}\",opaque=\"{$opaque}\"";
$this->_writeHeader($message);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public function testCheckDigestIsFalse() {
$this->assertFalse($result);

$this->assertPattern('/Digest/', $http->headers[0]);
$this->assertPattern('/qop="auth"/', $http->headers[0]);
$this->assertPattern('/realm="app",/', $http->headers[0]);
$this->assertPattern('/qop="auth",/', $http->headers[0]);
$this->assertPattern('/nonce=/', $http->headers[0]);
}

Expand Down

0 comments on commit c4cc363

Please sign in to comment.