3 namespace Drupal\Core\Authentication;
6 * Interface for collectors of registered authentication providers.
8 interface AuthenticationCollectorInterface {
11 * Adds a provider to the array of registered providers.
13 * @param \Drupal\Core\Authentication\AuthenticationProviderInterface $provider
14 * The provider object.
15 * @param string $provider_id
16 * Identifier of the provider.
17 * @param int $priority
18 * (optional) The provider's priority.
20 * (optional) TRUE if the provider is to be applied globally on all routes.
23 public function addProvider(AuthenticationProviderInterface $provider, $provider_id, $priority = 0, $global = FALSE);
26 * Returns whether a provider is considered global.
28 * @param string $provider_id
32 * TRUE if the provider is global, FALSE otherwise.
34 * @see \Drupal\Core\Authentication\AuthenticationCollectorInterface::addProvider
36 public function isGlobal($provider_id);
39 * Returns an authentication provider.
41 * @param string $provider_id
44 * @return \Drupal\Core\Authentication\AuthenticationProviderInterface|null
45 * The authentication provider which matches the ID.
47 public function getProvider($provider_id);
50 * Returns the sorted array of authentication providers.
52 * @return \Drupal\Core\Authentication\AuthenticationProviderInterface[]
53 * An array of authentication provider objects.
55 public function getSortedProviders();