Package controllers

Class AuthController


  • public class AuthController
    extends java.lang.Object
    The AuthController class provides utility methods for managing user authentication within the CAMS application. It contains method to start and end user sessions, and handle user login and logout. The class utilizes the IAuthService interface for handling the authentication process.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static IAuthService authService
      IAuthService object to authenticate user
      private static java.util.Scanner sc
      Scanner object to get input from user
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private AuthController()
      Private constructor to prevent instantiation as it is not meant to be instantiated.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void changeToCommittee()
      Switch logged in user from student to committee
      static void changeToStudent()
      Switch logged in user from committee to student
      static void endSession()
      Ends the current user session by logging the user out
      static void startSession()
      Starting a session for log in
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • sc

        private static final java.util.Scanner sc
        Scanner object to get input from user
    • Constructor Detail

      • AuthController

        private AuthController()
        Private constructor to prevent instantiation as it is not meant to be instantiated.
    • Method Detail

      • startSession

        public static void startSession()
        Starting a session for log in
      • changeToCommittee

        public static void changeToCommittee()
        Switch logged in user from student to committee
      • changeToStudent

        public static void changeToStudent()
        Switch logged in user from committee to student
      • endSession

        public static void endSession()
        Ends the current user session by logging the user out