TestAuth.php in Drupal 9
File
core/modules/rest/tests/modules/rest_test/src/Authentication/Provider/TestAuth.php
View source
<?php
namespace Drupal\rest_test\Authentication\Provider;
use Drupal\Core\Authentication\AuthenticationProviderInterface;
use Symfony\Component\HttpFoundation\Request;
class TestAuth implements AuthenticationProviderInterface {
public function applies(Request $request) {
return $request->headers
->has('REST-test-auth');
}
public function authenticate(Request $request) {
return NULL;
}
}
Classes
Name |
Description |
TestAuth |
Authentication provider for testing purposes. |