Documentation
¶
Index ¶
- func NewCors() gin.HandlerFunc
- type AuthController
- type AuthMiddleware
- type AuthService
- func (as *AuthService) ForgotPassword(email string) error
- func (as *AuthService) Login(email, password string) (interface{}, *utils.AccessTokenDetails, error)
- func (as *AuthService) Logout(accessUuid string) error
- func (as *AuthService) ResetPassword(email, password, token string) error
- func (as *AuthService) Verify(email, token string) error
- type IAuthService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCors ¶
func NewCors() gin.HandlerFunc
Types ¶
type AuthController ¶
type AuthController struct {
// contains filtered or unexported fields
}
func NewAuthController ¶
func NewAuthController(authService IAuthService) *AuthController
func (*AuthController) ForgotPassword ¶
func (ac *AuthController) ForgotPassword(c *gin.Context)
func (*AuthController) Login ¶
func (ac *AuthController) Login(c *gin.Context)
func (*AuthController) Logout ¶
func (ac *AuthController) Logout(c *gin.Context)
func (*AuthController) ResetPassword ¶
func (ac *AuthController) ResetPassword(c *gin.Context)
func (*AuthController) Verify ¶
func (ac *AuthController) Verify(c *gin.Context)
type AuthMiddleware ¶
type AuthMiddleware struct {
// contains filtered or unexported fields
}
func NewAuthMiddleWare ¶
func NewAuthMiddleWare(accessTokenSecret string, tutorRepo tutor.IMiddlewareTutorRepo, studentRepo student.IMiddlewareStudentRepo, accessTokenManager utils.IMiddlewareAccessTokenManager) *AuthMiddleware
func (*AuthMiddleware) Authentication ¶
func (amw *AuthMiddleware) Authentication() gin.HandlerFunc
func (*AuthMiddleware) Authorization ¶
func (amw *AuthMiddleware) Authorization(role user.Role) gin.HandlerFunc
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService(tutorRepo tutor.ITutorRepo, studentRepo student.IStudentRepo, subjectRepo subject.ISubjectRepo, accessTokenManager utils.IAccessTokenManager, verificationTokenManager utils.IVerificationTokenManager, emailManager utils.IEmailManager, baseUrl string) *AuthService
func (*AuthService) ForgotPassword ¶
func (as *AuthService) ForgotPassword(email string) error
func (*AuthService) Login ¶
func (as *AuthService) Login(email, password string) (interface{}, *utils.AccessTokenDetails, error)
func (*AuthService) Logout ¶
func (as *AuthService) Logout(accessUuid string) error
func (*AuthService) ResetPassword ¶
func (as *AuthService) ResetPassword(email, password, token string) error
func (*AuthService) Verify ¶
func (as *AuthService) Verify(email, token string) error
Click to show internal directories.
Click to hide internal directories.