basic

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Component = &component.Component{
	Dependencies: component.Components{
		basic.Component,
		chi.Component,
	},
	PreExecute: component.StepFunc(func(container container.Container) error {
		return container.Invoke(func(r http.Router, auth *basic.Auth) {
			r.Use(auth)
		})
	}),
}

Component automatically adds basic authentication middleware to the HTTP router. It depends on:

  • basic.Component (the authentication middleware itself)
  • chi.Component (the router)

Usage:

compogo.WithComponents(
    http.Component,
    chi.Component,
    basic.Component,
)

All routes will now require valid basic authentication credentials.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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