All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class mit.login.KVerify

java.lang.Object
   |
   +----mit.login.KVerify

public class KVerify
extends Object
Simple Class with two static methods. Used to Verify if a given Kerberos Username and password are correct. Note: This class is hardwired for MIT Other sites will need to change appropriate constants.

Also Note: An encryption key is included in this class, so it's source and class file must be kept confidential. Code Obsfucators may help but are not a substitute for protecting this implementation. Future versions may store the encryption key in a file which can be separately protected (which is how it should be done!)


Method Index

 o hasExtra(String)
Returns true if the specified user has an "extra" instance.
 o verify(String, String, String)
Returns true if username, password are correct, false otherwise.

Methods

 o verify
 public static boolean verify(String user,
                              String instance,
                              String password) throws UnknownHostException, KVerifyException, IOException
Returns true if username, password are correct, false otherwise.

Parameters:
user - Kerberos Name of user to verify
instance - Kerberos instance portion of name
password - User's password
Returns:
true on success false on bad user or password
Throws: UnknownHostException
if kerberos.mit.edu cannot be found
Throws: IOException
if kerberos.mit.edu cannot be reached
Throws: KVerifyException
if cert configfile has a problem
 o hasExtra
 public static boolean hasExtra(String user) throws IOException
Returns true if the specified user has an "extra" instance. false otherwise. Note: Will return false if the user is itself unknown.

Parameters:
user - Kerberos user name to check
Returns:
true if extra instance available

All Packages  Class Hierarchy  This Package  Previous  Next  Index