diff --git a/core/core.services.yml b/core/core.services.yml
index 8a24ee7..0b9352d 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -593,11 +593,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/lib/Drupal/Core/Authentication/Provider/HttpBasic.php b/core/lib/Drupal/Core/Authentication/Provider/HttpBasic.php
deleted file mode 100644
index 5a0fefe..0000000
--- a/core/lib/Drupal/Core/Authentication/Provider/HttpBasic.php
+++ /dev/null
@@ -1,86 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\Authentication\Provider\HttpBasic.
- */
-
-namespace Drupal\Core\Authentication\Provider;
-
-use \Drupal\Component\Utility\String;
-use Drupal\Core\Authentication\AuthenticationProviderInterface;
-use Drupal\Core\Config\Config;
-use Drupal\Core\Config\ConfigFactory;
-use Symfony\Component\HttpFoundation\Request;
-use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
-use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
-use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
-
-/**
- * HTTP Basic authentication provider.
- */
-class HttpBasic implements AuthenticationProviderInterface {
-
-  /**
-   * The config factory.
-   *
-   * @var \Drupal\Core\Config\ConfigFactory
-   */
-  protected $configFactory;
-
-  /**
-   * Constructs a HTTP basic authentication provider object.
-   *
-   * @param \Drupal\Core\Config\ConfigFactory $config_factory
-   *   The config factory.
-   */
-  public function __construct(ConfigFactory $config_factory) {
-    $this->configFactory = $config_factory;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function applies(Request $request) {
-    $username = $request->headers->get('PHP_AUTH_USER');
-    $password = $request->headers->get('PHP_AUTH_PW');
-    return isset($username) && isset($password);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function authenticate(Request $request) {
-    $username = $request->headers->get('PHP_AUTH_USER');
-    $password = $request->headers->get('PHP_AUTH_PW');
-    $uid = user_authenticate($username, $password);
-    if ($uid) {
-      return user_load($uid);
-    }
-    return NULL;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function cleanup(Request $request) {}
-
-  /**
-   * {@inheritdoc}
-   */
-  public function handleException(GetResponseForExceptionEvent $event) {
-    $exception = $event->getException();
-    if (user_is_anonymous() && $exception instanceof AccessDeniedHttpException) {
-      if (!$this->applies($event->getRequest())) {
-        $site_name = $this->configFactory->get('system.site')->get('name');
-        global $base_url;
-        $challenge = String::format('Basic realm="@realm"', array(
-          '@realm' => !empty($site_name) ? $site_name : $base_url,
-        ));
-        $event->setException(new UnauthorizedHttpException($challenge, 'No authentication credentials provided.', $exception));
-      }
-      return TRUE;
-    }
-    return FALSE;
-  }
-}
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..bb2c495
--- /dev/null
+++ b/core/modules/basic_auth/basic_auth.module
@@ -0,0 +1,6 @@
+<?php
+
+/**
+ * @file
+ * Provides an HTTP Basic authentication provider.
+ */
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/modules/basic_auth/lib/Drupal/basic_auth/Authentication/Provider/HttpBasic.php b/core/modules/basic_auth/lib/Drupal/basic_auth/Authentication/Provider/HttpBasic.php
new file mode 100644
index 0000000..a15253f
--- /dev/null
+++ b/core/modules/basic_auth/lib/Drupal/basic_auth/Authentication/Provider/HttpBasic.php
@@ -0,0 +1,86 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\basic_auth\Authentication\Provider\HttpBasic.
+ */
+
+namespace Drupal\basic_auth\Authentication\Provider;
+
+use \Drupal\Component\Utility\String;
+use Drupal\Core\Authentication\AuthenticationProviderInterface;
+use Drupal\Core\Config\Config;
+use Drupal\Core\Config\ConfigFactory;
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
+use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
+use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
+
+/**
+ * HTTP Basic authentication provider.
+ */
+class HttpBasic implements AuthenticationProviderInterface {
+
+  /**
+   * The config factory.
+   *
+   * @var \Drupal\Core\Config\ConfigFactory
+   */
+  protected $configFactory;
+
+  /**
+   * Constructs a HTTP basic authentication provider object.
+   *
+   * @param \Drupal\Core\Config\ConfigFactory $config_factory
+   *   The config factory.
+   */
+  public function __construct(ConfigFactory $config_factory) {
+    $this->configFactory = $config_factory;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function applies(Request $request) {
+    $username = $request->headers->get('PHP_AUTH_USER');
+    $password = $request->headers->get('PHP_AUTH_PW');
+    return isset($username) && isset($password);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function authenticate(Request $request) {
+    $username = $request->headers->get('PHP_AUTH_USER');
+    $password = $request->headers->get('PHP_AUTH_PW');
+    $uid = user_authenticate($username, $password);
+    if ($uid) {
+      return user_load($uid);
+    }
+    return NULL;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function cleanup(Request $request) {}
+
+  /**
+   * {@inheritdoc}
+   */
+  public function handleException(GetResponseForExceptionEvent $event) {
+    $exception = $event->getException();
+    if (user_is_anonymous() && $exception instanceof AccessDeniedHttpException) {
+      if (!$this->applies($event->getRequest())) {
+        $site_name = $this->configFactory->get('system.site')->get('name');
+        global $base_url;
+        $challenge = String::format('Basic realm="@realm"', array(
+          '@realm' => !empty($site_name) ? $site_name : $base_url,
+        ));
+        $event->setException(new UnauthorizedHttpException($challenge, 'No authentication credentials provided.', $exception));
+      }
+      return TRUE;
+    }
+    return FALSE;
+  }
+}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Authentication/HttpBasicTest.php b/core/modules/system/lib/Drupal/system/Tests/Authentication/HttpBasicTest.php
index 15f3801..8dddca1 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Authentication/HttpBasicTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Authentication/HttpBasicTest.php
@@ -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(
