From e36ff17ad9ed91b8401302766446474cbe76e17d Mon Sep 17 00:00:00 2001 From: Ilya Bulah Date: Thu, 14 Jun 2018 17:59:09 +0300 Subject: [PATCH] Fix psr2 --- src/Grant/AbstractGrant.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Grant/AbstractGrant.php b/src/Grant/AbstractGrant.php index 79a1ac47..30061d60 100644 --- a/src/Grant/AbstractGrant.php +++ b/src/Grant/AbstractGrant.php @@ -196,14 +196,12 @@ abstract class AbstractGrant implements GrantTypeInterface // If a redirect URI is provided ensure it matches what is pre-registered $redirectUri = $this->getRequestParameter('redirect_uri', $request, null); if ($redirectUri !== null) { - if ( - is_string($client->getRedirectUri()) + if (is_string($client->getRedirectUri()) && (strcmp($client->getRedirectUri(), $redirectUri) !== 0) ) { $this->getEmitter()->emit(new RequestEvent(RequestEvent::CLIENT_AUTHENTICATION_FAILED, $request)); throw OAuthServerException::invalidClient(); - } elseif ( - is_array($client->getRedirectUri()) + } elseif (is_array($client->getRedirectUri()) && in_array($redirectUri, $client->getRedirectUri(), true) === false ) { $this->getEmitter()->emit(new RequestEvent(RequestEvent::CLIENT_AUTHENTICATION_FAILED, $request));