diff --git a/core/core.services.yml b/core/core.services.yml index 65882af..26070ea 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -598,11 +598,6 @@ services: class: Drupal\Core\Authentication\Provider\Cookie tags: - { name: authentication_provider, priority: 0 } - authentication.http_basic: - class: Drupal\Core\Authentication\Provider\HttpBasic - arguments: ['@config.factory'] - tags: - - { name: authentication_provider, priority: 100 } authentication_subscriber: class: Drupal\Core\EventSubscriber\AuthenticationSubscriber tags: diff --git a/core/modules/basic_auth/basic_auth.info.yml b/core/modules/basic_auth/basic_auth.info.yml new file mode 100644 index 0000000..38bb7b2 --- /dev/null +++ b/core/modules/basic_auth/basic_auth.info.yml @@ -0,0 +1,6 @@ +name: 'HTTP Basic Authentication' +type: module +description: 'Provides the HTTP Basic authentication provider' +package: Web services +version: VERSION +core: 8.x diff --git a/core/modules/basic_auth/basic_auth.module b/core/modules/basic_auth/basic_auth.module new file mode 100644 index 0000000..54b6e59 --- /dev/null +++ b/core/modules/basic_auth/basic_auth.module @@ -0,0 +1,19 @@ +' . t('About') . ''; + $output .= '

' . t('The basic auth module implements basic user authentication using the HTTP Basic authentication provider.') . '

'; + return $output; + } +} diff --git a/core/modules/basic_auth/basic_auth.services.yml b/core/modules/basic_auth/basic_auth.services.yml new file mode 100644 index 0000000..441cc6b --- /dev/null +++ b/core/modules/basic_auth/basic_auth.services.yml @@ -0,0 +1,6 @@ +services: + authentication.http_basic: + class: Drupal\basic_auth\Authentication\Provider\HttpBasic + arguments: ['@config.factory'] + tags: + - { name: authentication_provider, priority: 100 } diff --git a/core/lib/Drupal/Core/Authentication/Provider/HttpBasic.php b/core/modules/basic_auth/lib/Drupal/basic_auth/Authentication/Provider/HttpBasic.php similarity index 95% rename from core/lib/Drupal/Core/Authentication/Provider/HttpBasic.php rename to core/modules/basic_auth/lib/Drupal/basic_auth/Authentication/Provider/HttpBasic.php index 5a0fefe..a15253f 100644 --- a/core/lib/Drupal/Core/Authentication/Provider/HttpBasic.php +++ b/core/modules/basic_auth/lib/Drupal/basic_auth/Authentication/Provider/HttpBasic.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Core\Authentication\Provider\HttpBasic. + * Contains \Drupal\basic_auth\Authentication\Provider\HttpBasic. */ -namespace Drupal\Core\Authentication\Provider; +namespace Drupal\basic_auth\Authentication\Provider; use \Drupal\Component\Utility\String; use Drupal\Core\Authentication\AuthenticationProviderInterface; diff --git a/core/modules/system/lib/Drupal/system/Tests/Authentication/HttpBasicTest.php b/core/modules/basic_auth/lib/Drupal/basic_auth/Tests/Authentication/HttpBasicTest.php similarity index 93% rename from core/modules/system/lib/Drupal/system/Tests/Authentication/HttpBasicTest.php rename to core/modules/basic_auth/lib/Drupal/basic_auth/Tests/Authentication/HttpBasicTest.php index 15f3801..41d56d0 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Authentication/HttpBasicTest.php +++ b/core/modules/basic_auth/lib/Drupal/basic_auth/Tests/Authentication/HttpBasicTest.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\system\Tests\Authentication\HttpBasicTest. + * Contains \Drupal\basic_auth\Tests\Authentication\HttpBasicTest. */ -namespace Drupal\system\Tests\Authentication; +namespace Drupal\basic_auth\Tests\Authentication; use Drupal\Core\Authentication\Provider\HttpBasic; use Drupal\simpletest\WebTestBase; @@ -21,7 +21,7 @@ class HttpBasicTest extends WebTestBase { * * @var array */ - public static $modules = array('router_test'); + public static $modules = array('basic_auth', 'router_test'); public static function getInfo() { return array( diff --git a/core/modules/rest/lib/Drupal/rest/Tests/AuthTest.php b/core/modules/rest/lib/Drupal/rest/Tests/AuthTest.php index 6e637c4..41fb72d 100644 --- a/core/modules/rest/lib/Drupal/rest/Tests/AuthTest.php +++ b/core/modules/rest/lib/Drupal/rest/Tests/AuthTest.php @@ -19,7 +19,7 @@ class AuthTest extends RESTTestBase { * * @var array */ - public static $modules = array('hal', 'rest', 'entity_test'); + public static $modules = array('basic_auth', 'hal', 'rest', 'entity_test'); /** * {@inheritdoc}