<?xml version="1.0" encoding="UTF-8"?>

<!--
  - Sample namespace-based configuration
  -
  - $Id$
  -->

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

    <http>
        <intercept-url pattern="/secure/extreme/**" access="ROLE_SUPERVISOR"/>
        <intercept-url pattern="/secure/**" access="IS_AUTHENTICATED_REMEMBERED" />
        <intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />

        <form-login />
        <http-basic realm="SpringSecurityTutorialApp"  />
        <logout />
        <concurrent-session-control maxSessions="1" exceptionIfMaximumExceeded="true"/>

        <remember-me key="doesntmatter" tokenRepository="tokenRepo"/>
    </http>

    <beans:bean name="tokenRepo" class="org.springframework.security.ui.rememberme.InMemoryTokenRepositoryImpl"/>

    <authentication-provider>
        <user-service>
            <user name="bob" password="bobspassword" authorities="ROLE_SUPERVISOR" />
            <user name="bill" password="billspassword" authorities="ROLE_A,ROLE_B" />
        </user-service>
    </authentication-provider>

</beans:beans>