User Authentication System (UAS)

Requirements

The system provides a user name/password dialog that allows end users to authenticate themselves. It also provides a security log UI which lets staff monitor potential security threats (such as password guessing programs) by viewing failed login attempts.

Scenario

  1. User enters "zorf" for User name and "xyzzy" for password.
  2. System displays "zorf" in User name field and ***** in the Password field.
  3. User hits Enter while in the Password field.
  4. System checks for authorization; in this scenario, the authorization check fails.
  5. System displays an error message dialog indicating that the login failed.
  6. System logs the failed login attempt.
  7. User clicks OK to dismiss the error dialog.

Design

The UI consists of two independent top-level windows (in a real system, the windows would be on different displays or perhaps even different computers -- we will ignore these minor details). The system consists of three main classes, one each for the two main UI components and a manager class:

Class Diagram

Left as an exercise. (See code below; reverse engineer the class diagram from the Java code below.)

Implementation

System Documentation (javadoc)

Code: SecuritySystem.java
Code: PasswordPopup.java
Code: LogMonitor.java

Output