auth

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

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) Enable2FA

func (h *Handlers) Enable2FA(c *fiber.Ctx) error

Enable2FA handles POST /auth/enable-2fa.

func (*Handlers) ForgotPassword

func (h *Handlers) ForgotPassword(c *fiber.Ctx) error

ForgotPassword handles POST /auth/forgot-password.

func (*Handlers) Login

func (h *Handlers) Login(c *fiber.Ctx) error

Login handles POST /auth/login.

func (*Handlers) Logout

func (h *Handlers) Logout(c *fiber.Ctx) error

Logout handles POST /auth/logout.

func (*Handlers) Me

func (h *Handlers) Me(c *fiber.Ctx) error

Me handles GET /auth/me.

func (*Handlers) Refresh

func (h *Handlers) Refresh(c *fiber.Ctx) error

Refresh handles POST /auth/refresh.

func (*Handlers) Register

func (h *Handlers) Register(c *fiber.Ctx) error

Register handles POST /auth/register.

func (*Handlers) ResetPassword

func (h *Handlers) ResetPassword(c *fiber.Ctx) error

ResetPassword handles POST /auth/reset-password.

func (*Handlers) SendOTP

func (h *Handlers) SendOTP(c *fiber.Ctx) error

SendOTP handles POST /auth/send-otp.

func (*Handlers) Verify2FA

func (h *Handlers) Verify2FA(c *fiber.Ctx) error

Verify2FA handles POST /auth/verify-2fa.

func (*Handlers) VerifyOTP

func (h *Handlers) VerifyOTP(c *fiber.Ctx) error

VerifyOTP handles POST /auth/verify-otp.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL