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) public function canRespondToAuthorizationRequest(ServerRequestInterface $request)
{ {
return ( return (
array_key_exists('response_type', $request->getQueryParams()) isset($request->getQueryParams()['response_type'])
&& $request->getQueryParams()['response_type'] === 'token' && 'token' === $request->getQueryParams()['response_type']
&& isset($request->getQueryParams()['client_id']) && isset($request->getQueryParams()['client_id'])
); );
} }