Skip to content

Commit e71adf5

Browse files
author
eugenp
committed
update on security work for rest api
1 parent d8b171e commit e71adf5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-security-rest/src/main/resources/webSecurityConfig.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
<http use-expressions="true" entry-point-ref="restAuthenticationEntryPoint">
1111
<intercept-url pattern="/api/**" access="isAuthenticated()" />
1212

13-
<sec:form-login authentication-success-handler-ref="mySuccessHandler" />
13+
<sec:form-login authentication-success-handler-ref="mySuccessHandler" authentication-failure-handler-ref="myFailureHandler" />
1414

1515
<logout />
1616
</http>
1717

1818
<beans:bean id="mySuccessHandler" class="org.baeldung.security.MySavedRequestAwareAuthenticationSuccessHandler" />
19+
<beans:bean id="myFailureHandler" class="org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler" />
1920

2021
<authentication-manager alias="authenticationManager">
2122
<authentication-provider>

0 commit comments

Comments
 (0)