elisei /
social-login
| 1 | <?php |
||||
| 2 | /** |
||||
| 3 | * Copyright © 2019 O2TI. All rights reserved. |
||||
| 4 | * See LICENSE.txt for license details. |
||||
| 5 | */ |
||||
| 6 | |||||
| 7 | namespace O2TI\SocialLogin\Controller\Endpoint; |
||||
| 8 | |||||
| 9 | use Magento\Framework\App\Action\Action; |
||||
| 10 | use Magento\Framework\App\Action\Context; |
||||
| 11 | use Magento\Framework\Url\DecoderInterface; |
||||
| 12 | use O2TI\SocialLogin\Provider\Provider; |
||||
| 13 | |||||
| 14 | class Index extends Action |
||||
|
0 ignored issues
–
show
Deprecated Code
introduced
by
Loading history...
|
|||||
| 15 | { |
||||
| 16 | /** |
||||
| 17 | * @var DecoderInterface |
||||
| 18 | */ |
||||
| 19 | protected $urlDecoder; |
||||
| 20 | |||||
| 21 | /** |
||||
| 22 | * @var Provider |
||||
| 23 | */ |
||||
| 24 | protected $provider; |
||||
| 25 | |||||
| 26 | /** |
||||
| 27 | * Construct. |
||||
| 28 | * |
||||
| 29 | * @param Context $context |
||||
| 30 | * @param Provider $provider |
||||
| 31 | * @param DecoderInterface $urlDecoder |
||||
| 32 | */ |
||||
| 33 | public function __construct( |
||||
| 34 | Context $context, |
||||
| 35 | Provider $provider, |
||||
| 36 | DecoderInterface $urlDecoder |
||||
| 37 | ) { |
||||
| 38 | parent::__construct($context); |
||||
| 39 | $this->provider = $provider; |
||||
| 40 | $this->urlDecoder = $urlDecoder; |
||||
| 41 | } |
||||
| 42 | |||||
| 43 | /** |
||||
| 44 | * Dispatch request. |
||||
| 45 | * |
||||
| 46 | * @return void |
||||
| 47 | */ |
||||
| 48 | public function execute() |
||||
| 49 | { |
||||
| 50 | $provider = $this->_request->getParam('provider'); |
||||
| 51 | $isSecure = $this->_request->isSecure(); |
||||
| 52 | $referer = $this->_request->getParam('referer'); |
||||
| 53 | |||||
| 54 | $response = $this->provider->setAutenticateAndReferer($provider, $isSecure, $referer); |
||||
|
0 ignored issues
–
show
$isSecure of type boolean is incompatible with the type integer expected by parameter $isSecure of O2TI\SocialLogin\Provide...AutenticateAndReferer().
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 55 | // phpcs:ignore |
||||
| 56 | return $this->_redirect($this->urlDecoder->decode($response['redirectUrl'])); |
||||
|
0 ignored issues
–
show
|
|||||
| 57 | } |
||||
| 58 | } |
||||
| 59 |