@@ -39,26 +39,35 @@ class Login extends \Magento\Backend\Controller\Adminhtml\Auth implements HttpGe
39
39
*/
40
40
private $ backendUrlFactory ;
41
41
42
+ /**
43
+ * @var Http
44
+ */
45
+ private $ http ;
46
+
42
47
/**
43
48
* Constructor
44
49
*
45
50
* @param \Magento\Backend\App\Action\Context $context
46
51
* @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
47
- * @param FrontNameResolver $frontNameResolver
48
- * @param UrlFactory $backendUrlFactory
52
+ * @param FrontNameResolver|null $frontNameResolver
53
+ * @param BackendAppList|null $backendAppList
54
+ * @param UrlFactory|null $backendUrlFactory
55
+ * @param Http|null $http
49
56
*/
50
57
public function __construct (
51
58
\Magento \Backend \App \Action \Context $ context ,
52
59
\Magento \Framework \View \Result \PageFactory $ resultPageFactory ,
53
60
FrontNameResolver $ frontNameResolver = null ,
54
61
BackendAppList $ backendAppList = null ,
55
- UrlFactory $ backendUrlFactory = null
62
+ UrlFactory $ backendUrlFactory = null ,
63
+ Http $ http = null
56
64
) {
57
65
$ this ->resultPageFactory = $ resultPageFactory ;
58
66
parent ::__construct ($ context );
59
67
$ this ->frontNameResolver = $ frontNameResolver ?? ObjectManager::getInstance ()->get (FrontNameResolver::class);
60
68
$ this ->backendAppList = $ backendAppList ?? ObjectManager::getInstance ()->get (BackendAppList::class);
61
69
$ this ->backendUrlFactory = $ backendUrlFactory ?? ObjectManager::getInstance ()->get (UrlFactory::class);
70
+ $ this ->http = $ http ?? ObjectManager::getInstance ()->get (Http::class);
62
71
}
63
72
64
73
/**
@@ -113,7 +122,7 @@ private function isValidBackendUri(): bool
113
122
} else {
114
123
//In case of application authenticating through the admin login, the script name should be removed
115
124
//from the path, because application has own script.
116
- $ baseUrl = Http:: getUrlNoScript ($ baseUrl );
125
+ $ baseUrl = $ this -> http -> getUrlNoScript ($ baseUrl );
117
126
$ backendFrontName = $ backendApp ->getCookiePath ();
118
127
}
119
128
0 commit comments