authproto

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: MPL-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package authproto defines shared authentication protocol types Used by both pkg/auth and cmd/nftban-ui-auth to ensure consistency

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRequest

type AuthRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

AuthRequest represents a login request

type AuthResponse

type AuthResponse struct {
	Success bool   `json:"success"`
	Message string `json:"message,omitempty"`
	Error   string `json:"error,omitempty"`
}

AuthResponse represents the authentication result

func NewErrorResponse

func NewErrorResponse(err string) AuthResponse

NewErrorResponse creates an error auth response

func NewSuccessResponse

func NewSuccessResponse(message string) AuthResponse

NewSuccessResponse creates a successful auth response

Jump to

Keyboard shortcuts

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