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