<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:aop="http://www.springframework.org/schema/aop"
	xmlns:p="http://www.springframework.org/schema/p"
	xmlns:task="http://www.springframework.org/schema/task"
	xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
		http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd">
 
 	<task:annotation-driven executor="MOA-ID-Auth_TaskExecutor" scheduler="MOA-ID-Auth_Scheduler"/>
	<task:executor id="MOA-ID-Auth_TaskExecutor" pool-size="5"/>
	<task:scheduler id="MOA-ID-Auth_Scheduler" pool-size="10"/>
  	
	<!-- import auth modules -->
	<import resource="classpath*:**/*.authmodule.beans.xml" />

	<context:component-scan base-package="at.gv.egovernment.moa.id.auth.servlet" />
	<context:component-scan base-package="at.gv.egovernment.moa.id.protocols" />
 
 	<bean id="PVPIDPCredentialProvider"
 				class="at.gv.egovernment.moa.id.protocols.pvp2x.signer.IDPCredentialProvider" />
 
 	<bean id="PVP2XProtocol"
 				class="at.gv.egovernment.moa.id.protocols.pvp2x.PVP2XProtocol">
		<property name="pvpIDPCredentials">
			<ref bean="PVPIDPCredentialProvider" />
		</property>
 	</bean>
 
  	<bean id="pvpMetadataService"
 				class="at.gv.egiz.eaaf.modules.pvp2.idp.impl.MetadataAction">
		<property name="pvpIDPCredentials">
			<ref bean="PVPIDPCredentialProvider" />
		</property>
 	</bean>
 
   	<bean id="PVPAuthenticationRequestAction"
 				class="at.gv.egiz.eaaf.modules.pvp2.idp.impl.AuthenticationAction">
		<property name="pvpIDPCredentials">
			<ref bean="PVPIDPCredentialProvider" />
		</property>
 	</bean>
 
 	<bean id="MOAAuthnRequestValidator"
 			class="at.gv.egovernment.moa.id.protocols.pvp2x.validation.AuthnRequestValidator" />
 
	<bean id="MOAID_AuthenticationManager" 
				class="at.gv.egovernment.moa.id.moduls.AuthenticationManager"/>

	<bean id="AuthenticationDataBuilder" 
				class="at.gv.egovernment.moa.id.auth.builder.AuthenticationDataBuilder"/>

	<bean id="StartAuthentificationParameterParser" 
				class="at.gv.egovernment.moa.id.auth.parser.StartAuthentificationParameterParser"/>

	<bean id="MOAID_SSOManager" 
				class="at.gv.egovernment.moa.id.moduls.SSOManager"/>

	<bean id="moaGUIConfigurationFactory" 
				class="at.gv.egovernment.moa.id.auth.frontend.MOAIDGuiBilderConfigurationFactory" />
	
	<bean id="UserWhiteList_Store" 
				class="at.gv.egovernment.moa.id.config.auth.data.UserWhitelistStore"/>

	<bean id="AuthenticationSessionStoreage" 
				class="at.gv.egovernment.moa.id.storage.DBAuthenticationSessionStoreage"/>
								
	<bean id="MOAReversionLogger" 
				class="at.gv.egovernment.moa.id.advancedlogging.MOAReversionLogger"/>
				
	<bean id="AuthenticationSessionCleaner" 
				class="at.gv.egovernment.moa.id.auth.AuthenticationSessionCleaner"/>
				
	<bean id="MOAGarbageCollector" 
				class="at.gv.egovernment.moa.id.auth.MOAGarbageCollector"/>

	<bean id="MOAIDLoALevelMapper" 
				class="at.gv.egovernment.moa.id.util.LoALevelMapper"/>

	<bean id="MOASAML2SubjectNameIDGenerator"
				class="at.gv.egovernment.moa.id.auth.builder.MOAIDSubjectNameIdGenerator" />
																		
<!-- Authentication Process Tasks -->
	<bean id="GenerateBKUSelectionFrameTask" 
				class="at.gv.egovernment.moa.id.auth.modules.internal.tasks.GenerateBKUSelectionFrameTask"
				scope="prototype"/>
				
	<bean id="EvaluateBKUSelectionTask" 
				class="at.gv.egovernment.moa.id.auth.modules.internal.tasks.EvaluateBKUSelectionTask"
				scope="prototype"/>
										
	<bean id="GenerateSSOConsentEvaluatorFrameTask" 
				class="at.gv.egovernment.moa.id.auth.modules.internal.tasks.GenerateSSOConsentEvaluatorFrameTask"
				scope="prototype"/>
				
	<bean id="EvaluateSSOConsentsTaskImpl" 
				class="at.gv.egovernment.moa.id.auth.modules.internal.tasks.EvaluateSSOConsentsTaskImpl"
				scope="prototype"/>
				
	<bean id="UserRestrictionTask" 
				class="at.gv.egovernment.moa.id.auth.modules.internal.tasks.UserRestrictionTask"
				scope="prototype"/>		
				
	<bean id="GenericFrontChannelRedirectTask" 
				class="at.gv.egovernment.moa.id.auth.modules.internal.tasks.GenericFrontChannelRedirectTask"
				scope="prototype"/>				
				
	<beans profile="advancedLogOn">
		<bean id="StatisticLogger" 
				class="at.gv.egovernment.moa.id.advancedlogging.StatisticLogger"/>
	</beans>
	
	<beans profile="advancedLogOff">
		<bean id="StatisticLogger" 
				class="at.gv.egiz.eaaf.core.impl.logging.DummyStatisticLogger"/>
	</beans>
	
</beans>