<?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.first_two_factor_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 /> <!-- Two-factor firewall config -->
			<argument type="service" id="scheb_two_factor.provider_registry" />
			<argument type="service" id="scheb_two_factor.backup_code_manager" on-invalid="null" />
			<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">
			<argument type="service" id="security.token_storage"/>
			<argument type="service" id="security.authentication.manager"/>
			<argument /> <!-- Two-factor firewall config -->
			<argument /> <!-- Success handler -->
			<argument /> <!-- Failure handler -->
			<argument /> <!-- Authentication required handler -->
			<argument /> <!-- CSRF token manager -->
			<argument type="service" id="scheb_two_factor.trusted_device_manager" on-invalid="null" />
			<argument type="service" id="event_dispatcher" />
			<argument type="service" id="scheb_two_factor.token_factory" />
			<argument type="service" id="logger" on-invalid="null" />
			<tag name="monolog.logger" channel="security" />
		</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 -->
			<!-- This tag must be added when the child definition is created -->
			<!-- <tag name="kernel.event_subscriber" /> -->
		</service>

		<service id="scheb_two_factor.security.form_listener" class="Scheb\TwoFactorBundle\Security\TwoFactor\Event\TwoFactorFormListener" abstract="true">
			<argument /> <!-- Two-factor firewall config -->
			<argument type="service" id="security.token_storage"/>
			<argument type="service" id="event_dispatcher"/>
		</service>

		<service id="scheb_two_factor.security.authentication_success_event_suppressor" class="Scheb\TwoFactorBundle\Security\TwoFactor\Event\AuthenticationSuccessEventSuppressor">
			<tag name="kernel.event_subscriber" />
		</service>

		<service id="scheb_two_factor.security.kernel_exception_listener" class="Scheb\TwoFactorBundle\Security\Http\Firewall\ExceptionListener" abstract="true">
			<argument type="string" /> <!-- Firewall name -->
			<argument type="service" id="security.token_storage"/>
			<argument /> <!-- Authentication required handler -->
			<argument type="service" id="event_dispatcher" />
			<!-- This tag must be added when the child definition is created -->
			<!-- <tag name="kernel.event_subscriber" /> -->
		</service>

		<service id="scheb_two_factor.security.access_listener" class="Scheb\TwoFactorBundle\Security\Http\Firewall\TwoFactorAccessListener" abstract="true">
			<argument /> <!-- Two-factor firewall config -->
			<argument type="service" id="security.token_storage"/>
			<argument type="service" id="scheb_two_factor.security.access.access_decider"/>
		</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.csrf_token_manager" alias="security.csrf.token_manager" />

		<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 -->
			<argument type="string" /> <!-- Firewall name -->
			<argument type="service" id="security.http_utils" />
			<argument type="service" id="scheb_two_factor.security.request_data_reader" />
		</service>

		<service id="scheb_two_factor.security.request_data_reader" class="Scheb\TwoFactorBundle\Security\Http\Utils\RequestDataReader" />
	</services>
</container>
