digest() public method

Looks at the WWW-Authenticate. Will return array of key/values if digest.
public digest ( ) : array
return array
Example #1
0
 public function testDigestParsing()
 {
     $auth = 'Digest realm="app",';
     $auth .= 'qop="auth",nonce="4ee1617b8756e",opaque="dd7bcee161192cb8fba765eb595eba87"';
     $headers = array("WWW-Authenticate" => $auth);
     $response = new Response(compact('headers'));
     $expected = array("WWW-Authenticate" => $auth);
     $result = $response->headers;
     $this->assertEqual($expected, $result);
     $expected = array('realm' => 'app', 'qop' => 'auth', 'nonce' => '4ee1617b8756e', 'opaque' => 'dd7bcee161192cb8fba765eb595eba87');
     $result = array_filter($response->digest());
     $this->assertEqual($expected, $result);
 }