
services:

    # ================================================================================
    # SAML
    # ================================================================================

    App\Saml\SamlAuth:
        alias: onelogin_auth

    OneLogin\Saml2\Auth:
        alias: onelogin_auth

    onelogin_auth:
        class: App\Saml\SamlAuth
        arguments: ['@request_stack', '%kimai.saml.connection%']

    App\Saml\User\SamlUserFactory:
        arguments: ['%kimai.saml%']

    kimai.saml_listener:
        class: Hslavich\OneloginSamlBundle\Security\Firewall\SamlListener
        parent: security.authentication.listener.abstract
        abstract: true
        calls:
            - [setOneLoginAuth, ["@onelogin_auth"]]

    App\Saml\Provider\SamlProvider:
        arguments: ['@App\Repository\UserRepository', '', '@App\Saml\SamlTokenFactory', '@App\Saml\User\SamlUserFactory']

    App\Saml\Security\SamlAuthenticationSuccessHandler:
        parent: security.authentication.success_handler
