cmu.survey.data.users
Class UserAuthenticationKerberos

java.lang.Object
  extended by cmu.survey.data.users.UserAuthenticationKerberos
All Implemented Interfaces:
UserAuthentication, javax.security.auth.callback.CallbackHandler

public class UserAuthenticationKerberos
extends java.lang.Object
implements UserAuthentication, javax.security.auth.callback.CallbackHandler


Constructor Summary
UserAuthenticationKerberos(java.lang.String realm, java.lang.String kdc)
          a realm example is "CS.CMU.EDU", or "ANDREW.CMU.EDU" -- just a name for the realm in all uppercase a kdc example is "kerberos.cs.cmu.edu", or "kerberos.andrew.cmu.edu" -- a server for the kerberos realm You will need to talk to your administrator to find out what these are for you.
 
Method Summary
 java.lang.String getEmailAddress(java.lang.String userID)
          If this authentication technique knows the email address for this user, return it.
 java.lang.String getEmailDomain()
          If you know the email domain and it is different from the realm name, you can set it so that it'll get pulled correctly when the user is made.
 java.lang.String getFirstName(java.lang.String userID)
          If this authentication technique knows the first name for this user, return it.
 java.lang.String getLastErrorMessage()
          This is optional, but may be used for extra text.
 java.lang.String getLastName(java.lang.String userID)
          If this authentication technique knows the last name for this user, return it.
 void handle(javax.security.auth.callback.Callback[] callbacks)
           
static void main(java.lang.String[] args)
           
 void setEmailDomain(java.lang.String emailDomain)
          If you know the email domain and it is different from the realm name, you can set it so that it'll get pulled correctly when the user is made.
 boolean userIsCorrect(java.lang.String userID, java.lang.String password)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserAuthenticationKerberos

public UserAuthenticationKerberos(java.lang.String realm,
                                  java.lang.String kdc)
a realm example is "CS.CMU.EDU", or "ANDREW.CMU.EDU" -- just a name for the realm in all uppercase a kdc example is "kerberos.cs.cmu.edu", or "kerberos.andrew.cmu.edu" -- a server for the kerberos realm You will need to talk to your administrator to find out what these are for you.

Method Detail

userIsCorrect

public boolean userIsCorrect(java.lang.String userID,
                             java.lang.String password)
Specified by:
userIsCorrect in interface UserAuthentication

handle

public void handle(javax.security.auth.callback.Callback[] callbacks)
            throws java.io.IOException,
                   javax.security.auth.callback.UnsupportedCallbackException
Specified by:
handle in interface javax.security.auth.callback.CallbackHandler
Throws:
java.io.IOException
javax.security.auth.callback.UnsupportedCallbackException

getLastErrorMessage

public java.lang.String getLastErrorMessage()
Description copied from interface: UserAuthentication
This is optional, but may be used for extra text.

Specified by:
getLastErrorMessage in interface UserAuthentication
Returns:

getEmailAddress

public java.lang.String getEmailAddress(java.lang.String userID)
Description copied from interface: UserAuthentication
If this authentication technique knows the email address for this user, return it. If the email address is not known, return null.

Specified by:
getEmailAddress in interface UserAuthentication
Returns:

getFirstName

public java.lang.String getFirstName(java.lang.String userID)
Description copied from interface: UserAuthentication
If this authentication technique knows the first name for this user, return it. If the first name is not known, return null.

Specified by:
getFirstName in interface UserAuthentication
Returns:

getLastName

public java.lang.String getLastName(java.lang.String userID)
Description copied from interface: UserAuthentication
If this authentication technique knows the last name for this user, return it. If the last name is not known, return null.

Specified by:
getLastName in interface UserAuthentication
Returns:

getEmailDomain

public java.lang.String getEmailDomain()
If you know the email domain and it is different from the realm name, you can set it so that it'll get pulled correctly when the user is made.

Returns:
Returns the emailDomain.

setEmailDomain

public void setEmailDomain(java.lang.String emailDomain)
If you know the email domain and it is different from the realm name, you can set it so that it'll get pulled correctly when the user is made.

Parameters:
emailDomain - The emailDomain to set.

main

public static final void main(java.lang.String[] args)