diff --git a/src/AuthorizationServer.php b/src/AuthorizationServer.php index a298944f..0df6b1f9 100644 --- a/src/AuthorizationServer.php +++ b/src/AuthorizationServer.php @@ -26,8 +26,6 @@ class AuthorizationServer implements EmitterAwareInterface { use EmitterAwareTrait; - const ENCRYPTION_KEY_ERROR = 'You must set the encryption key going forward to improve the security of this library - see this page for more information https://oauth2.thephpleague.com/v5-security-improvements/'; - /** * @var GrantTypeInterface[] */ @@ -108,16 +106,6 @@ class AuthorizationServer implements EmitterAwareInterface $this->responseType = $responseType; } - /** - * Set the encryption key - * - * @param string $key - */ - public function setEncryptionKey($key) - { - $this->encryptionKey = $key; - } - /** * Enable a grant type on the server. * @@ -136,12 +124,6 @@ class AuthorizationServer implements EmitterAwareInterface $grantType->setPrivateKey($this->privateKey); $grantType->setPublicKey($this->publicKey); $grantType->setEmitter($this->getEmitter()); - - if ($this->encryptionKey === null) { - // @codeCoverageIgnoreStart - error_log(self::ENCRYPTION_KEY_ERROR); - // @codeCoverageIgnoreEnd - } $grantType->setEncryptionKey($this->encryptionKey); $this->enabledGrantTypes[$grantType->getIdentifier()] = $grantType; @@ -159,12 +141,6 @@ class AuthorizationServer implements EmitterAwareInterface */ public function validateAuthorizationRequest(ServerRequestInterface $request) { - if ($this->encryptionKey === null) { - // @codeCoverageIgnoreStart - error_log(self::ENCRYPTION_KEY_ERROR); - // @codeCoverageIgnoreEnd - } - foreach ($this->enabledGrantTypes as $grantType) { if ($grantType->canRespondToAuthorizationRequest($request)) { return $grantType->validateAuthorizationRequest($request);