<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:aop="http://www.springframework.org/schema/aop"
	xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:security="http://www.springframework.org/schema/security"
	xsi:schemaLocation="
	http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.0.xsd
	http://www.springframework.org/schema/tx https://www.springframework.org/schema/tx/spring-tx-3.0.xsd
	http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop-3.0.xsd
	http://www.springframework.org/schema/security https://www.springframework.org/schema/security/spring-security.xsd">


	<bean id="userRepository" class="org.springframework.security.integration.StubUserRepository"/>

	<security:authentication-manager>
		<security:authentication-provider
		user-service-ref="userDetailsService" />
	</security:authentication-manager>

	<bean id="userDetailsService" class="org.springframework.security.integration.UserDetailsServiceImpl">
		<property name="userRepository" ref="userRepository"/>
	</bean>

	<security:global-method-security>
		<security:protect-pointcut
			expression="execution(* org.springframework.security.integration.*Repository+.*(..))"
			access="ROLE_LOGGEDIN" />
	</security:global-method-security>

	<aop:aspectj-autoproxy/>

</beans>
