modulepackage
0.0.0-20240624150259-c45d584d25e2
Repository: https://github.com/dave-gray101/v2keyauth.git
Documentation: pkg.go.dev
# README
fiber keyauth v3 -> v2 backport
I needed to extend the fiber keyauth middleware to support multiple key sources. These changes were contributed to fiber upstream for the next v3 version in this pr. As my project still depends on v2 for the time being, this repo hosts a minimally-backported version for all to use
# Functions
No description provided by the author
keyFromCookie returns a function that extracts api key from the named cookie.
keyFromForm returns a function that extracts api key from the form.
keyFromHeader returns a function that extracts api key from the request header.
keyFromParam returns a function that extracts api key from the url param string.
keyFromQuery returns a function that extracts api key from the query string.
MultipleKeySourceLookup creates a CustomKeyLookup function that checks multiple sources until one is found Each element should be specified according to the format used in KeyLookup.
New creates a new middleware handler.
TokenFromContext returns the bearer token from the request context.
# Variables
ConfigDefault is the default config.
When there is no request of the key thrown ErrMissingOrMalformedAPIKey.
# Type aliases
No description provided by the author