middleware

package
v0.0.0-...-f616806 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JwtMiddleware

type JwtMiddleware struct {
	Issuer string
	Secret string
}

JwtMiddleware witholds jwt issuer and secret

func NewJwtMiddleware

func NewJwtMiddleware(issuer, secret string) *JwtMiddleware

NewJwtMiddleware returns a new pointer reference to a JwtMiddleware

func (*JwtMiddleware) Handler

func (m *JwtMiddleware) Handler(next http.HandlerFunc) http.HandlerFunc

Handler is the jwt middleware handler function. It extracts a jwt token from a request header and asserts it is still valid in a middleware chain

Jump to

Keyboard shortcuts

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