Skip to content

Commit 99c4060

Browse files
authored
Merge pull request #303 from cakephp/remove-name
Remove the name option from AuthenticationMiddleware
2 parents 82639b6 + 3ce6c0c commit 99c4060

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/Middleware/AuthenticationMiddleware.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ class AuthenticationMiddleware
3737
/**
3838
* Configuration options
3939
*
40-
* - `name` the application hook method to call. Will be prefixed with `authentication`
41-
*
4240
* The following keys are deprecated and should instead be set on the AuthenticationService
4341
*
4442
* - `identityAttribute` - The request attribute to store the identity in.
@@ -47,9 +45,7 @@ class AuthenticationMiddleware
4745
* - `queryParam` - Set to true to have unauthenticated redirects contain a `redirect` query string
4846
* parameter with the previously blocked URL.
4947
*/
50-
protected $_defaultConfig = [
51-
'name' => null,
52-
];
48+
protected $_defaultConfig = [];
5349

5450
/**
5551
* Authentication service or application instance.
@@ -62,14 +58,11 @@ class AuthenticationMiddleware
6258
* Constructor
6359
*
6460
* @param \Authentication\AuthenticationServiceInterface|\Authentication\AuthenticationServiceProviderInterface $subject Authentication service or application instance.
65-
* @param array|string $config Array of configuration settings or string with authentication service provider name.
61+
* @param array $config Array of configuration settings.
6662
* @throws \InvalidArgumentException When invalid subject has been passed.
6763
*/
6864
public function __construct($subject, $config = null)
6965
{
70-
if (is_string($config)) {
71-
$config = ['name' => $config];
72-
}
7366
$this->setConfig($config);
7467

7568
if (!($subject instanceof AuthenticationServiceInterface) && !($subject instanceof AuthenticationServiceProviderInterface)) {

0 commit comments

Comments
 (0)