From f1454cde3648d96c478155d158568ca0ae1dd900 Mon Sep 17 00:00:00 2001 From: Marc Ypes Date: Thu, 15 Nov 2018 17:21:27 +0100 Subject: [PATCH] Fix bc breaking change --- src/AuthorizationServer.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/AuthorizationServer.php b/src/AuthorizationServer.php index e96ce04f..ce684d1a 100644 --- a/src/AuthorizationServer.php +++ b/src/AuthorizationServer.php @@ -114,12 +114,6 @@ class AuthorizationServer implements EmitterAwareInterface $responseType = clone $responseType; } - if ($responseType instanceof AbstractResponseType) { - $responseType->setPrivateKey($this->privateKey); - } - - $responseType->setEncryptionKey($this->encryptionKey); - $this->responseType = $responseType; } @@ -219,7 +213,14 @@ class AuthorizationServer implements EmitterAwareInterface */ protected function getResponseType() { - return clone $this->responseType; + $responseType = clone $this->responseType; + if ($responseType instanceof AbstractResponseType) { + $responseType->setPrivateKey($this->privateKey); + } + + $responseType->setEncryptionKey($this->encryptionKey); + + return $responseType; } /**