From 9febc32e14b9ad868de5c30de7a03ed0368f3d55 Mon Sep 17 00:00:00 2001 From: Andrew Millington Date: Fri, 20 Apr 2018 18:27:47 +0100 Subject: [PATCH] Add spacing around logical blocks --- src/Grant/AuthCodeGrant.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Grant/AuthCodeGrant.php b/src/Grant/AuthCodeGrant.php index 20d5041b..2f33a97c 100644 --- a/src/Grant/AuthCodeGrant.php +++ b/src/Grant/AuthCodeGrant.php @@ -222,6 +222,7 @@ class AuthCodeGrant extends AbstractAuthorizeGrant $request, $this->getServerParameter('PHP_AUTH_USER', $request) ); + if (is_null($clientId)) { throw OAuthServerException::invalidRequest('client_id'); } @@ -239,6 +240,7 @@ class AuthCodeGrant extends AbstractAuthorizeGrant } $redirectUri = $this->getQueryStringParameter('redirect_uri', $request); + if ($redirectUri !== null) { if ( is_string($client->getRedirectUri()) @@ -284,6 +286,7 @@ class AuthCodeGrant extends AbstractAuthorizeGrant } $codeChallengeMethod = $this->getQueryStringParameter('code_challenge_method', $request, 'plain'); + if (in_array($codeChallengeMethod, ['plain', 'S256'], true) === false) { throw OAuthServerException::invalidRequest( 'code_challenge_method',