Symfony\Component\Security\Http\Firewall\AbstractAuthenticationListener::requiresAuthentication PHP Method

requiresAuthentication() protected method

The default implementation only processed requests to a specific path, but a subclass could change this to only authenticate requests where a certain parameters is present.
protected requiresAuthentication ( Request $request ) : boolean
$request Symfony\Component\HttpFoundation\Request
return boolean
    protected function requiresAuthentication(Request $request)
    {
        return $this->httpUtils->checkRequestPath($request, $this->options['check_path']);
    }

Usage Example

 /**
  * {@inheritdoc}
  */
 protected function requiresAuthentication(Request $request)
 {
     if ($this->options['post_only'] && !$request->isMethod('POST')) {
         return false;
     }
     return parent::requiresAuthentication($request);
 }
All Usage Examples Of Symfony\Component\Security\Http\Firewall\AbstractAuthenticationListener::requiresAuthentication