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
Click to show internal directories.
Click to hide internal directories.