From f5c3ba0b244c427d265749b076a99077d99a4631 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sat, 1 Jul 2017 18:22:51 +0100 Subject: [PATCH] Removed dead code --- src/Grant/AuthCodeGrant.php | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/Grant/AuthCodeGrant.php b/src/Grant/AuthCodeGrant.php index 2a05355e..594bc7ab 100644 --- a/src/Grant/AuthCodeGrant.php +++ b/src/Grant/AuthCodeGrant.php @@ -322,20 +322,6 @@ class AuthCodeGrant extends AbstractAuthorizeGrant 'code_challenge_method ' => $authorizationRequest->getCodeChallengeMethod(), ]; - if ($this->encryptionKey === null) { - // Add padding to vary the length of the payload - $payload['_padding'] = base64_encode(random_bytes(mt_rand(8, 256))); - // Shuffle the payload so that the structure is no longer know and obvious - $keys = array_keys($payload); - shuffle($keys); - $shuffledPayload = []; - foreach ($keys as $key) { - $shuffledPayload[$key] = $payload[$key]; - } - } else { - $shuffledPayload = $payload; - } - $response = new RedirectResponse(); $response->setRedirectUri( $this->makeRedirectUri( @@ -343,7 +329,7 @@ class AuthCodeGrant extends AbstractAuthorizeGrant [ 'code' => $this->encrypt( json_encode( - $shuffledPayload + $payload ) ), 'state' => $authorizationRequest->getState(),