Commit a4f9d8e3 authored by webchick's avatar webchick
Browse files

Issue #2041885 by BTMash, cweagans, klausi: Move HTTP basic authentication...

Issue #2041885 by BTMash, cweagans, klausi: Move HTTP basic authentication provider to a separate module.
parent e40eb197
...@@ -606,11 +606,6 @@ services: ...@@ -606,11 +606,6 @@ services:
class: Drupal\Core\Authentication\Provider\Cookie class: Drupal\Core\Authentication\Provider\Cookie
tags: tags:
- { name: authentication_provider, priority: 0 } - { 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: authentication_subscriber:
class: Drupal\Core\EventSubscriber\AuthenticationSubscriber class: Drupal\Core\EventSubscriber\AuthenticationSubscriber
tags: tags:
......
name: 'HTTP Basic Authentication'
type: module
description: 'Provides the HTTP Basic authentication provider'
package: Web services
version: VERSION
core: 8.x
<?php
/**
* @file
* Provides an HTTP Basic authentication provider.
*/
/**
* Implements hook_help().
*/
function basic_auth_help($path, $arg) {
switch ($path) {
case 'admin/help#basic_auth':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The basic auth module implements basic user authentication using the HTTP Basic authentication provider.') . '</p>';
return $output;
}
}
services:
authentication.http_basic:
class: Drupal\basic_auth\Authentication\Provider\HttpBasic
arguments: ['@config.factory']
tags:
- { name: authentication_provider, priority: 100 }
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
/** /**
* @file * @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\Component\Utility\String;
use Drupal\Core\Authentication\AuthenticationProviderInterface; use Drupal\Core\Authentication\AuthenticationProviderInterface;
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
/** /**
* @file * @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\Core\Authentication\Provider\HttpBasic;
use Drupal\simpletest\WebTestBase; use Drupal\simpletest\WebTestBase;
...@@ -21,7 +21,7 @@ class HttpBasicTest extends WebTestBase { ...@@ -21,7 +21,7 @@ class HttpBasicTest extends WebTestBase {
* *
* @var array * @var array
*/ */
public static $modules = array('router_test'); public static $modules = array('basic_auth', 'router_test');
public static function getInfo() { public static function getInfo() {
return array( return array(
......
...@@ -19,7 +19,7 @@ class AuthTest extends RESTTestBase { ...@@ -19,7 +19,7 @@ class AuthTest extends RESTTestBase {
* *
* @var array * @var array
*/ */
public static $modules = array('hal', 'rest', 'entity_test'); public static $modules = array('basic_auth', 'hal', 'rest', 'entity_test');
/** /**
* {@inheritdoc} * {@inheritdoc}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment