HiRISE

HiRISE.HiPlan.HiWeb
Class Headless_Authenticator

java.lang.Object
  extended by HiRISE.HiPlan.HiWeb.Headless_Authenticator

public class Headless_Authenticator
extends Object

A mechanism for authenticating a HiWeb user. This class is purely headless; it does not generate a GUI interface, to allow for the possibility of using it without a graphic interface.

The user's HiWeb password is hashed before comparing with the password as stored in HiCat. Nevertheless, this class may not be 100% secure.

Version:
1.5
Author:
Christian Schaller - UA/PIRL

Nested Class Summary
static class Headless_Authenticator.Authentication_Exception
          An exception for reporting problems with HiWeb authentication.
 
Field Summary
static String ID
          Class identification name with source code version and date.
 
Constructor Summary
Headless_Authenticator(Database database)
           
 
Method Summary
 boolean authenticate_user(String username, String password)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
Class identification name with source code version and date.

See Also:
Constant Field Values
Constructor Detail

Headless_Authenticator

public Headless_Authenticator(Database database)
                       throws NoSuchAlgorithmException
Throws:
NoSuchAlgorithmException - if the SHA-1 digest algorithm is not available.
Method Detail

authenticate_user

public boolean authenticate_user(String username,
                                 String password)
                          throws Headless_Authenticator.Authentication_Exception
Parameters:
username - the user's HiWeb username.
password - the user's HiWeb password, which is to be hashed.
Returns:
true if the user is authenticated; false otherwise.
Throws:
Headless_Authenticator.Authentication_Exception - if there is a problem authenticating the user; the original cause of this exception is chained along.

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona