Open earthiverse opened 1 month ago
Yes, it does work with module-rest.
module-mezzio only sets PHP_AUTH_USER
, PHP_AUTH_PW
in ServerRequest object, $_SERVER is not updated.
They should be accessible using $request->getServerParams()
.
I'm using Mezzio's mezzio-authentication-basic
package, which looks like it only parses the Header.
If I add the header manually it works.
$I->haveHttpHeader('Authentication', 'Basic dGVzdDp0ZXN0');
I'm getting 401 (Unauthorized) in the tests I use
$I->amHttpAuthenticated('test', 'test');
with. Routes that I don't check authorization seem to work.When I run a test using Mezzio
When I run it using PhpBrowser
Here's my
Acceptance.suite.yml
And my test