Class AuthInfo
java.lang.Object
AuthInfo
- public class AuthInfo
- extends Object
Used for authenticating a user.
The class that wishes to authenticate the user fills in the required info
regarding to what authentication mechanism is being used, and the required
data needed to perform the authentication.
The account manager that services the request will return an AuthInfo object
containing the results of the authentication.
If the credentials were met, then a boolean flag will be set active to
indicate this. Also, if the credentials were met, and the username of the
user was not known (as in the case of RFID-based authentication where only
the key of the RFID tag is known), the the username field of the returned
AuthInfo object will be filled in with the username if it can be determined.
If the username cannot be determined, the username field will be set to
null.
All data that is required for each authentication mechanism is to be stored,
in the prescribed format, in the 'data' data member.
Ex: the Kerberos authentication mechanism requires that the username be
stored in index 1 of the data object.
This implies that the 'username' data member of this class IS NOT used to
pass data to the authentication mechanism.
This also implies that the username data member will only be filled in by
the authentication server in cases where the data does not already contain
the CSH username of the user, as in the case of RFID, but not in the case of
Kerberos.
- Author:
- Kevin Thompson [antiduh@csh.rit.edu]
|
Field Summary |
static int |
AUTH_MECH_AIM
Indiciates that we are attempting to authenticate against an Aim
username database. |
static int |
AUTH_MECH_DRINK_PASS
Indicates that we are attempting to authenticate using drink-specific
passwords. |
static int |
AUTH_MECH_IDCARD
Indicates that we are attempting to authenticate against an ID card
database. |
static int |
AUTH_MECH_IMAP
Indicates that we are attempting to authenticate by using the supplied
credentials to attempt to log into an IMAP server. |
static int |
AUTH_MECH_KERB
Indicates that we are attempting to authenticate against a kerberos
server. |
static int |
AUTH_MECH_POP3
Indicates that we are attempting to authenticate by using the supplied
credentials to attempt to log into a POP3 server. |
static int |
AUTH_MECH_RFID
Indicates that we are attempting to authenticate against an RFID
database. |
static int |
AUTH_MECH_USER_PASS
Indicates that we are attempting to authenticate using any sort of
mechanism that needs a user-pass pair. |
private boolean |
authenticated
|
private int |
authMech
|
private Object[] |
data
|
private String |
username
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AUTH_MECH_KERB
public static final int AUTH_MECH_KERB
- Indicates that we are attempting to authenticate against a kerberos
server.
The (tenative) format for the data object is:
data[0] is a String object containing the username of the user.
data[1] is a String object containing the password of the user.
data[2] is a String object containing the URI to use to connect to
the kerberos server, in the format 'host:port'.
The port must be numeric.
Ex: data[2] = new String( "kerberos.csh.rit.edu:88" );
The third argument may be omitted, in which case the authenticator
will use a default server.
- See Also:
- Constant Field Values
AUTH_MECH_DRINK_PASS
public static final int AUTH_MECH_DRINK_PASS
- Indicates that we are attempting to authenticate using drink-specific
passwords.
The format for the data is object is:
data[0] is a String object containing the username of the user.
data[1] is a String object containing the password of the user.
- See Also:
- Constant Field Values
AUTH_MECH_IMAP
public static final int AUTH_MECH_IMAP
- Indicates that we are attempting to authenticate by using the supplied
credentials to attempt to log into an IMAP server.
The format of the data object is:
data[0] is a String containing the username of the user.
data[1] is a String containing the password for the users account.
data[2] is a String containing a URI for the server to connect to.
The URI must be in the form 'host:port', and the port must be numeric.
This argument may be ommitted, in which case the server will use a
default server.
- See Also:
- Constant Field Values
AUTH_MECH_POP3
public static final int AUTH_MECH_POP3
- Indicates that we are attempting to authenticate by using the supplied
credentials to attempt to log into a POP3 server.
The format of the data object is:
data[0] is a String containing the username of the user.
data[1] is a String containing the password for the users account.
data[2] is a String containing a URI for the server to connect to.
The URI must be in the form 'host:port', and the port must be numeric.
This argument may be ommitted, in which case the server will use a
default server.
- See Also:
- Constant Field Values
AUTH_MECH_USER_PASS
public static final int AUTH_MECH_USER_PASS
- Indicates that we are attempting to authenticate using any sort of
mechanism that needs a user-pass pair.
This is so that the software can try to authenticate against
multiple mechanism without having to know which authentication
mechanism the user desired specifically.
Every mechanism that has all the information that it needs will be tried.
Mechanisms may use defaults.
For example, AUTH_MECH_DRINK-PASS only needs a username-password pair,
so that would be tried.
AUTH_MECH_KERB will also be tried, using the default kerberos server:port.
The format of the data object is:
data[0] is a String object containing the username of the user.
data[1] is a String object containing the password of the user.
- See Also:
- Constant Field Values
AUTH_MECH_RFID
public static final int AUTH_MECH_RFID
- Indicates that we are attempting to authenticate against an RFID
database.
The RFID database is searched for the first match of the
given RFID key. The username field of the returned AuthInfo object is
filled in for this authentication mechanism.
This is not a challenge based 'authentication', instead it is really a
username lookup mechanism. The security here is dependant on the
possession of the RFID device. The idea is that a user could walk up to
the machine, swipe their RFID tag, and order a soda.
data[0] is a String containing the key of the RFID device.
- See Also:
- Constant Field Values
AUTH_MECH_AIM
public static final int AUTH_MECH_AIM
- Indiciates that we are attempting to authenticate against an Aim
username database.
The format of the data object is:
data[0] is a String containing the Aim screen name of the user.
Just as with AUTH_MECH_RFID, its assumed that the user is already
'authenticated', meaning that we are to simply determine whats the username
of the person messaging us.
- See Also:
- Constant Field Values
AUTH_MECH_IDCARD
public static final int AUTH_MECH_IDCARD
- Indicates that we are attempting to authenticate against an ID card
database.
The format of the data object is:
data[0] is a String containing the unique ID for the ID card.
In the instance of RIT ID cards, this happens to be the persons
SSN.
- See Also:
- Constant Field Values
username
private String username
data
private Object[] data
authenticated
private boolean authenticated
authMech
private int authMech
AuthInfo
public AuthInfo()