Spring version upgrade to 2.0.4, changed svn urls in project.xml and poms
This commit is contained in:
@@ -113,7 +113,7 @@ public class AuthenticationRepositoryBeanDefinitionParser extends AbstractBeanDe
|
||||
repositoryBeanDef.getPropertyValues().addPropertyValue(property, new RuntimeBeanReference(reference));
|
||||
}
|
||||
else {
|
||||
doSetInnerBeanDefinitions(repositoryBeanDef, element);
|
||||
doSetInnerBeanDefinitions(repositoryBeanDef, element,property);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,8 +121,9 @@ public class AuthenticationRepositoryBeanDefinitionParser extends AbstractBeanDe
|
||||
*
|
||||
* @param repositoryBeanDef
|
||||
* @param element
|
||||
* @param property
|
||||
*/
|
||||
private void doSetInnerBeanDefinitions(RootBeanDefinition repositoryBeanDef, Element element) {
|
||||
private void doSetInnerBeanDefinitions(RootBeanDefinition repositoryBeanDef, Element element, String property) {
|
||||
NodeList children = element.getChildNodes();
|
||||
for (int i = 0, n = children.getLength(); i < n; i++) {
|
||||
Node node = children.item(i);
|
||||
@@ -133,15 +134,15 @@ public class AuthenticationRepositoryBeanDefinitionParser extends AbstractBeanDe
|
||||
|
||||
if (SYSTEM_WIDE_SALT_SOURCE.equals(node.getLocalName())) {
|
||||
innerBeanDefinition = createSystemWideSaltSource(childElement);
|
||||
repositoryBeanDef.getPropertyValues().addPropertyValue("saltSource", innerBeanDefinition);
|
||||
repositoryBeanDef.getPropertyValues().addPropertyValue(property, innerBeanDefinition);
|
||||
}
|
||||
else if (REFLECTION_SALT_SOURCE.equals(node.getLocalName())) {
|
||||
innerBeanDefinition = createReflectionSaltSource(childElement);
|
||||
repositoryBeanDef.getPropertyValues().addPropertyValue("saltSource", innerBeanDefinition);
|
||||
repositoryBeanDef.getPropertyValues().addPropertyValue(property, innerBeanDefinition);
|
||||
}
|
||||
if (PASSWORD_ENCODER.equals(node.getLocalName())) {
|
||||
RootBeanDefinition passwordEncoderInnerBeanDefinition = createPasswordEncoder(childElement);
|
||||
repositoryBeanDef.getPropertyValues().addPropertyValue("passwordEncoder", passwordEncoderInnerBeanDefinition);
|
||||
repositoryBeanDef.getPropertyValues().addPropertyValue(property, passwordEncoderInnerBeanDefinition);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ public class SecurityNamespaceHandler extends NamespaceHandlerSupport {
|
||||
* '<code>context-integration</code>', ' and '<code></code>' elements.
|
||||
*/
|
||||
public void init() {
|
||||
registerBeanDefinitionParser("principal-repository", new PrincipalRepositoryBeanDefinitionParser());
|
||||
registerBeanDefinitionParser("session-context-integration", new ContextIntegrationBeanDefinitionParser());
|
||||
registerBeanDefinitionParser("authentication-repository", new AuthenticationRepositoryBeanDefinitionParser());
|
||||
registerBeanDefinitionParser("authentication-mechanism", new AuthenticationMechanismBeanDefinitionParser());
|
||||
|
||||
@@ -101,10 +101,10 @@
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="rememberMeServicesBeanRef" type="xsd:string"
|
||||
use="optional" />
|
||||
<xsd:attribute name="rememberMeServicesBeanRef"
|
||||
type="xsd:string" use="optional" />
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:element name="authentication-remember-me-services"
|
||||
type="RememberMeServices" />
|
||||
|
||||
@@ -118,20 +118,21 @@
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="key" type="xsd:string"
|
||||
use="optional" />
|
||||
<xsd:attribute name="principalRepositoryBeanRef" type="xsd:string"
|
||||
use="optional" />
|
||||
<xsd:attribute name="key" type="xsd:string" use="optional" />
|
||||
<xsd:attribute name="principalRepositoryBeanRef"
|
||||
type="xsd:string" use="optional" />
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
|
||||
|
||||
<xsd:element name="authentication-mechanism"
|
||||
type="AuthenticationManager" />
|
||||
|
||||
<xsd:complexType name="AuthenticationManager">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="authentication-jdbc" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element ref="authentication-ldap" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element ref="authentication-jdbc" minOccurs="0"
|
||||
maxOccurs="1" />
|
||||
<xsd:element ref="authentication-ldap" minOccurs="0"
|
||||
maxOccurs="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:ID">
|
||||
<xsd:annotation>
|
||||
@@ -143,16 +144,55 @@
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:element name="authentication-jdbc">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="ref" type="xsd:string"/>
|
||||
<xsd:attribute name="ref" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
|
||||
<xsd:element name="authentication-ldap">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="ref" type="xsd:string"/>
|
||||
<xsd:attribute name="ref" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
|
||||
<xsd:element name="principal-repository"
|
||||
type="PrincipalRepository" />
|
||||
|
||||
<xsd:complexType name="PrincipalRepository">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="jdbc" minOccurs="0"
|
||||
maxOccurs="1" />
|
||||
<xsd:element ref="ldap" minOccurs="0"
|
||||
maxOccurs="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:ID">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
<![CDATA[
|
||||
The unique identifier for a bean.
|
||||
]]>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:element name="jdbc">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="dataSourceBeanRef" type="xsd:string" />
|
||||
<xsd:attribute name="authoritiesByUsernameQuery" type="xsd:string" use="optional"/>
|
||||
<xsd:attribute name="jdbcTemplateRef" type="xsd:string" use="optional"/>
|
||||
<xsd:attribute name="rolePrefix" type="xsd:string" use="optional"/>
|
||||
<xsd:attribute name="usernameBasedPrimaryKey" type="xsd:boolean" use="optional"/>
|
||||
<xsd:attribute name="usersByUsernameQuery" type="xsd:string" use="optional"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="ldap">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="not-yet-defined" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
|
||||
@@ -8,9 +8,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
public class RememberMeBeanDefinitionParserTest extends TestCase {
|
||||
|
||||
public void testRememberMeDefaults() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext("org/acegisecurity/config/remember-me-defaults.xml");
|
||||
|
||||
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext("org/acegisecurity/config/principal-defaults.xml");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ http://www.springframework.org/schema/security http://www.springframework.org/sc
|
||||
Every authentication mechanism OR provider must start with security:authentication-something
|
||||
Use appropriate attrs and elements depending on provider or mechanism
|
||||
-->
|
||||
|
||||
<!-- make it optional, if not supplied autodetect all auth-providers from app ctx, using Ordered to resolve their order -->
|
||||
<security:authentication-mechanism id="authenticationManager">
|
||||
<security:authentication-jdbc ref="authenticationRepository"/>
|
||||
</security:authentication-mechanism>
|
||||
@@ -37,18 +37,20 @@ http://www.springframework.org/schema/security http://www.springframework.org/sc
|
||||
|
||||
<!--<bean id="authenticationManager"
|
||||
class="org.acegisecurity.providers.ProviderManager">
|
||||
make it optional, if not supplied autodetect all auth-providers from app ctx, using Ordered to resolve their order
|
||||
|
||||
<property name="providers">
|
||||
<list>
|
||||
<ref local="authenticationRepository" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
</bean>-->
|
||||
|
||||
--><!-- dao authentication provider -->
|
||||
<!-- dao authentication provider -->
|
||||
<security:authentication-repository id="authenticationRepository" />
|
||||
|
||||
|
||||
<bean id="userDetailsService"
|
||||
|
||||
<bean id="userDetailsService"
|
||||
class="org.acegisecurity.userdetails.jdbc.JdbcDaoImpl">
|
||||
<property name="dataSource">
|
||||
<ref bean="dataSource" />
|
||||
|
||||
Reference in New Issue
Block a user