http

package
v0.111.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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 AuthFromQueryParam

func AuthFromQueryParam(keyFunc jwt.Keyfunc, claimsFunc ClaimsFunc, signingMethod jwt.SigningMethod, next nhttp.Handler) nhttp.Handler

AuthFromQueryParam is a middleware that extracts the token from the query parameter and verifies it

func Logging added in v0.95.0

func Logging(logger log.Logger, next nhttp.Handler) nhttp.Handler

simple logging for http requests

Types

type ClaimsFunc

type ClaimsFunc func() jwt.Claims

ClaimsFunc is a function that returns a jwt.Claims with the custom claims and correct type

Jump to

Keyboard shortcuts

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