authentication

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decision

type Decision uint8
const (
	DecisionContinue Decision = iota
	DecisionUnauthorized
	DecisionForbidden
	DecisionInternalError
)

type EvaluationRequest

type EvaluationRequest struct {
	Context    context.Context
	RequestID  string
	Mode       string
	AuthHeader string
	Method     string
	Path       string
}

EvaluationRequest is the framework-neutral input to request authentication.

type EvaluationResult

type EvaluationResult struct {
	Session        *access.Session
	Decision       Decision
	BasicChallenge bool
}

EvaluationResult contains the session state and semantic outcome for a request.

type Runtime

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

Runtime contains authentication mechanisms assembled during server startup and evaluates framework-neutral authentication requests.

func NewRuntime

func NewRuntime(logger *slog.Logger, mode, basicUser, basicPass string) *Runtime

NewRuntime assembles configured authentication mechanisms and swallows plugin startup failures so request handling retains the existing fallback behavior.

func (*Runtime) Evaluate

func (r *Runtime) Evaluate(req EvaluationRequest) EvaluationResult

Evaluate composes configured authentication mechanisms without depending on Fiber.

Jump to

Keyboard shortcuts

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