File tree Expand file tree Collapse file tree 3 files changed +20
-16
lines changed
Expand file tree Collapse file tree 3 files changed +20
-16
lines changed Original file line number Diff line number Diff line change 1313
1414use Symfony \Component \HttpFoundation \Request ;
1515use Symfony \Component \HttpFoundation \Response ;
16- use Symfony \Component \Security \Http \Firewall \AbstractListener ;
16+ use Symfony \Component \Security \Http \Firewall \FirewallListenerInterface ;
1717
1818/**
1919 * @author Wouter de Jong <wouter@wouterj.nl>
@@ -26,7 +26,7 @@ interface AuthenticatorManagerInterface
2626 /**
2727 * Called to see if authentication should be attempted on this request.
2828 *
29- * @see AbstractListener ::supports()
29+ * @see FirewallListenerInterface ::supports()
3030 */
3131 public function supports (Request $ request ): ?bool ;
3232
Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \Security \Http \Firewall ;
1313
14- use Symfony \Component \HttpFoundation \Request ;
1514use Symfony \Component \HttpKernel \Event \RequestEvent ;
1615
1716/**
@@ -28,18 +27,6 @@ final public function __invoke(RequestEvent $event)
2827 }
2928 }
3029
31- /**
32- * Tells whether the authenticate() method should be called or not depending on the incoming request.
33- *
34- * Returning null means authenticate() can be called lazily when accessing the token storage.
35- */
36- abstract public function supports (Request $ request ): ?bool ;
37-
38- /**
39- * Does whatever is required to authenticate the request, typically calling $event->setResponse() internally.
40- */
41- abstract public function authenticate (RequestEvent $ event );
42-
4330 public static function getPriority (): int
4431 {
4532 return 0 ; // Default
Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \Security \Http \Firewall ;
1313
14+ use Symfony \Component \HttpFoundation \Request ;
15+ use Symfony \Component \HttpKernel \Event \RequestEvent ;
16+
1417/**
15- * Can be implemented by firewall listeners to define their priority in execution .
18+ * Can be implemented by firewall listeners.
1619 *
1720 * @author Christian Scheb <me@christianscheb.de>
21+ * @author Nicolas Grekas <p@tchwork.com>
22+ * @author Robin Chalas <robin.chalas@gmail.com>
1823 */
1924interface FirewallListenerInterface
2025{
26+ /**
27+ * Tells whether the authenticate() method should be called or not depending on the incoming request.
28+ *
29+ * Returning null means authenticate() can be called lazily when accessing the token storage.
30+ */
31+ public function supports (Request $ request ): ?bool ;
32+
33+ /**
34+ * Does whatever is required to authenticate the request, typically calling $event->setResponse() internally.
35+ */
36+ public function authenticate (RequestEvent $ event );
37+
2138 /**
2239 * Defines the priority of the listener.
2340 * The higher the number, the earlier a listener is executed.
You can’t perform that action at this time.
0 commit comments