Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
222
Merge Requests
222
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
83e1359e
Commit
83e1359e
authored
Oct 17, 2013
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2107483
by StephaneQ: Make basic_auth() module and http_basic() auth setting consistent.
parent
6a89adcf
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
15 deletions
+15
-15
core/lib/Drupal/Core/Authentication/AuthenticationProviderInterface.php
...l/Core/Authentication/AuthenticationProviderInterface.php
+1
-1
core/modules/basic_auth/basic_auth.services.yml
core/modules/basic_auth/basic_auth.services.yml
+2
-2
core/modules/basic_auth/lib/Drupal/basic_auth/Authentication/Provider/BasicAuth.php
...b/Drupal/basic_auth/Authentication/Provider/BasicAuth.php
+2
-2
core/modules/basic_auth/lib/Drupal/basic_auth/Tests/Authentication/BasicAuthTest.php
.../Drupal/basic_auth/Tests/Authentication/BasicAuthTest.php
+7
-7
core/modules/rest/config/rest.settings.yml
core/modules/rest/config/rest.settings.yml
+1
-1
core/modules/rest/lib/Drupal/rest/Tests/AuthTest.php
core/modules/rest/lib/Drupal/rest/Tests/AuthTest.php
+1
-1
core/modules/system/tests/modules/router_test_directory/router_test.routing.yml
...sts/modules/router_test_directory/router_test.routing.yml
+1
-1
No files found.
core/lib/Drupal/Core/Authentication/AuthenticationProviderInterface.php
View file @
83e1359e
...
...
@@ -54,7 +54,7 @@ public function cleanup(Request $request);
* Handles an exception.
*
* In case exception has happened we allow authentication providers react.
* Used in \Drupal\Core\Authentication\Provider\
HttpBasic
to set up headers to
* Used in \Drupal\Core\Authentication\Provider\
BasicAuth
to set up headers to
* prompt login.
*
* @param \Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event
...
...
core/modules/basic_auth/basic_auth.services.yml
View file @
83e1359e
services
:
authentication.
http_basic
:
class
:
Drupal\basic_auth\Authentication\Provider\
HttpBasic
authentication.
basic_auth
:
class
:
Drupal\basic_auth\Authentication\Provider\
BasicAuth
arguments
:
[
'
@config.factory'
]
tags
:
-
{
name
:
authentication_provider
,
priority
:
100
}
core/modules/basic_auth/lib/Drupal/basic_auth/Authentication/Provider/
HttpBasic
.php
→
core/modules/basic_auth/lib/Drupal/basic_auth/Authentication/Provider/
BasicAuth
.php
View file @
83e1359e
...
...
@@ -2,7 +2,7 @@
/**
* @file
* Contains \Drupal\basic_auth\Authentication\Provider\
HttpBasic
.
* Contains \Drupal\basic_auth\Authentication\Provider\
BasicAuth
.
*/
namespace
Drupal\basic_auth\Authentication\Provider
;
...
...
@@ -19,7 +19,7 @@
/**
* HTTP Basic authentication provider.
*/
class
HttpBasic
implements
AuthenticationProviderInterface
{
class
BasicAuth
implements
AuthenticationProviderInterface
{
/**
* The config factory.
...
...
core/modules/basic_auth/lib/Drupal/basic_auth/Tests/Authentication/
HttpBasic
Test.php
→
core/modules/basic_auth/lib/Drupal/basic_auth/Tests/Authentication/
BasicAuth
Test.php
View file @
83e1359e
...
...
@@ -2,19 +2,19 @@
/**
* @file
* Contains \Drupal\basic_auth\Tests\Authentication\
HttpBasic
Test.
* Contains \Drupal\basic_auth\Tests\Authentication\
BasicAuth
Test.
*/
namespace
Drupal\basic_auth\Tests\Authentication
;
use
Drupal\Core\Authentication\Provider\
HttpBasic
;
use
Drupal\Core\Authentication\Provider\
BasicAuth
;
use
Drupal\simpletest\WebTestBase
;
use
Symfony\Component\HttpFoundation\Request
;
/**
* Test for http basic authentication.
*/
class
HttpBasic
Test
extends
WebTestBase
{
class
BasicAuth
Test
extends
WebTestBase
{
/**
* Modules enabled for all tests.
...
...
@@ -25,8 +25,8 @@ class HttpBasicTest extends WebTestBase {
public
static
function
getInfo
()
{
return
array
(
'name'
=>
'
HttpBasic
authentication'
,
'description'
=>
'Tests for
HttpBasic
authentication provider.'
,
'name'
=>
'
BasicAuth
authentication'
,
'description'
=>
'Tests for
BasicAuth
authentication provider.'
,
'group'
=>
'Authentication'
,
);
}
...
...
@@ -34,7 +34,7 @@ public static function getInfo() {
/**
* Test http basic authentication.
*/
public
function
test
HttpBasic
()
{
public
function
test
BasicAuth
()
{
$account
=
$this
->
drupalCreateUser
();
$this
->
basicAuthGet
(
'router_test/test11'
,
$account
->
getUsername
(),
$account
->
pass_raw
);
...
...
@@ -48,7 +48,7 @@ public function testHttpBasic() {
$this
->
curlClose
();
$this
->
drupalGet
(
'router_test/test11'
);
$this
->
assertResponse
(
'401'
,
'Not authenticated on the route that allows only
http_basic
. Prompt to authenticate received.'
);
$this
->
assertResponse
(
'401'
,
'Not authenticated on the route that allows only
basic_auth
. Prompt to authenticate received.'
);
$this
->
drupalGet
(
'admin'
);
$this
->
assertResponse
(
'403'
,
'No authentication prompt for routes not explicitly defining authentication providers.'
);
...
...
core/modules/rest/config/rest.settings.yml
View file @
83e1359e
...
...
@@ -23,4 +23,4 @@ resources:
# entity:node:
# POST:
# supported_auth:
# -
http_basic
# -
basic_auth
core/modules/rest/lib/Drupal/rest/Tests/AuthTest.php
View file @
83e1359e
...
...
@@ -39,7 +39,7 @@ public function testRead() {
$entity_type
=
'entity_test'
;
// Enable a test resource through GET method and basic HTTP authentication.
$this
->
enableService
(
'entity:'
.
$entity_type
,
'GET'
,
NULL
,
array
(
'
http_basic
'
));
$this
->
enableService
(
'entity:'
.
$entity_type
,
'GET'
,
NULL
,
array
(
'
basic_auth
'
));
// Create an entity programmatically.
$entity
=
$this
->
entityCreate
(
$entity_type
);
...
...
core/modules/system/tests/modules/router_test_directory/router_test.routing.yml
View file @
83e1359e
...
...
@@ -66,7 +66,7 @@ router_test.10:
router_test.11
:
path
:
'
/router_test/test11'
options
:
_auth
:
[
'
http_basic
'
]
_auth
:
[
'
basic_auth
'
]
requirements
:
_user_is_logged_in
:
'
TRUE'
defaults
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment