# To get started with security, check out the documentation:
# http://symfony.com/doc/current/book/security.html
security:

    # http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
    providers:
        fos_userbundle:
            id: fos_user.user_provider.username

    firewalls:
        # disables authentication for assets and the profiler
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        fos_user:
            form_login:
                provider: fos_userbundle
                csrf_token_generator: security.csrf.token_manager
            logout:       true
            anonymous:    true
    encoders:
        FOS\UserBundle\Model\UserInterface: bcrypt

    access_control:
        - { path: ^/$, role: IS_AUTHENTICATED_FULLY, method: POST }
        - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
# To get started with security, check out the documentation:
# http://symfony.com/doc/current/book/security.html
security:

    # http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
    providers:
        fos_userbundle:
            id: fos_user.user_provider.username_email

    firewalls:
        # disables authentication for assets and the profiler
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        fos_user:
            form_login:
                provider: fos_userbundle
                csrf_token_generator: security.csrf.token_manager
            logout:       true
            anonymous:    true
    encoders:
        FOS\UserBundle\Model\UserInterface: bcrypt

    access_control:
        - { path: ^/$, role: IS_AUTHENTICATED_FULLY, method: POST }
        - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
Fix login avec username OU email
Fix login avec username OU email
