admin

package
v0.0.0-...-991afdd Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

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

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

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

Jump to

Keyboard shortcuts

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