You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by er...@apache.org on 2005/08/20 08:41:47 UTC
svn commit: r234003 - in
/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/jaas:
CallbackHandlerBean.java Krb5LoginConfiguration.java
Author: erodriguez
Date: Fri Aug 19 23:41:45 2005
New Revision: 234003
URL: http://svn.apache.org/viewcvs?rev=234003&view=rev
Log:
Reformatting: imports, whitespace, line breaks, or code convention.
Modified:
directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/jaas/CallbackHandlerBean.java
directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/jaas/Krb5LoginConfiguration.java
Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/jaas/CallbackHandlerBean.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/jaas/CallbackHandlerBean.java?rev=234003&r1=234002&r2=234003&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/jaas/CallbackHandlerBean.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/jaas/CallbackHandlerBean.java Fri Aug 19 23:41:45 2005
@@ -14,7 +14,6 @@
* limitations under the License.
*
*/
-
package org.apache.kerberos.jaas;
import java.io.IOException;
@@ -25,42 +24,40 @@
import javax.security.auth.callback.PasswordCallback;
import javax.security.auth.callback.UnsupportedCallbackException;
-
public class CallbackHandlerBean implements CallbackHandler
{
- private String name;
- private String password;
+ private String name;
+ private String password;
- public CallbackHandlerBean( String name, String password )
- {
- this.name = name;
- this.password = password;
- }
-
- public void handle( Callback[] callbacks )
- throws UnsupportedCallbackException, IOException
- {
- for ( int ii = 0; ii < callbacks.length; ii++ )
- {
- Callback callBack = callbacks[ii];
-
- // Handles username callback.
- if ( callBack instanceof NameCallback )
- {
- NameCallback nameCallback = (NameCallback) callBack;
- nameCallback.setName(name);
- // Handles password callback.
- }
- else if ( callBack instanceof PasswordCallback )
- {
- PasswordCallback passwordCallback = (PasswordCallback) callBack;
- passwordCallback.setPassword( password.toCharArray() );
- }
- else
- {
- throw new UnsupportedCallbackException( callBack, "Callback not supported" );
- }
- }
- }
+ public CallbackHandlerBean( String name, String password )
+ {
+ this.name = name;
+ this.password = password;
+ }
+
+ public void handle( Callback[] callbacks ) throws UnsupportedCallbackException, IOException
+ {
+ for ( int ii = 0; ii < callbacks.length; ii++ )
+ {
+ Callback callBack = callbacks[ ii ];
+
+ // Handles username callback.
+ if ( callBack instanceof NameCallback )
+ {
+ NameCallback nameCallback = (NameCallback) callBack;
+ nameCallback.setName( name );
+ // Handles password callback.
+ }
+ else
+ if ( callBack instanceof PasswordCallback )
+ {
+ PasswordCallback passwordCallback = (PasswordCallback) callBack;
+ passwordCallback.setPassword( password.toCharArray() );
+ }
+ else
+ {
+ throw new UnsupportedCallbackException( callBack, "Callback not supported" );
+ }
+ }
+ }
}
-
Modified: directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/jaas/Krb5LoginConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/jaas/Krb5LoginConfiguration.java?rev=234003&r1=234002&r2=234003&view=diff
==============================================================================
--- directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/jaas/Krb5LoginConfiguration.java (original)
+++ directory/shared/kerberos/branches/refactor-to-chain/common/src/java/org/apache/kerberos/jaas/Krb5LoginConfiguration.java Fri Aug 19 23:41:45 2005
@@ -14,7 +14,6 @@
* limitations under the License.
*
*/
-
package org.apache.kerberos.jaas;
import java.util.HashMap;
@@ -23,33 +22,31 @@
import javax.security.auth.login.Configuration;
import javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag;
-
public class Krb5LoginConfiguration extends Configuration
{
- private static AppConfigurationEntry[] configList = new AppConfigurationEntry[1];
-
- public Krb5LoginConfiguration()
+ private static AppConfigurationEntry[] configList = new AppConfigurationEntry[ 1 ];
+
+ public Krb5LoginConfiguration()
{
- String loginModule = "com.sun.security.auth.module.Krb5LoginModule";
- LoginModuleControlFlag flag = LoginModuleControlFlag.REQUIRED;
- configList[0] = new AppConfigurationEntry( loginModule, flag, new HashMap() );
- }
-
- /**
- * Interface method requiring us to return all the LoginModules we know about.
- */
- public AppConfigurationEntry[] getAppConfigurationEntry( String applicationName )
+ String loginModule = "com.sun.security.auth.module.Krb5LoginModule";
+ LoginModuleControlFlag flag = LoginModuleControlFlag.REQUIRED;
+ configList[ 0 ] = new AppConfigurationEntry( loginModule, flag, new HashMap() );
+ }
+
+ /**
+ * Interface method requiring us to return all the LoginModules we know about.
+ */
+ public AppConfigurationEntry[] getAppConfigurationEntry( String applicationName )
{
- // We will ignore the applicationName, since we want all apps to use Kerberos V5
- return configList;
- }
-
- /**
- * Interface method for reloading the configuration. We don't need this.
- */
- public void refresh()
+ // We will ignore the applicationName, since we want all apps to use Kerberos V5
+ return configList;
+ }
+
+ /**
+ * Interface method for reloading the configuration. We don't need this.
+ */
+ public void refresh()
{
- // Right now this is a load once scheme and we will not implement the refresh method
- }
+ // Right now this is a load once scheme and we will not implement the refresh method
+ }
}
-