token

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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

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

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

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

Usage:

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

All routes will now require a valid token in the configured header.

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