TestAuth.php
Same filename in other branches
Namespace
Drupal\rest_test\Authentication\ProviderFile
-
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;
/**
* Authentication provider for testing purposes.
*/
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;
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
TestAuth | Authentication provider for testing purposes. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.