W3cubDocs

/Drupal 8

public function AuthenticationSubscriber::__construct

public AuthenticationSubscriber::__construct(AuthenticationProviderInterface $authentication_provider, AccountProxyInterface $account_proxy)

Constructs an authentication subscriber.

Parameters

\Drupal\Core\Authentication\AuthenticationProviderInterface $authentication_provider: An authentication provider.

\Drupal\Core\Session\AccountProxyInterface $account_proxy: Account proxy.

File

core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php, line 59

Class

AuthenticationSubscriber
Authentication subscriber.

Namespace

Drupal\Core\EventSubscriber

Code

public function __construct(AuthenticationProviderInterface $authentication_provider, AccountProxyInterface $account_proxy) {
  $this->authenticationProvider = $authentication_provider;
  $this->filter = ($authentication_provider instanceof AuthenticationProviderFilterInterface) ? $authentication_provider : NULL;
  $this->challengeProvider = ($authentication_provider instanceof AuthenticationProviderChallengeInterface) ? $authentication_provider : NULL;
  $this->accountProxy = $account_proxy;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!EventSubscriber!AuthenticationSubscriber.php/function/AuthenticationSubscriber::__construct/8.1.x