diff --git a/src/Controller/Component/AuthComponent.php b/src/Controller/Component/AuthComponent.php index ee8b51d7aec..a119ead081f 100644 --- a/src/Controller/Component/AuthComponent.php +++ b/src/Controller/Component/AuthComponent.php @@ -227,7 +227,7 @@ class AuthComponent extends Component { * * @var Cake\Auth\BaseAuthenticate */ - protected $_authenticateProvider; + protected $_authenticationProvider; /** * The instance of the Authorize provider that was used to grant @@ -740,7 +740,7 @@ public function identify(Request $request, Response $response) { foreach ($this->_authenticateObjects as $auth) { $result = $auth->authenticate($request, $response); if (!empty($result) && is_array($result)) { - $this->_authenticateProvider = $auth; + $this->_authenticationProvider = $auth; return $result; } } @@ -809,8 +809,8 @@ public function flash($message, $type = 'error') { * * @return \Cake\Auth\BaseAuthenticate|null */ - public function loginProvider() { - return $this->_authenticateProvider; + public function authenticationProvider() { + return $this->_authenticationProvider; } /** diff --git a/tests/TestCase/Controller/Component/AuthComponentTest.php b/tests/TestCase/Controller/Component/AuthComponentTest.php index 9f9a7540f9f..5c6afedf71e 100644 --- a/tests/TestCase/Controller/Component/AuthComponentTest.php +++ b/tests/TestCase/Controller/Component/AuthComponentTest.php @@ -175,7 +175,7 @@ public function testLogin() { $this->assertTrue((bool)$this->Auth->user()); $this->assertEquals($user, $this->Auth->user()); - $this->assertSame($AuthLoginFormAuthenticate, $this->Auth->loginProvider()); + $this->assertSame($AuthLoginFormAuthenticate, $this->Auth->authenticationProvider()); } /**