<?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:sec="http://www.springframework.org/schema/security"
	xmlns:p="http://www.springframework.org/schema/p"
	xmlns:util="http://www.springframework.org/schema/util"
	xsi:schemaLocation="http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">


	<sec:http auto-config="true" jaas-api-provision="true">
		<sec:intercept-url pattern="/secure/**" access="isAuthenticated()"/>
	</sec:http>

	<sec:authentication-manager>
		<sec:authentication-provider ref="jaasAuthProvider"/>
	</sec:authentication-manager>

	<bean id="jaasAuthProvider"
	class="org.springframework.security.authentication.jaas.DefaultJaasAuthenticationProvider">
		<property name="configuration">
			<bean
				class="org.springframework.security.authentication.jaas.memory.InMemoryConfiguration">
				<constructor-arg>
					<map>
						<entry key="SPRINGSECURITY">
							<array>
								<bean class="javax.security.auth.login.AppConfigurationEntry">
									<constructor-arg
										value="samples.jaas.UsernameEqualsPasswordLoginModule" />
									<constructor-arg>
										<util:constant
											static-field="javax.security.auth.login.AppConfigurationEntry$LoginModuleControlFlag.REQUIRED" />
									</constructor-arg>
									<constructor-arg>
										<map></map>
									</constructor-arg>
								</bean>
							</array>
						</entry>
					</map>
				</constructor-arg>
			</bean>
		</property>
		<property name="authorityGranters">
			<list>
				<bean class="samples.jaas.RoleUserAuthorityGranter" />
			</list>
		</property>
	</bean>
</beans>
