security:
    access_decision_manager:
        strategy: unanimous
        allow_if_all_abstain: true

    encoders:
        Sulu\Bundle\SecurityBundle\Entity\User: bcrypt

    providers:
        sulu:
            id: sulu_security.user_provider

    access_control:
        - { path: ^/admin/reset, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin/security/reset, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin/login$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin/_wdt, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin/translations, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin/$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin, roles: ROLE_USER }

    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        admin:
            pattern: ^/
            anonymous: true
            lazy: true
            provider: sulu
            entry_point: sulu_security.authentication_entry_point
            json_login:
                check_path: sulu_admin.login_check
                success_handler: sulu_security.authentication_handler
                failure_handler: sulu_security.authentication_handler
            logout:
                path: sulu_admin.logout
                success_handler: sulu_security.logout_success_handler

sulu_security:
    checker:
        enabled: true
