services:
    saml.security.authentication.provider:
        class: LifeStyle\SamlAuthBundle\Security\Authentication\Provider\SamlProvider
        arguments:
            - '' # User Provider
            - '@saml.saml_database_manager'
        public: false
    saml.security.authentication.listener:
        class: LifeStyle\SamlAuthBundle\Security\Firewall\SamlListener
        arguments: ['@security.token_storage', '@security.authentication.manager', '@saml.saml_service', '@jms_serializer', '@saml.saml_config']
        public: false
    saml.saml_user_provider:
        class: LifeStyle\SamlAuthBundle\Security\User\SamlUserProvider
        arguments: ['@saml.saml_config']
    saml.saml_config:
        class: LifeStyle\SamlAuthBundle\Configuration\SamlConfig

    saml.saml_service:
        class: LifeStyle\SamlAuthBundle\Services\SamlService
        arguments: ['@saml.saml_config']

    saml.saml_database_manager:
        class: LifeStyle\SamlAuthBundle\Database\Manager
        arguments: ['@doctrine']

    saml.user_handler:
        class: LifeStyle\SamlAuthBundle\UserHandler
        arguments: ['@=service("saml.saml_database_manager").data().user()', '@security.token_storage']
    saml_request_matcher:
        class: LifeStyle\SamlAuthBundle\Security\Authentication\Matcher\SamlRequestMatcher

    saml_saml_twig_extension:
        class: LifeStyle\SamlAuthBundle\Twig\Extension\SAML
        public: false
        tags:
            - { name: twig.extension }