You are here

public function AuthenticationProviderFilterInterface::appliesToRoutedRequest in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Authentication/AuthenticationProviderFilterInterface.php \Drupal\Core\Authentication\AuthenticationProviderFilterInterface::appliesToRoutedRequest()

Checks whether the authentication method is allowed on a given route.

While authentication itself is run before routing, this method is called after routing, hence RouteMatch is available and can be used to inspect route options.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The request.

bool $authenticated: Whether or not the request is authenticated.

Return value

bool TRUE if an authentication method is allowed on the request, otherwise FALSE.

1 method overrides AuthenticationProviderFilterInterface::appliesToRoutedRequest()
AuthenticationManager::appliesToRoutedRequest in core/lib/Drupal/Core/Authentication/AuthenticationManager.php
Checks whether the authentication method is allowed on a given route.

File

core/lib/Drupal/Core/Authentication/AuthenticationProviderFilterInterface.php, line 33

Class

AuthenticationProviderFilterInterface
Restrict authentication methods to a subset of the site.

Namespace

Drupal\Core\Authentication

Code

public function appliesToRoutedRequest(Request $request, $authenticated);