File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111
1212namespace FOS \UserBundle \Controller ;
1313
14- use Symfony \Bundle \FrameworkBundle \Controller \Controller ;
14+ use Symfony \Bundle \FrameworkBundle \Controller \AbstractController ;
1515use Symfony \Component \HttpFoundation \Request ;
1616use Symfony \Component \HttpFoundation \Response ;
1717use Symfony \Component \HttpFoundation \Session \Session ;
1818use Symfony \Component \Security \Core \Exception \AuthenticationException ;
1919use Symfony \Component \Security \Core \Security ;
20+ use Symfony \Component \Security \Csrf \CsrfTokenManagerInterface ;
2021
21- class SecurityController extends Controller
22+ class SecurityController extends AbstractController
2223{
24+ private $ tokenManager ;
25+
26+ public function __construct (CsrfTokenManagerInterface $ tokenManager = null )
27+ {
28+ $ this ->tokenManager = $ tokenManager ;
29+ }
30+
31+
2332 /**
2433 * @param Request $request
2534 *
Original file line number Diff line number Diff line change 55 xsi : schemaLocation =" http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd" >
66
77 <route id =" fos_user_security_login" path =" /login" methods =" GET POST" >
8- <default key =" _controller" >FOSUserBundle:Security :login</default >
8+ <default key =" _controller" >fos_user.security.controller :login</default >
99 </route >
1010
1111 <route id =" fos_user_security_check" path =" /login_check" methods =" POST" >
12- <default key =" _controller" >FOSUserBundle:Security :check</default >
12+ <default key =" _controller" >fos_user.security.controller :check</default >
1313 </route >
1414
1515 <route id =" fos_user_security_logout" path =" /logout" methods =" GET POST" >
16- <default key =" _controller" >FOSUserBundle:Security :logout</default >
16+ <default key =" _controller" >fos_user.security.controller :logout</default >
1717 </route >
1818
1919</routes >
Original file line number Diff line number Diff line change 3030 <service id =" fos_user.user_provider.username_email" class =" FOS\UserBundle\Security\EmailUserProvider" public =" false" >
3131 <argument type =" service" id =" fos_user.user_manager" />
3232 </service >
33+
34+ <service id =" fos_user.security.controller" class =" FOS\UserBundle\Controller\SecurityController" public =" true" >
35+ <argument type =" service" id =" security.csrf.token_manager" on-invalid =" null" />
36+ </service >
3337 </services >
3438
3539</container >
You can’t perform that action at this time.
0 commit comments