You are here

interface AuthenticationCollectorInterface in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Authentication/AuthenticationCollectorInterface.php \Drupal\Core\Authentication\AuthenticationCollectorInterface
  2. 10 core/lib/Drupal/Core/Authentication/AuthenticationCollectorInterface.php \Drupal\Core\Authentication\AuthenticationCollectorInterface

Interface for collectors of registered authentication providers.

Hierarchy

Expanded class hierarchy of AuthenticationCollectorInterface

All classes that implement AuthenticationCollectorInterface

File

core/lib/Drupal/Core/Authentication/AuthenticationCollectorInterface.php, line 8

Namespace

Drupal\Core\Authentication
View source
interface AuthenticationCollectorInterface {

  /**
   * Adds a provider to the array of registered providers.
   *
   * @param \Drupal\Core\Authentication\AuthenticationProviderInterface $provider
   *   The provider object.
   * @param string $provider_id
   *   Identifier of the provider.
   * @param int $priority
   *   (optional) The provider's priority.
   * @param bool $global
   *   (optional) TRUE if the provider is to be applied globally on all routes.
   *   Defaults to FALSE.
   */
  public function addProvider(AuthenticationProviderInterface $provider, $provider_id, $priority = 0, $global = FALSE);

  /**
   * Returns whether a provider is considered global.
   *
   * @param string $provider_id
   *   The provider ID.
   *
   * @return bool
   *   TRUE if the provider is global, FALSE otherwise.
   *
   * @see \Drupal\Core\Authentication\AuthenticationCollectorInterface::addProvider
   */
  public function isGlobal($provider_id);

  /**
   * Returns an authentication provider.
   *
   * @param string $provider_id
   *   The provider ID.
   *
   * @return \Drupal\Core\Authentication\AuthenticationProviderInterface|null
   *   The authentication provider which matches the ID.
   */
  public function getProvider($provider_id);

  /**
   * Returns the sorted array of authentication providers.
   *
   * @return \Drupal\Core\Authentication\AuthenticationProviderInterface[]
   *   An array of authentication provider objects.
   */
  public function getSortedProviders();

}

Members

Namesort descending Modifiers Type Description Overrides
AuthenticationCollectorInterface::addProvider public function Adds a provider to the array of registered providers. 1
AuthenticationCollectorInterface::getProvider public function Returns an authentication provider. 1
AuthenticationCollectorInterface::getSortedProviders public function Returns the sorted array of authentication providers. 1
AuthenticationCollectorInterface::isGlobal public function Returns whether a provider is considered global. 1