Skip to content

Commit cdeb811

Browse files
author
okarpenko
committed
Revert "MAGETWO-37815: Unable to revoke All Access Tokens for Customer without Tokens"
This reverts commit c14a78f.
1 parent c14a78f commit cdeb811

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

app/code/Magento/Customer/Controller/Adminhtml/Customer/InvalidateToken.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,28 @@
77

88
namespace Magento\Customer\Controller\Adminhtml\Customer;
99

10+
use Magento\Integration\Api\CustomerTokenServiceInterface;
11+
1012
/**
1113
* Class to invalidate tokens for customers
1214
*/
1315
class InvalidateToken extends \Magento\Customer\Controller\Adminhtml\Index
1416
{
17+
/**
18+
* @var CustomerTokenServiceInterface
19+
*/
20+
protected $tokenService;
21+
22+
/**
23+
* Inject dependencies.
24+
*
25+
* @param CustomerTokenServiceInterface $tokenService
26+
*/
27+
public function __construct(CustomerTokenServiceInterface $tokenService)
28+
{
29+
$this->tokenService = $tokenService;
30+
}
31+
1532
/**
1633
* Reset customer's tokens handler
1734
*

app/code/Magento/Customer/Controller/Adminhtml/Index.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Magento\Framework\Message\Error;
1616
use Magento\Framework\ObjectFactory;
1717
use Magento\Framework\Api\DataObjectHelper;
18-
use Magento\Integration\Api\CustomerTokenServiceInterface;
1918

2019
/**
2120
* Class Index
@@ -144,11 +143,6 @@ class Index extends \Magento\Backend\App\Action
144143
*/
145144
protected $resultJsonFactory;
146145

147-
/**
148-
* @var CustomerTokenServiceInterface
149-
*/
150-
protected $tokenService;
151-
152146
/**
153147
* @param \Magento\Backend\App\Action\Context $context
154148
* @param \Magento\Framework\Registry $coreRegistry
@@ -203,8 +197,7 @@ public function __construct(
203197
\Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory,
204198
\Magento\Framework\View\Result\PageFactory $resultPageFactory,
205199
\Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory,
206-
\Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory,
207-
CustomerTokenServiceInterface $tokenService
200+
\Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
208201
) {
209202
$this->_coreRegistry = $coreRegistry;
210203
$this->_fileFactory = $fileFactory;
@@ -230,7 +223,6 @@ public function __construct(
230223
$this->resultPageFactory = $resultPageFactory;
231224
$this->resultForwardFactory = $resultForwardFactory;
232225
$this->resultJsonFactory = $resultJsonFactory;
233-
$this->tokenService = $tokenService;
234226
parent::__construct($context);
235227
}
236228

0 commit comments

Comments
 (0)