View Javadoc

1   /*
2    *   Copyright 2004 The Apache Software Foundation
3    *
4    *   Licensed under the Apache License, Version 2.0 (the "License");
5    *   you may not use this file except in compliance with the License.
6    *   You may obtain a copy of the License at
7    *
8    *       http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *   Unless required by applicable law or agreed to in writing, software
11   *   distributed under the License is distributed on an "AS IS" BASIS,
12   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *   See the License for the specific language governing permissions and
14   *   limitations under the License.
15   *
16   */
17  package org.apache.ldap.server.authn;
18  
19  import java.util.Enumeration;
20  import java.util.Properties;
21  
22  /***
23   * Default implementation of AuthenticatorConfig.
24   *
25   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
26   */
27  public class GenericAuthenticatorConfig implements AuthenticatorConfig {
28  
29      private String authenticatorName;
30      private String authenticatorClass;
31      private AuthenticatorContext authenticatorContext;
32      private Properties properties = new Properties();
33  
34      public String getAuthenticatorName()
35      {
36          return authenticatorName;
37      }
38  
39      public void setAuthenticatorName( String authenticatorName )
40      {
41          this.authenticatorName = authenticatorName;
42      }
43  
44      public String getAuthenticatorClass()
45      {
46          return authenticatorClass;
47      }
48  
49      public void setAuthenticatorClass( String authenticatorClass )
50      {
51          this.authenticatorClass = authenticatorClass;
52      }
53  
54      public Properties getProperties()
55      {
56          return properties;
57      }
58  
59      public void setProperties( Properties properties )
60      {
61          this.properties = properties;
62      }
63  
64      public String getInitParameter( String name )
65      {
66          return properties.getProperty( name );
67      }
68  
69      public Enumeration getInitParameterNames()
70      {
71          return properties.keys();
72      }
73  
74      public AuthenticatorContext getAuthenticatorContext()
75      {
76          return authenticatorContext;
77      }
78  
79      public void setAuthenticatorContext( AuthenticatorContext authenticatorContext )
80      {
81          this.authenticatorContext = authenticatorContext;
82      }
83  }