1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 *
19 */
20 package org.apache.directory.server.kerberos.shared.jaas;
21
22
23 import java.util.HashMap;
24
25 import javax.security.auth.login.AppConfigurationEntry;
26 import javax.security.auth.login.Configuration;
27 import javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag;
28
29
30 /**
31 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
32 * @version $Rev: 540371 $, $Date: 2007-05-22 02:00:43 +0200 (Di, 22 Mai 2007) $
33 */
34 public class Krb5LoginConfiguration extends Configuration
35 {
36 private static AppConfigurationEntry[] configList = new AppConfigurationEntry[1];
37
38
39 /**
40 * Creates a new instance of Krb5LoginConfiguration.
41 */
42 public Krb5LoginConfiguration()
43 {
44 String loginModule = "com.sun.security.auth.module.Krb5LoginModule";
45 LoginModuleControlFlag flag = LoginModuleControlFlag.REQUIRED;
46 configList[0] = new AppConfigurationEntry( loginModule, flag, new HashMap<String, Object>() );
47 }
48
49
50 /**
51 * Interface method requiring us to return all the LoginModules we know about.
52 */
53 public AppConfigurationEntry[] getAppConfigurationEntry( String applicationName )
54 {
55 // We will ignore the applicationName, since we want all apps to use Kerberos V5
56 return configList;
57 }
58
59
60 /**
61 * Interface method for reloading the configuration. We don't need this.
62 */
63 public void refresh()
64 {
65 // Right now this is a load once scheme and we will not implement the refresh method
66 }
67 }