/**
  * @param \OAuth2\Endpoint\Authorization\AuthorizationInterface $authorization
  * @param \Psr\Http\Message\ResponseInterface                   $response
  * @param string                                                $error
  * @param string|null                                           $error_description
  */
 private function createRedirectionException(AuthorizationInterface $authorization, ResponseInterface &$response, $error, $error_description = null)
 {
     $params = ['response_mode' => $authorization->getResponseMode(), 'redirect_uri' => $authorization->getRedirectUri()];
     if (true === $authorization->hasQueryParam('state')) {
         $params['state'] = $authorization->getQueryParam('state');
     }
     $exception = $this->getExceptionManager()->getRedirectException($error, $error_description, $params);
     $exception->getHttpResponse($response);
 }