Search for the Right Document
< All Topics
Print

Use Case Example: User Login

Use Case ID: UC001
Use Case Name: User Login
Actor(s): Registered User
Description: This use case describes the steps for a registered user to log into the system.
Preconditions:

  • The user must have a valid account in the system.
  • The user must know their username and password.

Postconditions:

  • The user is logged into the system and redirected to their dashboard.
  • In case of failed login attempts, the user is notified accordingly.

Main Flow (Basic Path)

  1. The user navigates to the login page.
  2. The system displays the login form with fields for the username and password.
  3. The user enters their username and password into the form.
  4. The user clicks the “Login” button.
  5. The system validates the username and password.
  6. If the credentials are correct, the system authenticates the user and redirects them to their dashboard.
  7. The use case ends.

Alternative Flows

Alternative Flow 1: Invalid Credentials

  1. If the system determines that the username or password is incorrect:
    • a. The system displays an error message: “Invalid username or password. Please try again.”
    • b. The user can choose to re-enter their credentials or reset their password.
  2. The use case resumes at Step 3 of the Main Flow.

Alternative Flow 2: Account Locked

  1. If the user has made too many unsuccessful login attempts:
    • a. The system locks the account and displays a message: “Your account has been locked due to multiple unsuccessful login attempts. Please reset your password or contact support.”
    • b. The user is provided with options to reset the password or contact support.
  2. The use case ends.

Alternative Flow 3: Forgotten Password

  1. If the user clicks “Forgot Password”:
    • a. The system prompts the user to enter their email address.
    • b. The system sends a password reset email with instructions.
    • c. The user can reset their password and attempt to log in again.
  2. The use case resumes at Step 1 of the Main Flow.

Special Requirements

  • The system must support common password security measures, such as a minimum password length and special character requirements.
  • Login attempts must be logged for security purposes.

Notes

  • This use case covers the login process only and does not include registration or account management features.
  • Future enhancements may include multi-factor authentication (MFA).
Table of Contents