You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -63,15 +64,26 @@ class AuthenticationMiddleware implements MiddlewareInterface
63
64
*/
64
65
protected$subject;
65
66
67
+
/**
68
+
* The container instance from the application
69
+
*
70
+
* @var \Cake\Core\ContainerInterface|null
71
+
*/
72
+
protected$container;
73
+
66
74
/**
67
75
* Constructor
68
76
*
69
77
* @param \Authentication\AuthenticationServiceInterface|\Authentication\AuthenticationServiceProviderInterface $subject Authentication service or application instance.
70
78
* @param array $config Array of configuration settings.
79
+
* @param \Cake\Core\ContainerInterface|null $container The container instance from the application
71
80
* @throws \InvalidArgumentException When invalid subject has been passed.
72
81
*/
73
-
publicfunction__construct($subject, $config = [])
74
-
{
82
+
publicfunction__construct(
83
+
$subject,
84
+
$config = [],
85
+
?ContainerInterface$container = null
86
+
) {
75
87
$this->setConfig($config);
76
88
77
89
if (
@@ -89,6 +101,7 @@ public function __construct($subject, $config = [])
89
101
}
90
102
91
103
$this->subject = $subject;
104
+
$this->container = $container;
92
105
}
93
106
94
107
/**
@@ -105,6 +118,8 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
105
118
if ($this->subjectinstanceof ContainerApplicationInterface) {
0 commit comments