handler

package
v0.0.0-...-74adf86 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginHandler

type LoginHandler struct {
	// contains filtered or unexported fields
}

LoginHandler handles authentication requests

func NewLoginHandler

func NewLoginHandler(authMiddleware *middleware.AuthMiddleware, logger *zap.Logger) *LoginHandler

NewLoginHandler creates a new login handler

func (*LoginHandler) ServeHTTP

func (h *LoginHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles the login request

type LoginResponse

type LoginResponse struct {
	Token     string `json:"token"`
	ExpiresAt string `json:"expiresAt"`
	Username  string `json:"username"`
	IsAdmin   bool   `json:"isAdmin"`
}

LoginResponse represents the login response

type RefreshTokenHandler

type RefreshTokenHandler struct {
	// contains filtered or unexported fields
}

RefreshTokenHandler handles token refresh requests

func NewRefreshTokenHandler

func NewRefreshTokenHandler(authMiddleware *middleware.AuthMiddleware, logger *zap.Logger) *RefreshTokenHandler

NewRefreshTokenHandler creates a new refresh token handler

func (*RefreshTokenHandler) ServeHTTP

func (h *RefreshTokenHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles the refresh token request

type RefreshTokenResponse

type RefreshTokenResponse struct {
	Token     string `json:"token"`
	ExpiresAt string `json:"expiresAt"`
}

RefreshTokenResponse represents the refresh token response

Jump to

Keyboard shortcuts

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