Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
Middleware is the core authentication middleware It implements http.Handler and can wrap any http.Handler
func New ¶
func New( cfg *config.Config, sessionStore kvs.Store, oauthManager *oauth2.Manager, emailHandler *email.Handler, passwordHandler *password.Handler, authzChecker authz.Checker, forwarder forwarding.Forwarder, rulesEvaluator *rules.Evaluator, translator *i18n.Translator, logger logging.Logger, ) *Middleware
New creates a new authentication middleware
func (*Middleware) ServeHTTP ¶
func (m *Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements http.Handler This is where all requests pass through
type ValidationError ¶
type ValidationError struct {
Field string // Field name (e.g., "server.port", "session.cookie_secret")
Message string // Error message
}
ValidationError represents a single validation error
type ValidationErrors ¶
type ValidationErrors []ValidationError
ValidationErrors is a collection of validation errors
func ValidateConfig ¶
func ValidateConfig(cfg *config.Config) ValidationErrors
ValidateConfig validates the middleware configuration Returns a list of validation errors, or nil if validation passes
func (ValidationErrors) Error ¶
func (ve ValidationErrors) Error() string
Error implements the error interface Returns a formatted string of all validation errors
Click to show internal directories.
Click to hide internal directories.