security:
    encoders:
        FOS\UserBundle\Model\UserInterface: bcrypt

    role_hierarchy:
        ROLE_ADMIN:       ROLE_ADMIN
        ROLE_BE:          ROLE_BE
        ROLE_SUPER_ADMIN: ROLE_SUPER_ADMIN
        ROLE_ADHERANT:    ROLE_ADHERANT

    providers:
        fos_userbundle:
             id: fos_user.user_provider.username_email

    firewalls:
        main:
            pattern: ^/
            form_login:
                provider: fos_userbundle
                csrf_token_generator: security.csrf.token_manager
                login_path: /login
                check_path: /login_check
                success_handler: redirect.after.login
                # if you are using Symfony < 2.8, use the following config instead:
                # csrf_provider: form.csrf_provider

            logout:
                path: /logout
                target: /login
                #success_handler: redirect.after.logout
            anonymous:    true

    access_control:
        - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/super/, role: ROLE_SUPER_ADMIN }
        - { path: ^/admin/, role: ROLE_ADMIN }
        - { path: ^/be/, role: ROLE_BE }
        - { path: ^/adherant/, role: ROLE_ADHERANT }