imports:
    - { resource: ./../config/default.yml }

services:
    csrf_form_login.form.type:
        class: Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBundle\Form\UserLoginFormType
        scope: request
        arguments:
            - @request
        tags:
            - { name: form.type, alias: user_login }

security:
    encoders:
        Symfony\Component\Security\Core\User\User: plaintext

    providers:
        in_memory:
            memory:
                users:
                    johannes: { password: test, roles: [ROLE_USER] }

    firewalls:
        # This firewall doesn't make sense in combination with the rest of the
        # configuration file, but it's here for testing purposes (do not use
        # this file in a real world scenario though)
        login_form:
            pattern: ^/login$
            security: false

        default:
            form_login:
                check_path: /login_check
                default_target_path: /profile
                target_path_parameter: "user_login[_target_path]"
                username_parameter: "user_login[username]"
                password_parameter: "user_login[password]"
                csrf_parameter: "user_login[_token]"
                csrf_provider: form.csrf_provider
            anonymous: ~
            logout:
                path: /logout_path
                target: /
                csrf_provider: form.csrf_provider

    access_control:
        - { path: .*, roles: IS_AUTHENTICATED_FULLY }
