Skip to content

Commit

Permalink
Add Renderer service to conform with changes to OAuth2ControllerBase.
Browse files Browse the repository at this point in the history
See Issue 3033444: LogicException & RuntimeException on user login.
  • Loading branch information
cdubz committed Mar 15, 2019
1 parent ccf9b53 commit c91fbc0
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Controller/PbsAuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Drupal\Component\Serialization\Json;
use Drupal\Core\Messenger\MessengerInterface;
use Drupal\Core\Render\RendererInterface;
use Drupal\social_api\Plugin\NetworkManager;
use Drupal\social_auth\Controller\OAuth2ControllerBase;
use Drupal\social_auth\SocialAuthDataHandler;
Expand Down Expand Up @@ -41,14 +42,17 @@ class PbsAuthController extends OAuth2ControllerBase {
* SocialAuthDataHandler object.
* @param \Drupal\Component\Serialization\Json $json_serializer
* Used to serialize additional data.
* @param \Drupal\Core\Render\RendererInterface $renderer
* Used to handle metadata for redirection to authentication URL.
*/
public function __construct(MessengerInterface $messenger,
NetworkManager $network_manager,
UserAuthenticator $user_authenticator,
PbsAuthManager $pbs_auth_manager,
RequestStack $request,
SocialAuthDataHandler $data_handler,
Json $json_serializer) {
Json $json_serializer,
RendererInterface $renderer) {

parent::__construct(
'Social Auth PBS',
Expand All @@ -58,7 +62,8 @@ public function __construct(MessengerInterface $messenger,
$user_authenticator,
$pbs_auth_manager,
$request,
$data_handler
$data_handler,
$renderer
);
$this->jsonSerializer = $json_serializer;
}
Expand All @@ -74,7 +79,8 @@ public static function create(ContainerInterface $container) {
$container->get('social_auth_pbs.manager'),
$container->get('request_stack'),
$container->get('social_auth.data_handler'),
$container->get('serialization.json')
$container->get('serialization.json'),
$container->get('renderer')
);
}

Expand Down

0 comments on commit c91fbc0

Please sign in to comment.