Moved whitelisted routes in CheckAuthenticationMiddleware to external configuration

This commit is contained in:
Alejandro Celaya
2018-05-01 18:35:12 +02:00
parent ef3c4aadf2
commit 2f5290b9d3
4 changed files with 32 additions and 6 deletions

View File

@@ -37,9 +37,11 @@ class CheckAuthenticationMiddlewareTest extends TestCase
public function setUp()
{
$this->jwtService = $this->prophesize(JWTService::class);
$this->middleware = new CheckAuthenticationMiddleware($this->jwtService->reveal(), Translator::factory([]));
$this->dummyMiddleware = middleware(function ($request, $handler) {
return new Response\EmptyResponse;
$this->middleware = new CheckAuthenticationMiddleware($this->jwtService->reveal(), Translator::factory([]), [
AuthenticateAction::class,
]);
$this->dummyMiddleware = middleware(function () {
return new Response\EmptyResponse();
});
}