1 | <?php |
||
33 | abstract class AbstractAuthenticator extends AbstractGuardAuthenticator |
||
34 | { |
||
35 | protected $router; |
||
36 | protected $session; |
||
37 | protected $encoders; |
||
38 | protected $firewalls; |
||
39 | |||
40 | /** |
||
41 | * Dependency Injection constructor. |
||
42 | * |
||
43 | * @param RouterInterface $router |
||
44 | * @param SessionInterface $session |
||
45 | * @param EncoderFactoryInterface $encoders |
||
46 | * @param FirewallMap $firewalls |
||
47 | */ |
||
48 | 13 | public function __construct( |
|
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | 4 | public function start(Request $request, AuthenticationException $authException = null) |
|
82 | |||
83 | /** |
||
84 | * {@inheritdoc} |
||
85 | */ |
||
86 | 2 | public function getCredentials(Request $request) |
|
97 | |||
98 | /** |
||
99 | * {@inheritdoc} |
||
100 | */ |
||
101 | 2 | public function getUser($credentials, UserProviderInterface $userProvider) |
|
110 | |||
111 | /** |
||
112 | * {@inheritdoc} |
||
113 | */ |
||
114 | 2 | public function checkCredentials($credentials, UserInterface $user) |
|
124 | |||
125 | /** |
||
126 | * {@inheritdoc} |
||
127 | */ |
||
128 | 2 | public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey) |
|
141 | |||
142 | /** |
||
143 | * {@inheritdoc} |
||
144 | */ |
||
145 | 2 | public function onAuthenticationFailure(Request $request, AuthenticationException $exception) |
|
151 | |||
152 | /** |
||
153 | * {@inheritdoc} |
||
154 | */ |
||
155 | 1 | public function supportsRememberMe() |
|
159 | |||
160 | /** |
||
161 | * Returns URL to login page of the specified firewall. |
||
162 | * |
||
163 | * @param RouterInterface $router |
||
164 | * @param string $firewall |
||
165 | * |
||
166 | * @return string |
||
167 | */ |
||
168 | abstract protected function getLoginUrl(RouterInterface $router, string $firewall): string; |
||
169 | |||
170 | /** |
||
171 | * Returns URL to default page of the specified firewall. |
||
172 | * |
||
173 | * @param RouterInterface $router |
||
174 | * @param string $firewall |
||
175 | * |
||
176 | * @return string |
||
177 | */ |
||
178 | abstract protected function getDefaultUrl(RouterInterface $router, string $firewall): string; |
||
179 | } |
||
180 |