public function TestAuth::applies in Drupal 8
Same name and namespace in other branches
- 9 core/modules/rest/tests/modules/rest_test/src/Authentication/Provider/TestAuth.php \Drupal\rest_test\Authentication\Provider\TestAuth::applies()
- 10 core/modules/rest/tests/modules/rest_test/src/Authentication/Provider/TestAuth.php \Drupal\rest_test\Authentication\Provider\TestAuth::applies()
Checks whether suitable authentication credentials are on the request.
Parameters
\Symfony\Component\HttpFoundation\Request $request: The request object.
Return value
bool TRUE if authentication credentials suitable for this provider are on the request, FALSE otherwise.
Overrides AuthenticationProviderInterface::applies
File
- core/
modules/ rest/ tests/ modules/ rest_test/ src/ Authentication/ Provider/ TestAuth.php, line 16
Class
- TestAuth
- Authentication provider for testing purposes.
Namespace
Drupal\rest_test\Authentication\ProviderCode
public function applies(Request $request) {
return $request->headers
->has('REST-test-auth');
}