class TestAuthenticationProvider in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Authentication/AuthenticationCollectorTest.php \Drupal\Tests\Core\Authentication\TestAuthenticationProvider
A simple provider for unit testing AuthenticationCollector.
Hierarchy
- class \Drupal\Tests\Core\Authentication\TestAuthenticationProvider implements AuthenticationProviderInterface
Expanded class hierarchy of TestAuthenticationProvider
File
- core/
tests/ Drupal/ Tests/ Core/ Authentication/ AuthenticationCollectorTest.php, line 65 - Contains \Drupal\Tests\Core\Authentication\AuthenticationCollectorTest.
Namespace
Drupal\Tests\Core\AuthenticationView source
class TestAuthenticationProvider implements AuthenticationProviderInterface {
/**
* The provider id.
*
* @var string
*/
public $providerId;
/**
* Constructor.
*/
public function __construct($provider_id) {
$this->providerId = $provider_id;
}
/**
* {@inheritdoc}
*/
public function applies(Request $request) {
return TRUE;
}
/**
* {@inheritdoc}
*/
public function authenticate(Request $request) {
return NULL;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TestAuthenticationProvider:: |
public | property | The provider id. | |
TestAuthenticationProvider:: |
public | function |
Checks whether suitable authentication credentials are on the request. Overrides AuthenticationProviderInterface:: |
|
TestAuthenticationProvider:: |
public | function |
Authenticates the user. Overrides AuthenticationProviderInterface:: |
|
TestAuthenticationProvider:: |
public | function | Constructor. |