tokenV2

package
v5.4.40 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const MaximumCredentialLength = 4096

MaximumCredentialLength defines the maximum number of characters in a credential

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware interface {
	Handler(next echo.HandlerFunc) echo.HandlerFunc
}

Middleware defines the public interface to be set with Use() on an echo server

func New

func New(skipper SkipperFunc, audience string, authorizedKeys []byte) (Middleware, error)

New returns a new token authenticator middleware given the contents of an SSH authorized_keys file. Requests containing a JWT Bearer token signed by one of the specified keys will be authorized, and those not will receive an HTTP 401 error.

func NewFromFile

func NewFromFile(skipper SkipperFunc, audience string, authorizedKeysPath string) (Middleware, error)

NewFromFile is like New but it takes the path for an authorized_keys file

type SkipperFunc

type SkipperFunc func(context echo.Context) bool

Jump to

Keyboard shortcuts

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