SEC-1493: Added namespace support.
This commit is contained in:
@@ -53,6 +53,20 @@ public class AuthenticationManagerBeanDefinitionParserTests {
|
||||
assertEquals(1, listener.events.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void credentialsAreClearedByDefault() throws Exception {
|
||||
setContext(CONTEXT, "3.1");
|
||||
ProviderManager pm = (ProviderManager) appContext.getBeansOfType(ProviderManager.class).values().toArray()[0];
|
||||
assertTrue(pm.isEraseCredentialsAfterAuthentication());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void clearCredentialsPropertyIsRespected() throws Exception {
|
||||
setContext("<authentication-manager erase-credentials='false'/>", "3.1");
|
||||
ProviderManager pm = (ProviderManager) appContext.getBeansOfType(ProviderManager.class).values().toArray()[0];
|
||||
assertFalse(pm.isEraseCredentialsAfterAuthentication());
|
||||
}
|
||||
|
||||
private void setContext(String context, String version) {
|
||||
appContext = new InMemoryXmlApplicationContext(context, version, null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user