class Auth

Same name in other branches
  1. 9 core/modules/locale/tests/modules/early_translation_test/src/Auth.php \Drupal\early_translation_test\Auth
  2. 8.9.x core/modules/locale/tests/modules/early_translation_test/src/Auth.php \Drupal\early_translation_test\Auth
  3. 11.x 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 \Drupal\Core\Authentication\AuthenticationProviderInterface

Expanded class hierarchy of Auth

6 string references to 'Auth'
CollectRoutesTest::setUp in core/modules/rest/tests/src/Unit/CollectRoutesTest.php
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
RestExport::buildOptionsForm in core/modules/rest/src/Plugin/views/display/RestExport.php
Provide a form to edit options for this plugin.
RestExport::collectRoutes in core/modules/rest/src/Plugin/views/display/RestExport.php
Adds the route entry of a view to the collection.
RestExport::optionsSummary in core/modules/rest/src/Plugin/views/display/RestExport.php
Provides the default summary for options in the views UI.

... See full list

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_test
View 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

Title Sort descending Modifiers Object type Summary
Auth::$userStorage protected property The user storage.
Auth::applies public function
Auth::authenticate public function
Auth::__construct public function Constructs an authentication provider object.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.