pimcore:
    security:
        # the encoder factory as defined in services.yml
        encoder_factories:
            Pimcore\Model\DataObject\DCuser: dcshop.security.password_encoder_factory

security:
    providers:
        # we use a custom user provider which loads users from the User class
        # the user provider is defined as service in services.yml
        dcshop_provider:
            id: dcshop.security.user_provider

    firewalls:
        dcshop_userfw:
             # for dev env
            pattern:   ^/
            anonymous: ~
            provider: dcshop_provider
            form_login:
                login_path: 'login'
                check_path: 'login'
            logout:
                path:   'logout'
                target: 'dc-home'

                # optional: to keep logins of other firewalls (like admin)
                invalidate_session: false
            logout_on_user_change: true

    # ROLE_ADMIN inherits ROLE_USER (is allowed everything a user is allowed)
    role_hierarchy:
        ROLE_ADMIN: [ROLE_USER]
