jwtmiddleware

package
v0.0.648 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SessionContextKey = jwtmiddleware.ContextKey{}

Deprecated: use jwtmiddleware.ContextKey{} instead.

Functions

func SessionFromContext

func SessionFromContext(ctx context.Context) (json.RawMessage, error)

Types

type Middleware

type Middleware struct {
	// contains filtered or unexported fields
}

func NewMiddleware

func NewMiddleware(
	wellKnownURL string,
	opts ...MiddlewareOption,
) *Middleware

func (*Middleware) NegroniHandler deprecated

func (h *Middleware) NegroniHandler() negroni.Handler

Deprecated: use Middleware as a negroni.Handler directly instead.

func (*Middleware) ServeHTTP added in v0.0.642

func (h *Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)

type MiddlewareOption

type MiddlewareOption func(*middlewareOptions)

func MiddlewareAllowSigningMethod

func MiddlewareAllowSigningMethod(method jwt.SigningMethod) MiddlewareOption

func MiddlewareDebugEnabled

func MiddlewareDebugEnabled() MiddlewareOption

func MiddlewareErrorWriter added in v0.0.642

func MiddlewareErrorWriter(w herodot.Writer) MiddlewareOption

func MiddlewareExcludePaths

func MiddlewareExcludePaths(paths ...string) MiddlewareOption

Jump to

Keyboard shortcuts

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