parameters:
  fos_user.security.interactive_login_listener.class: FOS\UserBundle\EventListener\LastLoginListener
  fos_user.security.login_manager.class: FOS\UserBundle\Security\LoginManager

services:
  fos_user.security.interactive_login_listener:
    class: '%fos_user.security.interactive_login_listener.class%'
    tags:
    - { name: kernel.event_subscriber }
    arguments:
      - '@fos_user.user_manager'
  fos_user.security.login_manager:
    class: '%fos_user.security.login_manager.class%'
    arguments: ['@security.token_storage', '@security.user_checker', '@security.authentication.session_strategy', '@request_stack', null]
  fos_user.user_provider.username:
    class: FOS\UserBundle\Security\UserProvider
    public: false
    arguments: ['@fos_user.user_manager']
  fos_user.user_provider.username_email:
    class: FOS\UserBundle\Security\EmailUserProvider
    public: false
    arguments: ['@fos_user.user_manager']
  security.controller:
    class: vivace\SystemeBundle\Controller\SecurityController
    arguments: ['@?security.csrf.token_manager']
    calls:
    - [setContainer, ['@service_container']]

  fos\userbundle\security\loginmanagerinterface:
    alias: fos_user.security.login_manager
    public: false