3 namespace Drupal\Core\Authentication;
5 use Symfony\Component\HttpFoundation\Request;
8 * Restrict authentication methods to a subset of the site.
10 * Some authentication methods should not be available throughout a whole site.
11 * For instance, there are good reasons to restrict insecure methods like HTTP
12 * basic authentication or a URL token authentication method to API-only
15 interface AuthenticationProviderFilterInterface {
18 * Checks whether the authentication method is allowed on a given route.
20 * While authentication itself is run before routing, this method is called
21 * after routing, hence RouteMatch is available and can be used to inspect
24 * @param \Symfony\Component\HttpFoundation\Request $request
26 * @param bool $authenticated
27 * Whether or not the request is authenticated.
30 * TRUE if an authentication method is allowed on the request, otherwise
33 public function appliesToRoutedRequest(Request $request, $authenticated);