class TestAuth in Drupal 10
Same name and namespace in other branches
- 8 core/modules/rest/tests/modules/rest_test/src/Authentication/Provider/TestAuth.php \Drupal\rest_test\Authentication\Provider\TestAuth
- 9 core/modules/rest/tests/modules/rest_test/src/Authentication/Provider/TestAuth.php \Drupal\rest_test\Authentication\Provider\TestAuth
Authentication provider for testing purposes.
Hierarchy
- class \Drupal\rest_test\Authentication\Provider\TestAuth implements AuthenticationProviderInterface
Expanded class hierarchy of TestAuth
1 string reference to 'TestAuth'
- rest_test.services.yml in core/
modules/ rest/ tests/ modules/ rest_test/ rest_test.services.yml - core/modules/rest/tests/modules/rest_test/rest_test.services.yml
1 service uses TestAuth
- rest_test.authentication.test_auth in core/
modules/ rest/ tests/ modules/ rest_test/ rest_test.services.yml - Drupal\rest_test\Authentication\Provider\TestAuth
File
- core/
modules/ rest/ tests/ modules/ rest_test/ src/ Authentication/ Provider/ TestAuth.php, line 11
Namespace
Drupal\rest_test\Authentication\ProviderView source
class TestAuth implements AuthenticationProviderInterface {
/**
* {@inheritdoc}
*/
public function applies(Request $request) {
return $request->headers
->has('REST-test-auth');
}
/**
* {@inheritdoc}
*/
public function authenticate(Request $request) {
return NULL;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TestAuth:: |
public | function |
Checks whether suitable authentication credentials are on the request. Overrides AuthenticationProviderInterface:: |
|
TestAuth:: |
public | function |
Authenticates the user. Overrides AuthenticationProviderInterface:: |