8 changed files with 0 additions and 113 deletions
@ -1,26 +0,0 @@
@@ -1,26 +0,0 @@
|
||||
package org.springframework.security.config.authentication; |
||||
|
||||
import org.springframework.beans.factory.config.BeanDefinitionHolder; |
||||
import org.springframework.beans.factory.xml.BeanDefinitionDecorator; |
||||
import org.springframework.beans.factory.xml.ParserContext; |
||||
import org.springframework.security.config.Elements; |
||||
import org.w3c.dom.Node; |
||||
|
||||
/** |
||||
* Adds the decorated {@link org.springframework.security.authentication.AuthenticationProvider} to the ProviderManager's |
||||
* list. |
||||
* |
||||
* @author Luke Taylor |
||||
* @version $Id$ |
||||
*/ |
||||
public class CustomAuthenticationProviderBeanDefinitionDecorator implements BeanDefinitionDecorator { |
||||
@SuppressWarnings("deprecation") |
||||
public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder holder, ParserContext parserContext) { |
||||
//ConfigUtils.addAuthenticationProvider(parserContext, holder.getBeanName(), (Element) node);
|
||||
parserContext.getReaderContext().warning(Elements.CUSTOM_AUTH_PROVIDER + " is deprecated in " + |
||||
"Spring Security 3.0 and has no effect. Authentication providers should be declared within" + |
||||
" the <authentication-provider> element", parserContext.extractSource(node)); |
||||
|
||||
return holder; |
||||
} |
||||
} |
||||
@ -1,26 +0,0 @@
@@ -1,26 +0,0 @@
|
||||
package org.springframework.security.config.method; |
||||
|
||||
import org.springframework.beans.factory.config.BeanDefinitionHolder; |
||||
import org.springframework.beans.factory.xml.BeanDefinitionDecorator; |
||||
import org.springframework.beans.factory.xml.ParserContext; |
||||
import org.w3c.dom.Node; |
||||
|
||||
/** |
||||
* Adds the decorated {@link org.springframework.security.access.AfterInvocationProvider} to the |
||||
* AfterInvocationProviderManager's list. |
||||
* |
||||
* @author Luke Taylor |
||||
* @version $Id$ |
||||
* @since 2.0 |
||||
*/ |
||||
public class CustomAfterInvocationProviderBeanDefinitionDecorator implements BeanDefinitionDecorator { |
||||
|
||||
public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder holder, ParserContext parserContext) { |
||||
parserContext.getReaderContext().warning("In Spring Security 3.0, this element is not supported and" + |
||||
" has no effect", parserContext.extractSource(node)); |
||||
// MethodConfigUtils.getRegisteredAfterInvocationProviders(parserContext).add(holder.getBeanDefinition());
|
||||
|
||||
return holder; |
||||
} |
||||
|
||||
} |
||||
@ -1,20 +0,0 @@
@@ -1,20 +0,0 @@
|
||||
package org.springframework.security.config.authentication; |
||||
|
||||
import org.junit.Test; |
||||
import org.springframework.security.config.util.InMemoryXmlApplicationContext; |
||||
|
||||
|
||||
public class CustomAuthenticationProviderBeanDefinitionDecoratorTests { |
||||
|
||||
@Test |
||||
public void decoratedProviderParsesSuccessfullyWith20Namespace() { |
||||
new InMemoryXmlApplicationContext( |
||||
"<b:bean class='org.springframework.security.authentication.dao.DaoAuthenticationProvider'>" + |
||||
" <custom-authentication-provider />" + |
||||
" <b:property name='userDetailsService' ref='us'/>" + |
||||
"</b:bean>" + |
||||
"<user-service id='us'>" + |
||||
" <user name='bob' password='bobspassword' authorities='ROLE_A,ROLE_B' />" + |
||||
"</user-service>", "2.0.4", null); |
||||
} |
||||
} |
||||
@ -1,26 +0,0 @@
@@ -1,26 +0,0 @@
|
||||
package org.springframework.security.config.method; |
||||
|
||||
import org.junit.After; |
||||
import org.junit.Test; |
||||
import org.springframework.context.support.AbstractXmlApplicationContext; |
||||
import org.springframework.security.config.util.InMemoryXmlApplicationContext; |
||||
|
||||
public class CustomAfterInvocationProviderBeanDefinitionDecoratorTests { |
||||
private AbstractXmlApplicationContext appContext; |
||||
|
||||
@After |
||||
public void closeAppContext() { |
||||
if (appContext != null) { |
||||
appContext.close(); |
||||
appContext = null; |
||||
} |
||||
} |
||||
|
||||
@Test |
||||
public void customAfterInvocationProviderIsSupportedIn20Schema() { |
||||
appContext = new InMemoryXmlApplicationContext( |
||||
"<b:bean id='aip' class='org.springframework.security.config.MockAfterInvocationProvider'>" + |
||||
" <custom-after-invocation-provider />" + |
||||
"</b:bean>", "2.0.4", null); |
||||
} |
||||
} |
||||
Loading…
Reference in new issue