Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions components/security/authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ The listener should then store the authenticated token using
use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Security\Http\Firewall\ListenerInterface;

class SomeAuthenticationListener implements ListenerInterface
class SomeAuthenticationListener
{
/**
* @var TokenStorageInterface
Expand All @@ -38,7 +37,7 @@ The listener should then store the authenticated token using

// ...

public function handle(RequestEvent $event)
public function __invoke(RequestEvent $event)
{
$request = $event->getRequest();

Expand Down
4 changes: 2 additions & 2 deletions components/security/firewall.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ the user::

$requestMatcher = new RequestMatcher('^/secured-area/');

// instances of Symfony\Component\Security\Http\Firewall\ListenerInterface
// array of callables
$listeners = [...];

$exceptionListener = new ExceptionListener(...);
Expand Down Expand Up @@ -108,7 +108,7 @@ Firewall Listeners
When the firewall gets notified of the ``kernel.request`` event, it asks
the firewall map if the request matches one of the secured areas. The first
secured area that matches the request will return a set of corresponding
firewall listeners (which each implement :class:`Symfony\\Component\\Security\\Http\\Firewall\\ListenerInterface`).
firewall listeners (which each is a callable).
These listeners will all be asked to handle the current request. This basically
means: find out if the current request contains any information by which
the user might be authenticated (for instance the Basic HTTP authentication
Expand Down