13 'Authorization' =>
'Basic ' . base64_encode(
'user:pass:bla')
21 ], $basic->getCredentials());
28 'Authorization' =>
'Basic ' . base64_encode(
'userpass')
33 $this->assertNull($basic->getCredentials());
42 $this->assertNull($basic->getCredentials());
49 'Authorization' =>
'QBasic ' . base64_encode(
'user:pass:bla')
53 $this->assertNull($basic->getCredentials());
62 $basic->requireLogin();
64 $this->assertEquals(
'Basic realm="Dagger", charset="UTF-8"',
$response->getHeader(
'WWW-Authenticate'));
65 $this->assertEquals(401,
$response->getStatus());
foreach($paths as $path) $request
An exception for terminatinating execution or to throw for unit testing.
testGetCredentialsNotBasic()
testGetCredentialsNoheader()
testGetInvalidCredentialsColonMissing()
HTTP Basic authentication utility.
The Request class represents a single HTTP request.
This class represents a single HTTP response.