Documentation
¶
Index ¶
- type Handlers
- func (h *Handlers) Enable2FA(c *fiber.Ctx) error
- func (h *Handlers) ForgotPassword(c *fiber.Ctx) error
- func (h *Handlers) Login(c *fiber.Ctx) error
- func (h *Handlers) Logout(c *fiber.Ctx) error
- func (h *Handlers) Me(c *fiber.Ctx) error
- func (h *Handlers) Refresh(c *fiber.Ctx) error
- func (h *Handlers) Register(c *fiber.Ctx) error
- func (h *Handlers) ResetPassword(c *fiber.Ctx) error
- func (h *Handlers) SendOTP(c *fiber.Ctx) error
- func (h *Handlers) Verify2FA(c *fiber.Ctx) error
- func (h *Handlers) VerifyOTP(c *fiber.Ctx) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handlers ¶
type Handlers struct {
UserRepo *repositories.UserRepository
ACLRepo *repositories.ACLRepository
JWTSecret string
}
Handlers holds dependencies for auth HTTP handlers.
func NewHandlers ¶
func NewHandlers(userRepo *repositories.UserRepository, aclRepo *repositories.ACLRepository, jwtSecret string) *Handlers
NewHandlers returns a new Handlers. UserRepo may be nil if DB is not configured. ACLRepo may be nil.
func (*Handlers) ForgotPassword ¶
ForgotPassword handles POST /auth/forgot-password.
func (*Handlers) ResetPassword ¶
ResetPassword handles POST /auth/reset-password.
Click to show internal directories.
Click to hide internal directories.