interface AuthenticationProviderFilterInterface
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Authentication/AuthenticationProviderFilterInterface.php \Drupal\Core\Authentication\AuthenticationProviderFilterInterface
- 10 core/lib/Drupal/Core/Authentication/AuthenticationProviderFilterInterface.php \Drupal\Core\Authentication\AuthenticationProviderFilterInterface
- 11.x core/lib/Drupal/Core/Authentication/AuthenticationProviderFilterInterface.php \Drupal\Core\Authentication\AuthenticationProviderFilterInterface
Restrict authentication methods to a subset of the site.
Some authentication methods should not be available throughout a whole site. For instance, there are good reasons to restrict insecure methods like HTTP basic authentication or a URL token authentication method to API-only routes.
Hierarchy
- interface \Drupal\Core\Authentication\AuthenticationProviderFilterInterface
Expanded class hierarchy of AuthenticationProviderFilterInterface
All classes that implement AuthenticationProviderFilterInterface
2 files declare their use of AuthenticationProviderFilterInterface
- AuthenticationManagerTest.php in core/
tests/ Drupal/ Tests/ Core/ Authentication/ AuthenticationManagerTest.php - Contains \Drupal\Tests\Core\Authentication\AuthenticationManagerTest.
- AuthenticationSubscriber.php in core/
lib/ Drupal/ Core/ EventSubscriber/ AuthenticationSubscriber.php
File
-
core/
lib/ Drupal/ Core/ Authentication/ AuthenticationProviderFilterInterface.php, line 15
Namespace
Drupal\Core\AuthenticationView source
interface AuthenticationProviderFilterInterface {
/**
* 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.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* The request.
* @param bool $authenticated
* Whether or not the request is authenticated.
*
* @return bool
* TRUE if an authentication method is allowed on the request, otherwise
* FALSE.
*/
public function appliesToRoutedRequest(Request $request, $authenticated);
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
AuthenticationProviderFilterInterface::appliesToRoutedRequest | public | function | Checks whether the authentication method is allowed on a given route. | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.