<?xml version="1.0" encoding="UTF-8"?>
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
	<services>
		<service id="scheb_two_factor.security.authentication.provider.decorator" class="Scheb\TwoFactorBundle\Security\Authentication\Provider\AuthenticationProviderDecorator" abstract="true">
			<argument /> <!-- Decorated authentication provider -->
			<argument type="service" id="scheb_two_factor.authenticated_token_handler" />
			<argument type="service" id="scheb_two_factor.authentication_context_factory" />
			<argument type="service" id="security.firewall.map" />
			<argument type="service" id="request_stack" />
		</service>

		<service id="scheb_two_factor.security.authentication.provider" class="Scheb\TwoFactorBundle\Security\Authentication\Provider\TwoFactorAuthenticationProvider" abstract="true">
			<argument type="string" /> <!-- Firewall name -->
			<argument type="collection" /> <!-- Options -->
			<argument type="service" id="scheb_two_factor.provider_registry" />
			<argument type="service" id="scheb_two_factor.backup_code_manager" />
			<argument type="service" id="scheb_two_factor.provider_preparation_recorder" />
		</service>

		<service id="scheb_two_factor.security.authentication.trust_resolver" class="Scheb\TwoFactorBundle\Security\Authentication\AuthenticationTrustResolver" decorates="security.authentication.trust_resolver">
			<argument type="service" id="scheb_two_factor.security.authentication.trust_resolver.inner" />
		</service>

		<service id="scheb_two_factor.security.access.authenticated_voter" class="Scheb\TwoFactorBundle\Security\Authorization\Voter\TwoFactorInProgressVoter">
			<tag name="security.voter" priority="249" />
		</service>

		<service id="scheb_two_factor.security.access.access_decider" class="Scheb\TwoFactorBundle\Security\Authorization\TwoFactorAccessDecider">
			<argument type="service" id="security.access_map" />
			<argument type="service" id="security.access.decision_manager" />
			<argument type="service" id="security.http_utils" />
			<argument type="service" id="security.logout_url_generator" />
		</service>

		<service id="scheb_two_factor.security.authentication.listener" class="Scheb\TwoFactorBundle\Security\Http\Firewall\TwoFactorListener" abstract="true">
			<tag name="monolog.logger" channel="security" />
			<argument type="service" id="security.token_storage"/>
			<argument type="service" id="security.authentication.manager"/>
			<argument type="service" id="security.http_utils" />
			<argument type="string" /> <!-- Firewall name -->
			<argument /> <!-- Success handler -->
			<argument /> <!-- Failure handler -->
			<argument /> <!-- Authentication required handler -->
			<argument /> <!-- CSRF token validator -->
			<argument type="collection" /> <!-- Options -->
			<argument type="service" id="scheb_two_factor.trusted_device_manager" />
			<argument type="service" id="scheb_two_factor.security.access.access_decider" />
			<argument type="service" id="event_dispatcher" />
			<argument type="service" id="scheb_two_factor.token_factory" />
			<argument type="service" id="logger" on-invalid="null" />
		</service>

		<!-- For Symfony < 4.3 -->
		<service id="scheb_two_factor.security.authentication.legacy_listener" class="Scheb\TwoFactorBundle\Security\Http\Firewall\LegacyTwoFactorListener" abstract="true">
			<argument /> <!-- Decorated listener -->
		</service>

		<service id="scheb_two_factor.security.rememberme_services_decorator" class="\Scheb\TwoFactorBundle\Security\Authentication\RememberMe\RememberMeServicesDecorator" abstract="true">
			<argument /> <!-- Decorated remember-me services instance -->
		</service>

		<service id="scheb_two_factor.security.provider_preparation_listener" class="Scheb\TwoFactorBundle\Security\TwoFactor\Provider\TwoFactorProviderPreparationListener" abstract="true">
			<argument type="service" id="scheb_two_factor.provider_registry" />
			<argument type="service" id="scheb_two_factor.provider_preparation_recorder" />
			<argument type="service" id="logger" on-invalid="null" />
			<argument type="string" /> <!-- Firewall name -->
			<argument /> <!-- prepareOnLogin -->
			<argument /> <!-- prepareOnAccessDenied -->
			<!-- These events must be added when the child definition is created -->
			<!-- <tag name="kernel.event_listener" event="security.authentication.success" method="onLogin" priority="PHP_INT_MAX" />-->
			<!-- <tag name="kernel.event_listener" event="scheb_two_factor.authentication.require" method="onAccessDenied" />-->
			<!-- <tag name="kernel.event_listener" event="scheb_two_factor.authentication.form" method="onTwoFactorForm" />-->
			<!-- <tag name="kernel.event_listener" event="kernel.finish_request" method="onKernelFinishRequest" />-->
		</service>

		<service id="scheb_two_factor.security.authentication_success_event_suppressor" class="Scheb\TwoFactorBundle\Security\TwoFactor\Event\AuthenticationSuccessEventSuppressor" abstract="true">
			<argument type="string" /> <!-- Firewall name -->
			<!-- These events must be added when the child definition is created -->
			<!-- <tag name="kernel.event_listener" event="security.authentication.success" method="onLogin" priority="PHP_INT_MAX-1" />-->
		</service>

		<service id="scheb_two_factor.security.authentication.success_handler" class="Scheb\TwoFactorBundle\Security\Http\Authentication\DefaultAuthenticationSuccessHandler" abstract="true">
			<argument type="service" id="security.http_utils" />
			<argument type="string" /> <!-- Firewall name -->
			<argument type="collection" /> <!-- Options -->
		</service>

		<service id="scheb_two_factor.security.authentication.failure_handler" class="Scheb\TwoFactorBundle\Security\Http\Authentication\DefaultAuthenticationFailureHandler" abstract="true">
			<argument type="service" id="security.http_utils" />
			<argument type="collection" /> <!-- Options -->
		</service>

		<service id="scheb_two_factor.security.authentication.authentication_required_handler" class="Scheb\TwoFactorBundle\Security\Http\Authentication\DefaultAuthenticationRequiredHandler" abstract="true">
			<argument type="service" id="security.http_utils" />
			<argument type="string" /> <!-- Firewall name -->
			<argument type="collection" /> <!-- Options -->
		</service>

		<service id="scheb_two_factor.security.authentication.csrf_token_validator" class="Scheb\TwoFactorBundle\Security\TwoFactor\Csrf\CsrfTokenValidator" abstract="true">
			<argument /> <!-- CSRF token manager -->
			<argument type="collection" /> <!-- Options -->
		</service>

		<service id="scheb_two_factor.null_csrf_token_manager" class="Scheb\TwoFactorBundle\Security\TwoFactor\Csrf\NullCsrfTokenManager" />

		<service id="scheb_two_factor.security.firewall_config" class="Scheb\TwoFactorBundle\Security\TwoFactor\TwoFactorFirewallConfig" abstract="true">
			<argument type="collection" /> <!-- Options -->
		</service>
	</services>
</container>
