Documentation
¶
Index ¶
- func AuthFromAuthorizationHeader(keyFunc jwt.Keyfunc, claimsFunc ClaimsFunc, signingMethod jwt.SigningMethod, ...) nhttp.Handler
- func AuthFromHeaderOrQueryParam(keyFunc jwt.Keyfunc, claimsFunc ClaimsFunc, signingMethod jwt.SigningMethod, ...) nhttp.Handler
- func Logging(logger log.Logger, next nhttp.Handler) nhttp.Handler
- type ClaimsFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthFromAuthorizationHeader ¶
func AuthFromAuthorizationHeader(keyFunc jwt.Keyfunc, claimsFunc ClaimsFunc, signingMethod jwt.SigningMethod, next nhttp.Handler) nhttp.Handler
AuthFromAuthorizationHeader is a middleware that extracts the token from the authorization header and verifies it
func AuthFromHeaderOrQueryParam ¶ added in v1.118.0
func AuthFromHeaderOrQueryParam(keyFunc jwt.Keyfunc, claimsFunc ClaimsFunc, signingMethod jwt.SigningMethod, next nhttp.Handler) nhttp.Handler
AuthFromHeaderOrQueryParam is a middleware that extracts the token from the authorization header or, when that header is absent, from the "t" query parameter, and verifies it. A present header always wins: a bad header is rejected and never falls back to the query token.
Types ¶
type ClaimsFunc ¶
ClaimsFunc is a function that returns a jwt.Claims with the custom claims and correct type
Click to show internal directories.
Click to hide internal directories.