KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > security > AuthenticationInfo


1 /*
2  * JBoss, the OpenSource EJB server
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.security;
8
9 import java.security.AccessController JavaDoc;
10 import javax.security.auth.AuthPermission JavaDoc;
11 import javax.security.auth.callback.CallbackHandler JavaDoc;
12 import javax.security.auth.login.AppConfigurationEntry JavaDoc;
13
14 /** The login module configuration information.
15
16 @author Scott.Stark@jboss.org
17 @version $Revision: 1.3 $
18 */

19 public class AuthenticationInfo
20 {
21     public static final AuthPermission JavaDoc GET_CONFIG_ENTRY_PERM = new AuthPermission JavaDoc("getLoginConfiguration");
22     public static final AuthPermission JavaDoc SET_CONFIG_ENTRY_PERM = new AuthPermission JavaDoc("setLoginConfiguration");
23     private AppConfigurationEntry JavaDoc[] loginModules;
24     private CallbackHandler JavaDoc callbackHandler;
25
26     /** Get an application authentication configuration. This requires an
27     AuthPermission("getLoginConfiguration") access.
28     */

29     public AppConfigurationEntry JavaDoc[] getAppConfigurationEntry()
30     {
31         AccessController.checkPermission(GET_CONFIG_ENTRY_PERM);
32         return loginModules;
33     }
34     /** Set an application authentication configuration. This requires an
35     AuthPermission("setLoginConfiguration") access.
36     */

37     public void setAppConfigurationEntry(AppConfigurationEntry JavaDoc[] loginModules)
38     {
39         AccessController.checkPermission(SET_CONFIG_ENTRY_PERM);
40         this.loginModules = loginModules;
41     }
42
43     /**
44     */

45     public CallbackHandler JavaDoc getAppCallbackHandler()
46     {
47         return callbackHandler;
48     }
49     public void setAppCallbackHandler(CallbackHandler JavaDoc handler)
50     {
51         this.callbackHandler = handler;
52     }
53 }
54
Popular Tags