2013-06-02 12:17:44 +03:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
|
|
|
|
|
xmlns:sec="http://www.springframework.org/schema/security"
|
|
|
|
|
xsi:schemaLocation="
|
|
|
|
|
http://www.springframework.org/schema/security
|
|
|
|
|
http://www.springframework.org/schema/security/spring-security-3.1.xsd
|
|
|
|
|
http://www.springframework.org/schema/beans
|
|
|
|
|
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd">
|
|
|
|
|
|
|
|
|
|
<http use-expressions="true" entry-point-ref="restAuthenticationEntryPoint">
|
|
|
|
|
<intercept-url pattern="/api/**" access="isAuthenticated()" />
|
|
|
|
|
|
|
|
|
|
<sec:form-login authentication-success-handler-ref="mySuccessHandler" />
|
|
|
|
|
|
|
|
|
|
<logout />
|
|
|
|
|
</http>
|
|
|
|
|
|
|
|
|
|
<beans:bean id="mySuccessHandler" class="org.baeldung.security.MySavedRequestAwareAuthenticationSuccessHandler" />
|
|
|
|
|
|
|
|
|
|
<authentication-manager alias="authenticationManager">
|
2013-06-02 12:22:09 +03:00
|
|
|
<authentication-provider ref="customAuthenticationProvider" />
|
2013-06-02 12:17:44 +03:00
|
|
|
</authentication-manager>
|
|
|
|
|
|
|
|
|
|
</beans:beans>
|