Removed all uses of the 'whitelist' term

This commit is contained in:
Alejandro Celaya
2021-02-16 15:28:03 +01:00
parent 4df4db05f4
commit 3f2d38a86a
3 changed files with 13 additions and 13 deletions

View File

@@ -24,16 +24,16 @@ class AuthenticationMiddleware implements MiddlewareInterface, StatusCodeInterfa
public const API_KEY_HEADER = 'X-Api-Key';
private ApiKeyServiceInterface $apiKeyService;
private array $routesWhitelist;
private array $routesWithoutApiKey;
private array $routesWithQueryApiKey;
public function __construct(
ApiKeyServiceInterface $apiKeyService,
array $routesWhitelist,
array $routesWithoutApiKey,
array $routesWithQueryApiKey
) {
$this->apiKeyService = $apiKeyService;
$this->routesWhitelist = $routesWhitelist;
$this->routesWithoutApiKey = $routesWithoutApiKey;
$this->routesWithQueryApiKey = $routesWithQueryApiKey;
}
@@ -45,7 +45,7 @@ class AuthenticationMiddleware implements MiddlewareInterface, StatusCodeInterfa
$routeResult === null
|| $routeResult->isFailure()
|| $request->getMethod() === self::METHOD_OPTIONS
|| contains($this->routesWhitelist, $routeResult->getMatchedRouteName())
|| contains($this->routesWithoutApiKey, $routeResult->getMatchedRouteName())
) {
return $handler->handle($request);
}