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.config.spring.parsers.specific.SecurityFilterDefinitionParser; |
18 | |
import org.mule.module.acegi.AcegiProviderAdapter; |
19 | |
import org.mule.module.acegi.filters.http.HttpBasicAuthenticationFilter; |
20 | |
|
21 | |
import org.springframework.beans.factory.xml.NamespaceHandlerSupport; |
22 | |
|
23 | |
|
24 | |
|
25 | |
|
26 | 0 | public class AcegiNamespaceHandler extends NamespaceHandlerSupport |
27 | |
{ |
28 | |
public void init() |
29 | |
{ |
30 | 0 | registerBeanDefinitionParser("security-manager", new NamedDefinitionParser(MuleProperties.OBJECT_SECURITY_MANAGER)); |
31 | 0 | registerBeanDefinitionParser("delegate-security-provider", new ChildDefinitionParser("provider", AcegiProviderAdapter.class)); |
32 | 0 | registerBeanDefinitionParser("http-security-filter", new SecurityFilterDefinitionParser(HttpBasicAuthenticationFilter.class)); |
33 | 0 | registerBeanDefinitionParser("security-property", new ChildMapEntryDefinitionParser("securityProperty", "name", "value")); |
34 | 0 | } |
35 | |
|
36 | |
} |