mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-29 15:22:15 +00:00
SEC-1445: Tests for setting of username and password parameter names through the form-login element.
This commit is contained in:
parent
7d74b7c87e
commit
05c7abe191
@ -68,4 +68,17 @@ class FormLoginConfigTests extends AbstractHttpConfigTests {
|
|||||||
FieldUtils.getFieldValue(apf, "successHandler") == appContext.getBean("sh");
|
FieldUtils.getFieldValue(apf, "successHandler") == appContext.getBean("sh");
|
||||||
FieldUtils.getFieldValue(apf, "failureHandler") == appContext.getBean("fh")
|
FieldUtils.getFieldValue(apf, "failureHandler") == appContext.getBean("fh")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def usernameAndPasswordParametersCanBeSetThroughNamespace() {
|
||||||
|
xml.http {
|
||||||
|
'form-login'('username-parameter': 'xname', 'password-parameter':'xpass')
|
||||||
|
}
|
||||||
|
createAppContext()
|
||||||
|
|
||||||
|
def apf = getFilter(UsernamePasswordAuthenticationFilter.class);
|
||||||
|
|
||||||
|
expect:
|
||||||
|
apf.usernameParameter == 'xname';
|
||||||
|
apf.passwordParameter == 'xpass'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user