AuthController class This class is responsible for handling the authentication routes in the API.

Constructors

Methods

  • Login a user

    Parameters

    • req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

      The request object

    • res: Response<any, Record<string, any>>

      The response object

    Returns Promise<void>

    The result of the login

  • Logout a user

    Parameters

    • req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

      The request object

    • res: Response<any, Record<string, any>>

      The response object

    Returns Promise<void>

    The result of the logout

  • Register a new user

    Parameters

    • req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

      The request object

    • res: Response<any, Record<string, any>>

      The response object

    Returns Promise<void>

    The result of the registration