From dd5eee150d2e30e792bf982cde83700929a0e72d Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sat, 1 Jul 2017 16:29:50 +0100 Subject: [PATCH] Ensure response type also has access to the encryption key --- src/AuthorizationServer.php | 1 + src/ResponseTypes/ResponseTypeInterface.php | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/AuthorizationServer.php b/src/AuthorizationServer.php index 4ba9b8d1..8c100775 100644 --- a/src/AuthorizationServer.php +++ b/src/AuthorizationServer.php @@ -226,6 +226,7 @@ class AuthorizationServer implements EmitterAwareInterface } $this->responseType->setPrivateKey($this->privateKey); + $this->responseType->setEncryptionKey($this->encryptionKey); return $this->responseType; } diff --git a/src/ResponseTypes/ResponseTypeInterface.php b/src/ResponseTypes/ResponseTypeInterface.php index 9f358a53..8ac20b8c 100644 --- a/src/ResponseTypes/ResponseTypeInterface.php +++ b/src/ResponseTypes/ResponseTypeInterface.php @@ -33,4 +33,11 @@ interface ResponseTypeInterface * @return ResponseInterface */ public function generateHttpResponse(ResponseInterface $response); + + /** + * Set the encryption key + * + * @param string|null $key + */ + public function setEncryptionKey($key = null); }