View Javadoc

1   /*
2    * $Id: JaasNamespaceHandler.java 10789 2008-02-12 20:04:43Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.module.jaas.config;
12  
13  import org.mule.api.config.MuleProperties;
14  import org.mule.config.spring.parsers.generic.ChildDefinitionParser;
15  import org.mule.config.spring.parsers.generic.NamedDefinitionParser;
16  import org.mule.module.jaas.JaasSimpleAuthenticationProvider;
17  import org.mule.module.jaas.filters.JaasSecurityFilter;
18  import org.mule.security.PasswordBasedEncryptionStrategy;
19  
20  import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
21  
22  public class JaasNamespaceHandler extends NamespaceHandlerSupport
23  {
24      public void init()
25      {
26          registerBeanDefinitionParser("security-manager", new NamedDefinitionParser(MuleProperties.OBJECT_SECURITY_MANAGER));
27          registerBeanDefinitionParser("security-provider", new ChildDefinitionParser("provider", JaasSimpleAuthenticationProvider.class));
28          registerBeanDefinitionParser("password-encryption-strategy", new ChildDefinitionParser("encryptionStrategy", PasswordBasedEncryptionStrategy.class));
29          registerBeanDefinitionParser("jaas-security-filter", new ChildDefinitionParser("securityFilter", JaasSecurityFilter.class));
30      }
31  
32  }
33  
34