Fix bc breaking change

This commit is contained in:
Marc Ypes 2018-11-15 17:21:27 +01:00
parent f2cd3646ff
commit f1454cde36

View File

@ -114,12 +114,6 @@ class AuthorizationServer implements EmitterAwareInterface
$responseType = clone $responseType; $responseType = clone $responseType;
} }
if ($responseType instanceof AbstractResponseType) {
$responseType->setPrivateKey($this->privateKey);
}
$responseType->setEncryptionKey($this->encryptionKey);
$this->responseType = $responseType; $this->responseType = $responseType;
} }
@ -219,7 +213,14 @@ class AuthorizationServer implements EmitterAwareInterface
*/ */
protected function getResponseType() 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;
} }
/** /**