104 $username = $digest->getUsername();
108 return [
false,
"No 'Authorization: Digest' header found. Either the client didn't send one, or the server is misconfigured"];
113 if ($hash ===
false || is_null($hash)) {
114 return [
false,
"Username or password was incorrect"];
116 if (!is_string($hash)) {
117 throw new DAV\Exception(
'The returned value from getDigestHash must be a string or null');
121 if (!$digest->validateA1($hash)) {
122 return [
false,
"Username or password was incorrect"];
125 return [
true, $this->principalPrefix . $username];
159 $oldStatus = $response->
getStatus() ?: 200;
160 $auth->requireLogin();
This interface represents a HTTP response.
The RequestInterface represents a HTTP request.
challenge(RequestInterface $request, ResponseInterface $response)
This method is called when a user could not be authenticated, and authentication was required for the...
foreach($paths as $path) $request
getDigestHash($realm, $username)
Returns a users digest hash based on the username and realm.
setStatus($status)
Sets the HTTP status code.
HTTP Digest authentication backend class.
HTTP Digest Authentication handler.
This is the base class for any authentication object.
setRealm($realm)
Sets the authentication realm for this backend.
check(RequestInterface $request, ResponseInterface $response)
When this method is called, the backend must check if authentication was successful.
getStatus()
Returns the current HTTP status code.