<?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.email.swift_auth_code_mailer" class="Scheb\TwoFactorBundle\Mailer\SwiftAuthCodeMailer">
			<argument type="service" id="swiftmailer.mailer" />
			<argument>%scheb_two_factor.email.sender_email%</argument>
			<argument>%scheb_two_factor.email.sender_name%</argument>
		</service>

		<service id="scheb_two_factor.security.email.symfony_auth_code_mailer" class="Scheb\TwoFactorBundle\Mailer\SymfonyAuthCodeMailer">
			<argument type="service" id="mailer.mailer" />
			<argument>%scheb_two_factor.email.sender_email%</argument>
			<argument>%scheb_two_factor.email.sender_name%</argument>
		</service>

		<service id="scheb_two_factor.security.email.default_code_generator" class="Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Email\Generator\CodeGenerator" lazy="true">
			<argument type="service" id="scheb_two_factor.persister" />
			<argument type="service" id="scheb_two_factor.security.email.auth_code_mailer" />
			<argument>%scheb_two_factor.email.digits%</argument>
		</service>

		<!-- Aliases for auto-wiring -->
		<service id="Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Email\Generator\CodeGeneratorInterface" alias="scheb_two_factor.security.email.code_generator" public="true" />

		<service id="scheb_two_factor.security.email.default_form_renderer" class="Scheb\TwoFactorBundle\Security\TwoFactor\Provider\DefaultTwoFactorFormRenderer" lazy="true">
			<argument type="service" id="twig" />
			<argument>%scheb_two_factor.email.template%</argument>
		</service>

		<service id="scheb_two_factor.security.email.form_renderer" alias="scheb_two_factor.security.email.default_form_renderer" />

		<service id="scheb_two_factor.security.email.provider" class="Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Email\EmailTwoFactorProvider">
			<tag name="scheb_two_factor.provider" alias="email" />
			<argument type="service" id="scheb_two_factor.security.email.code_generator" />
			<argument type="service" id="scheb_two_factor.security.email.form_renderer"/>
		</service>
	</services>
</container>
