services:
    # default configuration for services in *this* file
    _defaults:
        # automatically injects dependencies in your services
        autowire: true
        # automatically registers your services as commands, event subscribers, etc.
        autoconfigure: true
        # this means you cannot fetch services directly from the container via $container->get()
        # if you need to do this, you can override this setting on individual services
        public: false

    # controllers are imported separately to make sure they're public
    # and have a tag that allows actions to type-hint services
    DCshopBundle\Controller\:
        resource: '../../Controller'
        public: true
        tags: ['controller.service_arguments']


# add more services, or override services that need manual wiring
#    DCshopBundle\ExampleClass:
#        arguments:
#            - "@service_id"
#            - "plain_value"
#            - "%parameter%"
    dcshop.security.user_provider:
        class: Pimcore\Security\User\ObjectUserProvider
        arguments:
            - 'DCshopBundle\Model\DataObject\DCuser'
            - 'email'


        # The encoder factory is responsible for verifying the password hash for a given user. As we need some special
        # handling to be able to work with the password field, we use the UserAwareEncoderFactory to buiild a dedicated
        # encoder per user. This service is configured in pimcore.security.encoder_factories to handle our user model.
    dcshop.security.password_encoder_factory:
        class: Pimcore\Security\Encoder\Factory\UserAwareEncoderFactory
        arguments:
            - Pimcore\Security\Encoder\PasswordFieldEncoder
            - ['password']
