1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
package org.mule.module.acegi.config; |
11 | |
|
12 | |
import org.mule.api.config.MuleProperties; |
13 | |
import org.mule.config.spring.parsers.collection.ChildMapEntryDefinitionParser; |
14 | |
import org.mule.config.spring.parsers.generic.ChildDefinitionParser; |
15 | |
import org.mule.config.spring.parsers.generic.DescendentDefinitionParser; |
16 | |
import org.mule.config.spring.parsers.generic.NamedDefinitionParser; |
17 | |
import org.mule.module.acegi.AcegiProviderAdapter; |
18 | |
import org.mule.module.acegi.filters.http.HttpBasicAuthenticationFilter; |
19 | |
|
20 | |
import org.springframework.beans.factory.xml.NamespaceHandlerSupport; |
21 | |
|
22 | |
|
23 | |
|
24 | |
|
25 | 46 | public class AcegiNamespaceHandler extends NamespaceHandlerSupport |
26 | |
{ |
27 | |
public void init() |
28 | |
{ |
29 | 46 | registerBeanDefinitionParser("security-manager", new NamedDefinitionParser(MuleProperties.OBJECT_SECURITY_MANAGER)); |
30 | 46 | registerBeanDefinitionParser("delegate-security-provider", new ChildDefinitionParser("provider", AcegiProviderAdapter.class)); |
31 | 46 | registerBeanDefinitionParser("http-security-filter", new DescendentDefinitionParser("securityFilter", HttpBasicAuthenticationFilter.class)); |
32 | 46 | registerBeanDefinitionParser("security-property", new ChildMapEntryDefinitionParser("securityProperty", "name", "value")); |
33 | 46 | } |
34 | |
|
35 | |
} |