From 99d7e6dd7d269f2508c138f0dba5dfcf15b63ba7 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 6 Aug 2016 13:24:06 +0200 Subject: [PATCH] Fixed AuthenticateAction not working with only one group of params --- module/Rest/src/Action/AuthenticateAction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/Rest/src/Action/AuthenticateAction.php b/module/Rest/src/Action/AuthenticateAction.php index 37abbc56..7ac531df 100644 --- a/module/Rest/src/Action/AuthenticateAction.php +++ b/module/Rest/src/Action/AuthenticateAction.php @@ -44,7 +44,7 @@ class AuthenticateAction extends AbstractRestAction public function dispatch(Request $request, Response $response, callable $out = null) { $authData = $request->getParsedBody(); - if (! isset($authData['apiKey'], $authData['username'], $authData['password'])) { + if (! isset($authData['apiKey']) && ! isset($authData['username'], $authData['password'])) { return new JsonResponse([ 'error' => RestUtils::INVALID_ARGUMENT_ERROR, 'message' => $this->translator->translate(