Replaces array_key_exists by isset, which is faster, on ImplicitGrant.

This commit is contained in:
Diogo Oliveira de Melo 2017-06-30 15:42:23 -03:00
parent bf7084a147
commit 170ce2fd2d

View File

@ -95,8 +95,8 @@ class ImplicitGrant extends AbstractAuthorizeGrant
public function canRespondToAuthorizationRequest(ServerRequestInterface $request)
{
return (
array_key_exists('response_type', $request->getQueryParams())
&& $request->getQueryParams()['response_type'] === 'token'
isset($request->getQueryParams()['response_type'])
&& 'token' === $request->getQueryParams()['response_type']
&& isset($request->getQueryParams()['client_id'])
);
}