<?xml version="1.0" encoding="UTF-8"?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <parameters>
        <parameter key="fos_user.security.interactive_login_listener.class">FOS\UserBundle\EventListener\LastLoginListener</parameter>
        <parameter key="fos_user.security.login_manager.class">FOS\UserBundle\Security\LoginManager</parameter>
    </parameters>

    <services>
        <service id="fos_user.security.interactive_login_listener" class="%fos_user.security.interactive_login_listener.class%">
            <tag name="kernel.event_subscriber" />
            <argument type="service" id="fos_user.user_manager" />
        </service>

        <service id="fos_user.security.login_manager" class="%fos_user.security.login_manager.class%">
            <argument type="service" id="security.token_storage" />
            <argument type="service" id="security.user_checker" />
            <argument type="service" id="security.authentication.session_strategy" />
            <argument type="service" id="request_stack" />
            <argument>null</argument> <!-- remember_me service -->
        </service>

        <service id="FOS\UserBundle\Security\LoginManagerInterface" alias="fos_user.security.login_manager" public="false" />

        <service id="fos_user.user_provider.username" class="FOS\UserBundle\Security\UserProvider" public="false">
            <argument type="service" id="fos_user.user_manager" />
        </service>

        <service id="fos_user.user_provider.username_email" class="FOS\UserBundle\Security\EmailUserProvider" public="false">
            <argument type="service" id="fos_user.user_manager" />
        </service>

        <service id="fos_user.user_provider.email" class="FOS\UserBundle\Security\EmailProvider" public="false">
            <argument type="service" id="fos_user.user_manager" />
        </service>

        <service id="fos_user.security.controller" class="FOS\UserBundle\Controller\SecurityController" public="true">
            <argument type="service" id="security.csrf.token_manager" on-invalid="null" />
            <call method="setContainer">
                <argument type="service" id="service_container" />
            </call>
        </service>

        <service id="FOS\UserBundle\Controller\SecurityController" alias="fos_user.security.controller" public="true" />

        <service id="fos_user.user_checker" class="FOS\UserBundle\Security\UserChecker" public="false" />
    </services>

</container>
