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