From: <ap...@vh...> - 2006-03-27 23:10:07
|
Author: apevec Date: 2006-03-28 01:08:36 +0200 (Tue, 28 Mar 2006) New Revision: 1104 Modified: trunk/ccm-core/src/com/arsdigita/kernel/security/Initializer.java Log: remove obsolete and wrong checks for jaas.jar since JDK 1.4 is now required for some time already Modified: trunk/ccm-core/src/com/arsdigita/kernel/security/Initializer.java =================================================================== --- trunk/ccm-core/src/com/arsdigita/kernel/security/Initializer.java 2006-03-24 18:41:09 UTC (rev 1103) +++ trunk/ccm-core/src/com/arsdigita/kernel/security/Initializer.java 2006-03-27 23:08:36 UTC (rev 1104) @@ -347,36 +347,12 @@ } private void loadLoginConfig() throws InitializationException { - checkLibrary(); - javax.security.auth.login.Configuration.setConfiguration (getLoginConfig()); checkLoginConfig(); } - private void checkLibrary() throws InitializationException { - // check that JAAS is available - // TODO: this check should not be needed in JDK 1.4, since JAAS will - // be integrated into the JDK. Also, JAAS classes will no longer be - // required to be loaded by the system classloader as in JDK 1.3. - // We should also be able to use JAAS's LoginContext instead of our - // own version of LoginContext. - try { - ClassLoader.getSystemClassLoader().loadClass - ("javax.security.auth.Subject"); - ClassLoader.getSystemClassLoader().loadClass - ("javax.security.auth.login.Configuration"); - ClassLoader.getSystemClassLoader().loadClass - ("com.sun.security.auth.login.ConfigFile"); - s_log.info("Security Initializer: JAAS lib found"); - } catch (ClassNotFoundException e) { - reportMissingLibrary - ("Java Authentication and Authorization Service (JAAS)", - "jaas.jar"); - } - } - private javax.security.auth.login.Configuration getLoginConfig() throws InitializationException { SecurityConfig conf = Kernel.getSecurityConfig(); @@ -403,23 +379,6 @@ } } - /** - * Report a missing library during initialization. Package-visible. - * - * @throws InitializationException with a detail message describing how - * to install the named library. - **/ - static void reportMissingLibrary(String libraryName, - String libraryJar) - throws InitializationException { - throw new InitializationException - ("Could not find the "+libraryName+". " - +"This library ("+libraryJar+") " - +"must be on your CLASSPATH or " - +"in your extensions directory " - +"($JAVA_HOME/jre/lib/ext/)."); - } - public void shutdown() throws InitializationException { // do nothing } |