@defikitdotnet/education-module-ai
Version:
AI Education Module using Agent Framework
62 lines (61 loc) • 2.6 kB
TypeScript
import { Request, Response, NextFunction } from "express";
import { StudentRepository } from "../repositories/StudentRepository";
import { TeacherRepository } from "../repositories/TeacherRepository";
export declare class AuthController {
private studentRepository;
private teacherRepository?;
constructor(studentRepository: StudentRepository, teacherRepository?: TeacherRepository);
/**
* Register a new teacher
*/
registerTeacher: (req: Request, res: Response, next: NextFunction) => Promise<void>;
/**
* Login a student using email and password
*/
loginStudent: (req: Request, res: Response, next: NextFunction) => Promise<void>;
/**
* Login a teacher using email and password
*/
loginTeacher: (req: Request, res: Response, next: NextFunction) => Promise<void>;
/**
* Get the profile of the currently authenticated student
*/
getStudentProfile: (req: Request, res: Response, next: NextFunction) => Promise<void>;
/**
* Get the profile of the currently authenticated teacher
*/
getTeacherProfile: (req: Request, res: Response, next: NextFunction) => Promise<void>;
/**
* Update the profile of the currently authenticated student
*/
updateStudentProfile: (req: Request, res: Response, next: NextFunction) => Promise<void>;
/**
* Update the profile of the currently authenticated teacher
*/
updateTeacherProfile: (req: Request, res: Response, next: NextFunction) => Promise<void>;
/**
* Check the authentication status of the student based on the JWT cookie.
*/
checkStudentStatus: (req: Request, res: Response, next: NextFunction) => Promise<void>;
/**
* Check the authentication status of the teacher based on the JWT cookie.
*/
checkTeacherStatus: (req: Request, res: Response, next: NextFunction) => Promise<void>;
/**
* Logout a student by clearing the authentication cookie.
*/
logoutStudent: (req: Request, res: Response) => void;
/**
* Logout a teacher by clearing the authentication cookie.
*/
logoutTeacher: (req: Request, res: Response) => void;
/**
* Direct login a student (potentially for specific scenarios like admin access or testing)
* Uses a longer expiry time for the token.
*/
directLoginStudent: (req: Request, res: Response, next: NextFunction) => Promise<void>;
/**
* Direct login a teacher with longer expiry time for the token
*/
directLoginTeacher: (req: Request, res: Response, next: NextFunction) => Promise<void>;
}