class Auth in Drupal 8
Same name and namespace in other branches
- 9 core/modules/locale/tests/modules/early_translation_test/src/Auth.php \Drupal\early_translation_test\Auth
Test authentication provider.
Hierarchy
- class \Drupal\early_translation_test\Auth implements AuthenticationProviderInterface
Expanded class hierarchy of Auth
1 string reference to 'Auth'
- early_translation_test.services.yml in core/
modules/ locale/ tests/ modules/ early_translation_test/ early_translation_test.services.yml - core/modules/locale/tests/modules/early_translation_test/early_translation_test.services.yml
1 service uses Auth
- early_translation_test.authentication.early_translation_test in core/
modules/ locale/ tests/ modules/ early_translation_test/ early_translation_test.services.yml - Drupal\early_translation_test\Auth
File
- core/
modules/ locale/ tests/ modules/ early_translation_test/ src/ Auth.php, line 12
Namespace
Drupal\early_translation_testView source
class Auth implements AuthenticationProviderInterface {
/**
* The user storage.
*
* @var \Drupal\user\UserStorageInterface
*/
protected $userStorage;
/**
* Constructs an authentication provider object.
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager.
*/
public function __construct(EntityTypeManagerInterface $entity_type_manager) {
// Authentication providers are called early during in the bootstrap.
// Getting the user storage used to result in a circular reference since
// translation involves a call to \Drupal\locale\LocaleLookup that tries to
// get the user roles.
// @see https://www.drupal.org/node/2241461
$this->userStorage = $entity_type_manager
->getStorage('user');
}
/**
* {@inheritdoc}
*/
public function applies(Request $request) {
return FALSE;
}
/**
* {@inheritdoc}
*/
public function authenticate(Request $request) {
return NULL;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Auth:: |
protected | property | The user storage. | |
Auth:: |
public | function |
Checks whether suitable authentication credentials are on the request. Overrides AuthenticationProviderInterface:: |
|
Auth:: |
public | function |
Authenticates the user. Overrides AuthenticationProviderInterface:: |
|
Auth:: |
public | function | Constructs an authentication provider object. |