
<security:authentication-manager>
<security:authentication-provider>
<security:password-encoder hash="sha"/>
<security:user-service>
<security:user name="dineshonjava" password="sweety" authorities="ROLE_USER" />
</security:user-service>
</security:authentication-provider>
</security:authentication-manager>
<security:authentication-manager>
<security:authentication-provider>
<security:password-encoder hash="sha"/>
<security:user-service>
<security:user name="dineshonjava"
password="15eabb8159c574ddb45fea23e853e18bc599ce87"
authorities="ROLE_USER" />
</security:user-service>
</security:authentication-provider>
</security:authentication-manager>
<?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:security="http://www.springframework.org/schema/security"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
<security:http auto-config="true">
<security:intercept-url pattern="/index*" access="ROLE_USER" />
<security:form-login login-page="/login" default-target-url="/index"
authentication-failure-url="/fail2login" />
<security:logout logout-success-url="/logout" />
</security:http>
<security:authentication-manager>
<security:authentication-provider>
<security:password-encoder hash="sha"/>
<security:user-service>
<security:user name="dineshonjava" password="15eabb8159c574ddb45fea23e853e18bc599ce87" authorities="ROLE_USER" />
</security:user-service>
</security:authentication-provider>
</security:authentication-manager>
</beans>



Labels: SpringSecurity