<?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.trusted_jwt_encoder" class="Scheb\TwoFactorBundle\Security\TwoFactor\Trusted\JwtTokenEncoder">
			<argument>%kernel.secret%</argument>
		</service>

		<service id="scheb_two_factor.trusted_token_encoder" class="Scheb\TwoFactorBundle\Security\TwoFactor\Trusted\TrustedDeviceTokenEncoder">
			<argument type="service" id="scheb_two_factor.trusted_jwt_encoder" />
			<argument>%scheb_two_factor.trusted_device.lifetime%</argument>
		</service>

		<service id="scheb_two_factor.trusted_token_storage" class="Scheb\TwoFactorBundle\Security\TwoFactor\Trusted\TrustedDeviceTokenStorage" lazy="true">
			<argument type="service" id="request_stack" />
			<argument type="service" id="scheb_two_factor.trusted_token_encoder" />
			<argument>%scheb_two_factor.trusted_device.cookie_name%</argument>
		</service>

		<service id="scheb_two_factor.trusted_device_handler" class="Scheb\TwoFactorBundle\Security\TwoFactor\Handler\TrustedDeviceHandler" lazy="true">
			<argument type="service" id="scheb_two_factor.provider_handler" />
			<argument type="service" id="scheb_two_factor.trusted_device_manager" />
			<argument>%scheb_two_factor.trusted_device.extend_lifetime%</argument>
		</service>

		<service id="scheb_two_factor.trusted_cookie_response_listener" class="Scheb\TwoFactorBundle\Security\TwoFactor\Trusted\TrustedCookieResponseListener" lazy="true">
			<argument type="service" id="scheb_two_factor.trusted_token_storage" />
			<argument>%scheb_two_factor.trusted_device.lifetime%</argument>
			<argument>%scheb_two_factor.trusted_device.cookie_name%</argument>
			<argument>%scheb_two_factor.trusted_device.cookie_secure%</argument>
			<argument>%scheb_two_factor.trusted_device.cookie_same_site%</argument>
			<argument>%scheb_two_factor.trusted_device.cookie_path%</argument>
			<argument>%scheb_two_factor.trusted_device.cookie_domain%</argument>
			<tag name="kernel.event_subscriber" />
		</service>

		<service id="scheb_two_factor.security.listener.trusted_device" class="\Scheb\TwoFactorBundle\Security\Http\EventListener\TrustedDeviceListener">
			<argument type="service" id="scheb_two_factor.trusted_device_manager" />
			<tag name="kernel.event_subscriber" />
		</service>

		<service id="scheb_two_factor.default_trusted_device_manager" class="Scheb\TwoFactorBundle\Security\TwoFactor\Trusted\TrustedDeviceManager">
			<argument type="service" id="scheb_two_factor.trusted_token_storage" />
		</service>

		<service id="scheb_two_factor.null_trusted_device_manager" class="Scheb\TwoFactorBundle\Security\TwoFactor\Trusted\NullTrustedDeviceManager" />
	</services>
</container>
