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 ¶
Click to show internal directories.
Click to hide internal directories.