SEC-3147: Add error parameter for default authentication-failure-url

This commit is contained in:
Kazuki Shimizu
2015-11-13 03:10:51 +09:00
committed by Rob Winch
parent 53f85e2151
commit 205ef42cfb
2 changed files with 18 additions and 3 deletions

View File

@@ -144,4 +144,18 @@ class FormLoginConfigTests extends AbstractHttpConfigTests {
HttpServletResponse.SC_FORBIDDEN | false
HttpServletResponse.SC_MOVED_TEMPORARILY | true
}
def 'SEC-3147: authentication-failure-url should be contained "error" parameter if login-page="/login"'() {
xml.http {
'form-login'('login-page':'/login')
}
createAppContext()
def apf = getFilter(UsernamePasswordAuthenticationFilter.class);
expect:
apf.failureHandler.defaultFailureUrl == '/login?error'
}
}