com.sun.xml.registry.ebxml.jaas
Class LoginModuleManager

java.lang.Object
  extended bycom.sun.xml.registry.ebxml.jaas.LoginModuleManager

public class LoginModuleManager
extends java.lang.Object

Author:
psterk

Constructor Summary
LoginModuleManager()
          Default constructor
Uses jaxr-ebxml-provider as the default login config application name
LoginModuleManager(java.lang.String applicationName)
          Alternative constructor
The application name is configurable
 
Method Summary
 void createDefaultLoginConfigFile()
          This method is used to create the default login configuration file.
 void createLoginConfigFile()
          This method is used to write the login configuration file required by the LoginContext.
 java.lang.String getApplicationName()
          This method is used to get the application name from the bundled config file.
 javax.security.auth.callback.CallbackHandler getCallbackHandler()
          This method is used to get the CallbackHandler from the bundled properties file.
 java.awt.Frame getParentFrame()
          This method is used to get the parent frame of this class.
static void main(java.lang.String[] args)
           
 void setDefaultCallbackHandler(javax.security.auth.callback.CallbackHandler handler)
          This method is used to set the default CallbackHandler.
 void setParentFrame(java.awt.Frame frame)
          This method is used to set the parent frame of this class.
 void setParentLog(org.apache.commons.logging.Log log)
          This method is used to set the parent Log of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoginModuleManager

public LoginModuleManager()
Default constructor
Uses jaxr-ebxml-provider as the default login config application name


LoginModuleManager

public LoginModuleManager(java.lang.String applicationName)
Alternative constructor
The application name is configurable

Parameters:
applicationName - A String that contains the application name for the login config file
Method Detail

setParentFrame

public void setParentFrame(java.awt.Frame frame)
This method is used to set the parent frame of this class. The reference will be passed to the CallbackHandler implementation to improve the GUI behavior.

Parameters:
frame - The parent frame used by the CallbackHandler implementation

getParentFrame

public java.awt.Frame getParentFrame()
This method is used to get the parent frame of this class.


setParentLog

public void setParentLog(org.apache.commons.logging.Log log)
This method is used to set the parent Log of this class. This reference will be passed to the CallbackHandler implementation to provide more consistent logging.

Parameters:
log - The parent log used by the CallbackHandler implementation

createLoginConfigFile

public void createLoginConfigFile()
                           throws javax.xml.registry.JAXRException
This method is used to write the login configuration file required by the LoginContext. It searches for the java.login.config file in the classpath and writes it to the filesystem. The LoginContext class will read this file, and instantiate and configure the correct JAAS LoginModules. If the java.login.config file cannot be found, it defaults to the current KeystoreLoginModule.

Throws:
javax.xml.registry.JAXRException - This exception is thrown if the bundled config file is different from the user config file, and cannot be written to the filesystem. If there is no bundled config file, this exception is thrown if there is a problem writing the default config file to the filesystem

getApplicationName

public java.lang.String getApplicationName()
This method is used to get the application name from the bundled config file. If this file does not exist, it defaults to 'jaxr-ebxml-provider'

Returns:
A String containing the application name

setDefaultCallbackHandler

public void setDefaultCallbackHandler(javax.security.auth.callback.CallbackHandler handler)
This method is used to set the default CallbackHandler. If the jaxr-ebxml.security.jaas.callbackHandlerClassName property is not set, this default CallbackHandler will be used.

Parameters:
handler - A javax.security.auth.callback.CallbackHandler implementation provided by the user

getCallbackHandler

public javax.security.auth.callback.CallbackHandler getCallbackHandler()
                                                                throws javax.xml.registry.JAXRException
This method is used to get the CallbackHandler from the bundled properties file. It reads the jaxr-ebxml.security.jaas.callbackHandlerClassName property. If this file or property does not exist, it defaults to com.sun.xml.registry.client.jaas.DialogAuthenticationCallbackHandler.

Returns:
An instance of the CallbackHandler interface
Throws:
javax.xml.registry.JAXRException

createDefaultLoginConfigFile

public void createDefaultLoginConfigFile()
                                  throws javax.xml.registry.JAXRException
This method is used to create the default login configuration file. Currently, the default file is for the com.sun.security.auth.module.KeystoreLoginModule

Throws:
javax.xml.registry.JAXRException - This is thrown if there is a problem writing the default login config file to the filesystem

main

public static void main(java.lang.String[] args)
Parameters:
args - the command line arguments


Copyright © 2001-2004 OASIS. All Rights Reserved.