Documentation
¶
Overview ¶
File Path: monorepo/cloud/maplepress-backend/internal/interface/http/handler/admin/account_status_handler.go
File Path: monorepo/cloud/maplepress-backend/internal/interface/http/handler/admin/unlock_account_handler.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountStatusHandler ¶
type AccountStatusHandler struct {
// contains filtered or unexported fields
}
AccountStatusHandler handles HTTP requests for checking account lock status
func NewAccountStatusHandler ¶
func NewAccountStatusHandler( loginRateLimiter ratelimit.LoginRateLimiter, logger *zap.Logger, ) *AccountStatusHandler
NewAccountStatusHandler creates a new account status handler
func ProvideAccountStatusHandler ¶
func ProvideAccountStatusHandler( loginRateLimiter ratelimit.LoginRateLimiter, logger *zap.Logger, ) *AccountStatusHandler
ProvideAccountStatusHandler creates a new AccountStatusHandler for dependency injection
func (*AccountStatusHandler) Handle ¶
func (h *AccountStatusHandler) Handle(w http.ResponseWriter, r *http.Request)
Handle processes GET /api/v1/admin/[email protected] requests This endpoint allows administrators to check if an account is locked and get details
type AccountStatusResponse ¶
type AccountStatusResponse struct {
Email string `json:"email"`
IsLocked bool `json:"is_locked"`
FailedAttempts int `json:"failed_attempts"`
RemainingTime string `json:"remaining_time,omitempty"`
RemainingSeconds int `json:"remaining_seconds,omitempty"`
}
AccountStatusResponse represents the account status response
type UnlockAccountHandler ¶
type UnlockAccountHandler struct {
// contains filtered or unexported fields
}
UnlockAccountHandler handles HTTP requests for unlocking locked accounts
func NewUnlockAccountHandler ¶
func NewUnlockAccountHandler( loginRateLimiter ratelimit.LoginRateLimiter, securityEventLogger securityeventservice.Logger, logger *zap.Logger, ) *UnlockAccountHandler
NewUnlockAccountHandler creates a new unlock account handler
func ProvideUnlockAccountHandler ¶
func ProvideUnlockAccountHandler( loginRateLimiter ratelimit.LoginRateLimiter, securityEventLogger securityeventservice.Logger, logger *zap.Logger, ) *UnlockAccountHandler
ProvideUnlockAccountHandler creates a new UnlockAccountHandler for dependency injection
func (*UnlockAccountHandler) Handle ¶
func (h *UnlockAccountHandler) Handle(w http.ResponseWriter, r *http.Request)
Handle processes POST /api/v1/admin/unlock-account requests This endpoint allows administrators to manually unlock accounts that have been locked due to excessive failed login attempts
type UnlockAccountRequest ¶
type UnlockAccountRequest struct {
Email string `json:"email"`
}
UnlockAccountRequest represents the unlock account request payload
type UnlockAccountResponse ¶
type UnlockAccountResponse struct {
Success bool `json:"success"`
Message string `json:"message"`
Email string `json:"email"`
}
UnlockAccountResponse represents the unlock account response