symfony - symfony2 override the service security.authentication.manager -
i add code inside function authenticate() of symfony\component\security\core\authentication\authenticationprovidermanager.
i tried create child bundle of security bundle. , redefined service security.authentication.manager in bundle that
<!-- authentication related services --> <service id="security.authentication.manager" class="%security.authentication.manager.class%" public="false"> <argument type="collection" /> </service> but when relad page, framework throw exception: invalidargumentexception: must @ least add 1 authentication provider.
i suppose it's becaue dependecies created inside parent bundle configuation.
what must work without redefine whole security bundle ? thank you.
i suppose better created own handlers.
- you need create service
- register service container.
- simply set handlers in
security.yml:
form_login: success_handler: success_login_handler failure_handler: failure_login_handler logout: success_handler: success_logout_handler
Comments
Post a Comment