protected function _setDefaults()
{
$defaults = ['authenticate' => ['Form'], 'flash' => ['element' => 'default', 'key' => 'auth', 'params' => ['class' => 'error']], 'loginAction' => ['controller' => 'Users', 'action' => 'login', 'plugin' => null], 'logoutRedirect' => $this->_config['loginAction'], 'authError' => __d('cake', 'You are not authorized to access that location.')];
$config = $this->config();
foreach ($config as $key => $value) {
if ($value !== null) {
unset($defaults[$key]);
}
}
$this->config($defaults);
}